You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-packaging/macros.ansible

29 lines
1.1 KiB

# Stores ephemeral data that's created by %%ansible_collection_install
# and used by other macros.
%__ansible_builddir %{_builddir}/%{?buildsubdir:%{buildsubdir}/}.ansible-packaging
%ansible_roles_dir %{_datadir}/ansible/roles
%ansible_collections_dir %{_datadir}/ansible/collections/ansible_collections
%ansible_collection_build() ansible-galaxy collection build
%ansible_collection_install() %{shrink:
%{_rpmconfigdir}/ansible_collection.py install
--collections-dir %{buildroot}%{ansible_collections_dir}
--filelist %{ansible_collection_filelist}
}
%ansible_test_unit() %{shrink:
%{_rpmconfigdir}/ansible_collection.py test --
--python-interpreter %{__python3} --local %{?*}
}
# TODO: Officially deprecate this macro and add the following line to the macro
# def after the new approach has gotten more testing and adoption:
# %%{warn: %%{ansible_collection_files} is deprecated. Use %%files -f %%{ansible_collection_filelist} instead.}
%ansible_collection_files %{shrink:
%{ansible_collections_dir}/%{collection_namespace}/
}
%ansible_collection_filelist %{__ansible_builddir}/ansible_collection_files