Accepting request 1039496 from systemsmanagement:ansible

OBS-URL: https://build.opensuse.org/request/show/1039496
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible?expand=0&rev=88
This commit is contained in:
Dominique Leuenberger 2022-12-02 12:13:33 +00:00 committed by Git OBS Bridge
commit bf9b5f52e8
4 changed files with 74 additions and 15 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1b940a8d4f412123ede3c14b25cb99c3c8a4d535fd040aabf8e4fb7b0e4f092
size 35620748

3
ansible-7.0.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:73144e7e602715fab623005d2e71e503dddae86185e061fed861b2449c5618ea
size 35494124

View File

@ -1,3 +1,46 @@
-------------------------------------------------------------------
Fri Nov 25 07:03:33 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- rework spec file to define %ansible_python version, which is the
python version, that ansible is built against, as well as
%ansible_python_sitelib and %ansible_python_executable
-------------------------------------------------------------------
Wed Nov 23 07:27:47 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 7.0.0:
Ansible 7.0.0 will include ansible-core 2.14.0 as well as a curated set of
Ansible collections to provide a vast number of modules and plugins.
This is a major version update from Ansible 6.x which included
ansible-core 2.13 and there may be backwards incompatibilities in the
core playbook language.
* What's new in Ansible 7
- Ansible 7 requires Python 3.9 on the controller, same as ansible-core 2.14.
- Variables are now evaluated lazily; only when they are actually used. For
example, in ansible-core 2.14 an expression ``{{ defined_variable or
undefined_variable }}`` does not fail on ``undefined_variable`` if the
first part of ``or`` is evaluated to ``True`` as it is not needed to
evaluate the second part.
* Collections added to Ansible 7:
- ibm.spectrum_virtualize (version 1.9.0)
- inspur.ispim (version 1.0.1)
- purestorage.fusion (version 1.1.1)
- vultr.cloud (version 1.1.0)
* The previously deprecated servicenow.servicenow collection has been removed.
* NOTE: Read the full Ansible 7 porting guide at
https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/porting_guides/porting_guide_7.rst
for complete details.
- The changelog for ansible-core 2.14 installed by this release of
ansible is available here:
https://github.com/ansible/ansible/blob/stable-2.14/changelogs/CHANGELOG-v2.14.rst
- Collections which have opted into being a part of the Ansible-7
unified changelog will have an entry on this page:
https://github.com/ansible-community/ansible-build-data/blob/main/7/CHANGELOG-v7.rst
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Nov 16 08:27:00 UTC 2022 - Johannes Kastl <kastl@b1-systems.de> Wed Nov 16 08:27:00 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>

View File

@ -15,26 +15,42 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%if 0%{?suse_version} < 1550
# Leap15, SLES15
%define pythons python310
%define ansible_python python310
%define ansible_python_executable python3.10
%define ansible_python_sitelib %python310_sitelib
%else
# Tumbleweed
%define pythons python3
%define ansible_python python3
%define ansible_python_executable python3
%define ansible_python_sitelib %python3_sitelib
%endif
Name: ansible Name: ansible
Version: 6.6.0 Version: 7.0.0
Release: 0 Release: 0
Summary: Radically simple IT automation Summary: Radically simple IT automation
License: GPL-3.0+ License: GPL-3.0+
URL: https://ansible.com/ URL: https://ansible.com/
Source: https://files.pythonhosted.org/packages/source/a/ansible/ansible-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/a/ansible/ansible-%{version}.tar.gz
Source99: ansible-rpmlintrc Source99: ansible-rpmlintrc
BuildRequires: python3-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: python3-setuptools BuildRequires: %{ansible_python}-base >= 3.9
BuildRequires: %{ansible_python}-setuptools
BuildRequires: fdupes BuildRequires: fdupes
# required to fix the azure collection line endings # required to fix the azure collection line endings
BuildRequires: dos2unix BuildRequires: dos2unix
# SECTION test requirements # SECTION test requirements
BuildRequires: ansible-core >= 2.13.6 BuildRequires: ansible-core >= 2.14.0
# /SECTION # /SECTION
Requires: ansible-core >= 2.13.6 Requires: %{ansible_python}-base >= 3.9
Requires: ansible-core >= 2.14.0
BuildArch: noarch BuildArch: noarch
%description %description
@ -52,14 +68,14 @@ for file in .git_keep .travis.yml ; do
done done
# fix for wrong shebang: # fix for wrong shebang:
sed -i 's|/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python|%{_bindir}/python3|g' ansible_collections/cisco/meraki/scripts/sublime-build/build.py.generic sed -i 's|/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python|%{_bindir}/%{ansible_python_executable}|g' ansible_collections/cisco/meraki/scripts/sublime-build/build.py.generic
# Replace all #!/usr/bin/env lines to use #!/usr/bin/$1 directly. # Replace all #!/usr/bin/env lines to use #!/usr/bin/$1 directly.
find ./ -type f -exec \ find ./ -type f -exec \
sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \; sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \;
find ./ -type f -exec \ find ./ -type f -exec \
sed -i '1s|python$|python3|' {} \; sed -i '1s|python$|%{ansible_python_executable}|' {} \;
# remove .keep and .gitignore files # remove .keep and .gitignore files
find ./ansible_collections/ -iname .gitignore -delete find ./ansible_collections/ -iname .gitignore -delete
@ -73,16 +89,16 @@ find ./ansible_collections/azure -type f -exec dos2unix {} \;
rm -rf ./ansible_collections/lowlydba/sqlserver/ rm -rf ./ansible_collections/lowlydba/sqlserver/
%build %build
python3 setup.py build %python_build
%install %install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %python_install
%fdupes %{buildroot}/%{python_sitelib}/ansible_collections/ %fdupes %{buildroot}/%{ansible_python_sitelib}/ansible_collections/
%files %files
%doc CHANGELOG-v6.rst README.rst %doc CHANGELOG-v7.rst README.rst
%license COPYING %license COPYING
%{_bindir}/ansible-community %{_bindir}/ansible-community
%{python_sitelib}/* %{ansible_python_sitelib}/
%changelog %changelog