Name: ansible-cmdb Version: 1.30 Release: 2%{?dist} Summary: Generate host overview from Ansible 'setup' module output License: Proprietary URL: https://github.com/fboender/ansible-cmdb Source0: https://github.com/fboender/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-rpm-macros BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-mako Requires: python3-yaml %description ansible-cmdb takes the output of Ansible's 'setup' module output (fact gathering) and transforms it into an host information overview. It supports supplementing gathered information with your own information. It can also scan the ansible 'hosts' file to get groups and variables to be included in the host information overview. %prep %setup -q %build sed -i '1s/python$/python3/' \ ansible-cmdb.py \ jsonxs.py \ ansiblecmdb/data/tpl/markdown_split.py \ ansiblecmdb/data/tpl/html_fancy_split.py %install [ '%{buildroot}' != '/' ] && rm -rf %{buildroot} install -dp %{buildroot}%{python3_sitelib} cp -r ansiblecmdb jsonxs.py %{buildroot}%{python3_sitelib}/ install -Dp -m0755 ansible-cmdb.py %{buildroot}%{_bindir}/%{name} install -Dp -m0644 ansible-cmdb.man.1 %{buildroot}%{_mandir}/man1/%{name}.1 %files %defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.md %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %{python3_sitelib}/ansiblecmdb %{python3_sitelib}/jsonxs.py %{python3_sitelib}/__pycache__/jsonxs.*