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