- split out ansible-test package for module developers

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ansible?expand=0&rev=155
This commit is contained in:
Lars Vogdt 2019-11-19 18:05:31 +00:00 committed by Git OBS Bridge
parent 8e2f1a0175
commit 8c16a86de5
2 changed files with 48 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 19 18:04:50 UTC 2019 - Lars Vogdt <lars@linux-schulserver.de>
- split out ansible-test package for module developers
-------------------------------------------------------------------
Fri Nov 15 12:44:55 UTC 2019 - lars@linux-schulserver.de - 2.9.1

View File

@ -129,10 +129,41 @@ configuration-management, application deployment, cloud provisioning, ad-hoc
task-execution, and multinode orchestration - including trivializing things
like zero downtime rolling updates with load balancers.
%package -n ansible-test
Summary: Tool for testing ansible plugin and module code
Requires: %{name} = %{version}
%if 0%{?rhel} >= 8
# Will use the python3 stdlib venv
#Requires: python3-virtualenv
#BuildRequires: python3-virtualenv
%else
%if 0%{?rhel} >= 7
Requires: python-virtualenv
BuildRequires: python-virtualenv
%endif # Requires for RHEL 7
%endif # Requires for RHEL 8
# SUSE/openSUSE
%if 0%{?suse_version}
Requires: python-virtualenv
BuildRequires: python-virtualenv
%endif
%description -n ansible-test
Ansible is a radically simple model-driven configuration management,
multi-node deployment, and remote task execution system. Ansible works
over SSH and does not require any software or daemons to be installed
on remote nodes. Extension modules can be written in any language and
are transferred to managed machines automatically.
This package installs the ansible-test command for testing modules and plugins
developed for ansible.
%prep
%setup -q -n ansible-%{version}
find . -name .git_keep -delete
find . -name .git_keep -o -name .travis.yml -delete
find contrib/ -type f -exec chmod 644 {} +
# Replace all #!/usr/bin/env lines to use #!/usr/bin/$1 directly.
@ -173,12 +204,13 @@ mkdir -p %{buildroot}/%{_datadir}/ansible
%{_bindir}/ansible-inventory
%{_bindir}/ansible-playbook
%{_bindir}/ansible-pull
%{_bindir}/ansible-test
%{_bindir}/ansible-vault
%if %{with python3}
%{python3_sitelib}/*
%exclude %{python3_sitelib}/ansible_test
%else
%{python_sitelib}/*
%exclude %{python_sitelib}/ansible_test
%endif
%{_mandir}/man1/ansible.1%{?ext_man}*
%{_mandir}/man1/ansible-config.1%{?ext_man}*
@ -193,4 +225,13 @@ mkdir -p %{buildroot}/%{_datadir}/ansible
%config(noreplace) %{_sysconfdir}/ansible/ansible.cfg
%config(noreplace) %{_sysconfdir}/ansible/hosts
%files -n ansible-test
%{_bindir}/ansible-test
%if %{with python3}
%{python3_sitelib}/ansible_test
%else
%{python2_sitelib}/ansible_test
%endif
%changelog