summaryrefslogtreecommitdiffstats
path: root/ansible-collection-awx-awx.spec
blob: 6ef083c36f0e5b4c455192d9a817ad0c3e5bf8d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# ansible-core is built for alternative Python stacks in RHEL which do not have
# the necessary test deps packaged.
%if %{defined fedora}
%bcond_without tests
%else
%bcond_with tests
%endif

Name:		ansible-collection-awx-awx
Version:	22.6.0
Release:	1%{?dist}
Summary:	Ansible modules and plugins for working with AWX

License:	GPL-3.0-or-later
URL:		%{ansible_collection_url awx awx}
Source0:	https://github.com/ansible/awx/archive/%{version}/awx-%{version}.tar.gz
Patch0:		build_ignore-unnecessary-files.patch

BuildArch:	noarch

BuildRequires:	ansible-packaging
%if %{with tests/units}
BuildRequires:	ansible-packaging-tests
BuildRequires:	%{py3_dist requests}	
%endif

%description
ansible-collection-awx-awx provides the Awx.Awx Ansible
collection. The collection includes Ansible modules and plugins for working	
with AWX.

%prep
%autosetup -n awx-%{version} -p1
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +

%build
ansible-playbook -i localhost, awx_collection/tools/template_galaxy.yml \
	  -e collection_package=awx \
	  -e collection_namespace=awx \
	  -e collection_version=%{version} \
	  -e '{"awx_template_version": false}'
# cd %{_builddir}/awx-%{version}/awx_collection_build/
cd awx_collection_build/
%ansible_collection_build

%install	
cd awx_collection_build/
%ansible_collection_install	

%if %{with tests/units}
%check
cd awx_collection_build/
%ansible_test_unit
%endif


%files -f %{ansible_collection_filelist}
%license awx_collection_build/COPYING
%doc README.md

%changelog
* Fri Jul 28 2023 Andrew H <aheath1992@gmail.com> - 22.6.0-1
- Initial Package