|
|
5a6dd6 |
%define debug_package %{nil}
|
|
|
cc3497 |
%define community_general_version 4.4.0
|
|
|
cc3497 |
%define ansible_posix_version 1.3.0
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
Name: rhc-worker-playbook
|
|
|
5a6dd6 |
Summary: Red Hat connect worker for launching Ansible Runner
|
|
|
cc3497 |
Version: 0.1.8
|
|
|
ca7712 |
Release: 3%{?dist}
|
|
|
5a6dd6 |
License: GPLv2+
|
|
|
cc3497 |
Source: rhc-worker-playbook-0.1.8.tar.gz
|
|
|
cc3497 |
Source1: https://github.com/ansible-collections/community.general/archive/%{community_general_version}/ansible-collection-community-general-%{community_general_version}.tar.gz
|
|
|
cc3497 |
Source2: https://github.com/ansible-collections/ansible.posix/archive/%{ansible_posix_version}/ansible-collection-ansible-posix-%{ansible_posix_version}.tar.gz
|
|
|
5a6dd6 |
|
|
|
ca7712 |
#
|
|
|
ca7712 |
# patches_ignore=DROP-IN-RPM
|
|
|
ca7712 |
# patches_base=8ddc5ccfc97290a021b4c4de673b92fedc38cbfb
|
|
|
ca7712 |
Patch0001: 0001-fix-Execute-playbook-asynchronously.patch
|
|
|
ca7712 |
Patch0002: 0002-Do-not-busy-wait-when-playbook-is-running.patch
|
|
|
ca7712 |
|
|
|
5a6dd6 |
ExclusiveArch: %{go_arches}
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%{?__python3:Requires: %{__python3}}
|
|
|
5a6dd6 |
Requires: insights-client
|
|
|
5a6dd6 |
Requires: python3dist(requests)
|
|
|
cc3497 |
Requires: ansible-core
|
|
|
5a6dd6 |
BuildRequires: rhc
|
|
|
5a6dd6 |
BuildRequires: pkgconfig
|
|
|
5a6dd6 |
BuildRequires: python3-devel
|
|
|
5a6dd6 |
BuildRequires: python3dist(pip)
|
|
|
5a6dd6 |
BuildRequires: python3dist(wheel)
|
|
|
5a6dd6 |
BuildRequires: openssl-devel
|
|
|
5a6dd6 |
BuildRequires: c-ares-devel
|
|
|
5a6dd6 |
BuildRequires: zlib-devel
|
|
|
5a6dd6 |
BuildRequires: python3dist(cython)
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%description
|
|
|
5a6dd6 |
Python-based worker for Red Hat connect, used to launch Ansible playbooks via Ansible Runner.
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%prep
|
|
|
ca7712 |
%setup -q -a1 -a2 -n %{name}-%{version}
|
|
|
ca7712 |
|
|
|
ca7712 |
%patch0001 -p1
|
|
|
ca7712 |
%patch0002 -p1
|
|
|
ca7712 |
|
|
|
cc3497 |
pushd community.general-%{community_general_version}
|
|
|
cc3497 |
rm -vr .github .azure-pipelines
|
|
|
cc3497 |
rm -rvf tests/
|
|
|
cc3497 |
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
|
|
|
cc3497 |
find -type f -name '.gitignore' -print -delete
|
|
|
cc3497 |
popd
|
|
|
cc3497 |
|
|
|
cc3497 |
pushd ansible.posix-%{ansible_posix_version}
|
|
|
cc3497 |
rm -vr tests/{integration,utils} .github changelogs/fragments/.keep {test-,}requirements.txt shippable.yml
|
|
|
cc3497 |
rm -vr .azure-pipelines
|
|
|
cc3497 |
rm -rvf tests/
|
|
|
cc3497 |
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
|
|
|
cc3497 |
find -type f -name '.gitignore' -print -delete
|
|
|
cc3497 |
popd
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%build
|
|
|
5a6dd6 |
export GRPC_PYTHON_BUILD_WITH_CYTHON=True
|
|
|
5a6dd6 |
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
|
|
|
5a6dd6 |
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True
|
|
|
5a6dd6 |
export GRPC_PYTHON_BUILD_SYSTEM_CARES=True
|
|
|
5a6dd6 |
export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=True
|
|
|
5a6dd6 |
%define rhc_config_dir $(pkg-config rhc --variable workerconfdir)
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%{__make} PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON_PKGDIR=%{python3_sitelib} CONFIG_DIR=%{rhc_config_dir} installed-lib-dir
|
|
|
5a6dd6 |
%{make_build} build
|
|
|
5a6dd6 |
|
|
|
cc3497 |
# Building the Ansible Collections
|
|
|
cc3497 |
pushd community.general-%{community_general_version}
|
|
|
cc3497 |
tar -cf %{_tmppath}/community-general-%{community_general_version}.tar.gz .
|
|
|
cc3497 |
popd
|
|
|
cc3497 |
|
|
|
cc3497 |
pushd ansible.posix-%{ansible_posix_version}
|
|
|
cc3497 |
tar -cf %{_tmppath}/ansible-posix-%{ansible_posix_version}.tar.gz .
|
|
|
cc3497 |
popd
|
|
|
cc3497 |
|
|
|
5a6dd6 |
%install
|
|
|
5a6dd6 |
%{make_install} PREFIX=%{_prefix} LIBDIR=%{_libdir} CONFIG_DIR=%{rhc_config_dir} PYTHON_PKGDIR=%{python3_sitelib}
|
|
|
5a6dd6 |
|
|
|
cc3497 |
# Installing the Ansible Collections
|
|
|
cc3497 |
mkdir -p %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general
|
|
|
cc3497 |
mkdir -p %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix
|
|
|
cc3497 |
|
|
|
cc3497 |
pushd %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general
|
|
|
cc3497 |
tar -xf %{_tmppath}/community-general-%{community_general_version}.tar.gz
|
|
|
cc3497 |
popd
|
|
|
cc3497 |
|
|
|
cc3497 |
pushd %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix
|
|
|
cc3497 |
tar -xf %{_tmppath}/ansible-posix-%{ansible_posix_version}.tar.gz
|
|
|
cc3497 |
popd
|
|
|
cc3497 |
|
|
|
cc3497 |
# Creating the logs directory for ansible-runner
|
|
|
cc3497 |
mkdir -p %{buildroot}%{_localstatedir}/log/rhc-worker-playbook/ansible
|
|
|
cc3497 |
|
|
|
5a6dd6 |
%files
|
|
|
5a6dd6 |
%{_libexecdir}/rhc/rhc-worker-playbook.worker
|
|
|
5a6dd6 |
%{python3_sitelib}/rhc_worker_playbook/
|
|
|
5a6dd6 |
%{python3_sitelib}/rhc_worker_playbook*.egg-info/
|
|
|
5a6dd6 |
%{_libdir}/rhc-worker-playbook/
|
|
|
cc3497 |
%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/
|
|
|
cc3497 |
%{_localstatedir}/log/rhc-worker-playbook/ansible/
|
|
|
5a6dd6 |
%config %{_sysconfdir}/rhc/workers/rhc-worker-playbook.toml
|
|
|
ca7712 |
%exclude %{_libdir}/.build-id/
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%doc
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
%changelog
|
|
|
ca7712 |
* Fri Aug 05 2022 Gael Chamoulaud <gchamoul@redhat.com> 0.1.8-3
|
|
|
ca7712 |
- Do not busy-wait when playbook is running (rhbz#2104199)
|
|
|
ca7712 |
|
|
|
ca7712 |
* Mon Mar 14 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 0.1.8-2
|
|
|
ca7712 |
- Update patches
|
|
|
ca7712 |
- Add DROP-IN-RPM patches_ignore rule for rdopkg
|
|
|
ca7712 |
|
|
|
ca7712 |
* Mon Feb 21 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 0.1.8-1
|
|
|
ca7712 |
- Patch to fix Execute Playbook Asynchronously (RHBZ#2020426)
|
|
|
ca7712 |
|
|
|
cc3497 |
* Thu Feb 03 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 0.1.8-0
|
|
|
cc3497 |
- Fix: Bump ansible-runner to 2.1.1 and dependencies in vendor (RHBZ#2053207)
|
|
|
cc3497 |
- Upload new rhc-worker-playbook-0.1.8.tar.gz source
|
|
|
cc3497 |
|
|
|
cc3497 |
* Thu Feb 03 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 0.1.7-0
|
|
|
cc3497 |
- Add Ansible community general and ansible.posix Collections
|
|
|
cc3497 |
- Upload new rhc-worker-playbook-0.1.7.tar.gz source
|
|
|
cc3497 |
|
|
|
5a6dd6 |
* Mon Apr 19 2021 Jeremy Crafts <jcrafts@redhat.com> - 0.1.5-1
|
|
|
5a6dd6 |
- Changes to playbook validation logic
|
|
|
5a6dd6 |
- Enhancements for logging to rhcd
|
|
|
5a6dd6 |
- Fix for subprocess environment
|
|
|
5a6dd6 |
|
|
|
5a6dd6 |
* Thu Mar 25 2021 Jeremy Crafts <jcrafts@redhat.com> - 0.1.4-1
|
|
|
5a6dd6 |
- Enhancements to playbook validation
|
|
|
5a6dd6 |
- Fixes for regular execution status updates
|
|
|
5a6dd6 |
- Configuration fixes
|