Accepting request 1088332 from home:ojkastl_buildservice:Branch_systemsmanagement_ansible

new package ansible-variables: Keep track of Ansible host context variables

OBS-URL: https://build.opensuse.org/request/show/1088332
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-variables?expand=0&rev=1
This commit is contained in:
Johannes Kastl 2023-05-22 10:48:56 +00:00 committed by Git OBS Bridge
commit 6ab9ead53e
6 changed files with 132 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

4
_service Normal file
View File

@ -0,0 +1,4 @@
<services>
<service name="download_files" mode="disabled">
</service>
</services>

View File

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

View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Mon May 22 10:23:58 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- new package ansible-variables: Keep track of Ansible host context
variables

96
ansible-variables.spec Normal file
View File

@ -0,0 +1,96 @@
#
# spec file for package python-ansible-variables
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
%if 0%{?suse_version} < 1550
# Leap15, SLES15
%if %pythons == "python310"
%define ansible_python python310
%define ansible_python_executable python3.10
%define ansible_python_sitelib %python310_sitelib
%endif
%if %pythons == "python311"
%define ansible_python python311
%define ansible_python_executable python3.11
%define ansible_python_sitelib %python311_sitelib
%endif
%else
# Tumbleweed
%define pythons python3
%define ansible_python python3
%define ansible_python_executable python3
%define ansible_python_sitelib %python3_sitelib
%endif
Name: ansible-variables
Version: 0.5.0
Release: 0
Summary: Keep track of Ansible host context variables
License: GPL-3.0+
URL: https://github.com/hille721/ansible-variables
# the PyPI tarball does not contain all files required for the tests
Source: https://github.com/hille721/ansible-variables/archive/v%{version}/ansible-variables-%{version}.tar.gz#/ansible-variables-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{ansible_python}-pip
BuildRequires: %{ansible_python}-setuptools
BuildRequires: %{ansible_python}-wheel
# SECTION test requirements
BuildRequires: ansible-core >= 2.11.0
BuildRequires: %{ansible_python}-pytest
BuildRequires: %{ansible_python}-rich
# /SECTION
BuildRequires: fdupes
Requires: ansible-core >= 2.11.0
Requires: %{ansible_python}-rich
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Keep track of Ansible host context variables
%prep
%autosetup -p1 -n ansible-variables-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/ansible-variables
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export PATH="%{buildroot}%{_bindir}:$PATH"
%pytest
%post
%python_install_alternative ansible-variables
%postun
%python_uninstall_alternative ansible-variables
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/ansible-variables
%{ansible_python_sitelib}/ansible_variables
%{ansible_python_sitelib}/ansible_variables-%{version}.dist-info
%changelog