diff --git a/.gitignore b/.gitignore index 5df56b6..59d479a 100644 --- a/.gitignore +++ b/.gitignore @@ -363,3 +363,6 @@ /timesync-1.7.1.tar.gz /ssh-1.1.11.tar.gz /ansible-sshd-v0.18.0.tar.gz +/podman-1.0.0.tar.gz +/podman-1.0.1.tar.gz +/containers-podman-1.9.4.tar.gz diff --git a/CHANGELOG.md b/CHANGELOG.md index e654129..8126e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ Changelog ========= +[1.21.0-0.5.podman] - 2022-11-17 +---------------------------- + +### New Features + +- [podman - [RFE] role for managing podman containers and systemd](https://bugzilla.redhat.com/show_bug.cgi?id=2143427) + +### Bug Fixes + +- none + [1.21.0-0.3.ssh_sshd_selinux_timesync] - 2022-11-16 ---------------------------- diff --git a/linux-system-roles.spec b/linux-system-roles.spec index 9e1d04b..1f7678d 100644 --- a/linux-system-roles.spec +++ b/linux-system-roles.spec @@ -30,7 +30,7 @@ Name: linux-system-roles Url: https://github.com/linux-system-roles Summary: Set of interfaces for unified system management Version: 1.21.0 -Release: 0.3.ssh_sshd_selinux_timesync%{?dist} +Release: 0.4.podman%{?dist} License: GPLv3+ and MIT and BSD and Python %global _pkglicensedir %{_licensedir}/%{name} @@ -187,6 +187,9 @@ Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0) %global rolename20 cockpit %deftag 20 1.3.0 +%global rolename21 podman +%deftag 21 1.0.1 + %global mainid e3ac549bee05349d7ae033971448f861415ad608 Source: %{url}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz Source1: %{archiveurl1} @@ -209,17 +212,18 @@ Source17: %{archiveurl17} Source18: %{archiveurl18} Source19: %{archiveurl19} Source20: %{archiveurl20} +Source21: %{archiveurl21} # Not conditionalizing sources per FPC: # https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_do_not_conditionalize_sources # Collections to vendor on RHEL only, Fedora has these available from RPMs Source801: https://galaxy.ansible.com/download/ansible-posix-1.4.0.tar.gz Source901: https://galaxy.ansible.com/download/community-general-6.0.1.tar.gz -#Source902: https://galaxy.ansible.com/download/containers-podman-1.9.4.tar.gz +Source902: https://galaxy.ansible.com/download/containers-podman-1.9.4.tar.gz %if 0%{?rhel} Provides: bundled(ansible-collection(ansible.posix)) = 1.4.0 Provides: bundled(ansible-collection(community.general)) = 6.0.1 -#Provides: bundled(ansible-collection(containers.podman)) = 1.9.4 +Provides: bundled(ansible-collection(containers.podman)) = 1.9.4 %endif # RHEL only, changelog is auto generated on Fedora @@ -290,11 +294,11 @@ for i,v in ipairs(roles) do end %prep -%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -n %{getarchivedir 0} +%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a21 -n %{getarchivedir 0} %if 0%{?rhel} # Untar vendored collection tarballs to corresponding directories -for file in %{SOURCE801} %{SOURCE901}; do +for file in %{SOURCE801} %{SOURCE901} %{SOURCE902}; do if [[ "$(basename $file)" =~ ([^-]+)-([^-]+)-(.+).tar.gz ]]; then ns=${BASH_REMATCH[1]} name=${BASH_REMATCH[2]} @@ -406,6 +410,35 @@ for module in "${!module_map[@]}"; do sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' $role/library/$module done +# containers.podman: +# - library: +# - Module podman_container_info, podman_image and podman_play for the podman role +module_map=( ["podman_container_info.py"]="podman" ["podman_image.py"]="podman" ["podman_play.py"]="podman" ) +for module in "${!module_map[@]}"; do + role="${module_map[${module}]}" + if [ ! -d $role/library ]; then + mkdir $role/library + fi + moduledir=.external/containers/podman/plugins/modules + cp -pL $moduledir/$module $role/library/$module + ls -alrtF $role/library/$module + sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' \ + -e "s/ansible_collections.containers.podman.plugins.module_utils.podman/ansible.module_utils.${role}_lsr/" \ + $role/library/$module +done + +# containers.podman: +# - module_utils: +# - Module_util common for the podman role +module_map=( ["common.py"]="podman" ) +for module in "${!module_map[@]}"; do + role="${module_map[${module}]}" + if [ ! -d $role/module_utils/${role}_lsr ]; then + mkdir -p $role/module_utils/${role}_lsr + fi + cp -pL .external/containers/podman/plugins/module_utils/podman/$module $role/module_utils/${role}_lsr/$module +done + # remove the temporary .external directory after vendoring rm -rf .external @@ -729,6 +762,10 @@ find %{buildroot}%{ansible_roles_dir} -mindepth 1 -maxdepth 1 | \ %endif %changelog +* Thu Nov 17 2022 Rich Megginson - 1.21.0-0.4.podman +- Resolves:rhbz#2143427 : podman - [RFE] role for managing podman containers and systemd + fix role tests with podman 4.3, ansible-core 2.14 + * Wed Nov 16 2022 Rich Megginson - 1.21.0-0.3.ssh_sshd_selinux_timesync - Resolves:rhbz#2128843 : selinux - add support for the 'local' parameter - Resolves:rhbz#2129401 : sshd,ssh,timesync - Unexpected templating type error - expected str instance, int found diff --git a/sources b/sources index 882256e..a6b65c2 100644 --- a/sources +++ b/sources @@ -4,6 +4,7 @@ SHA512 (auto-maintenance-e3ac549bee05349d7ae033971448f861415ad608.tar.gz) = 540f SHA512 (certificate-1.1.6.tar.gz) = c37b00b1a0c3f6c01447ced8c66bc37b97f08d6994020ae855781535858fc1765d5bb44279e285787d71f5b804a3cb1d5e90eb037c780ce0741e2e8d29008793 SHA512 (cockpit-1.3.0.tar.gz) = 74e80b742d4e78add88d64caf1a622849bcef1659a463cfd0456bb0c20105462e8131849fc2a15465db846de6d9a15b53490d2e323579d476809e47377e26694 SHA512 (community-general-6.0.1.tar.gz) = 0f171634062cf4865606d9c770372d06dcccfb57df584fbbd7efdd24cbb5dca69c1cacf102dd6f4bcaecbe63c87c54908dbd72cad2fedd13f5185d12afd714ec +SHA512 (containers-podman-1.9.4.tar.gz) = 65b67e1ab0934989b42abfc915e41e2a748fce9d11e76377f683f5fae39ddb335f6aadb2155b1fa14145e160fdee30f2c7a1b63c8e43b828063f7a4ff6429867 SHA512 (crypto_policies-1.2.6.tar.gz) = bf16a89dca4475b658b8bc8a1d84b2b900b23a5c5440180aa29d56d67e8bdc4f3f7bc0f1acc316e7f1aa3662b0a685532bc179b6aee6e92f5b64d553a942318b SHA512 (firewall-1.4.0.tar.gz) = 8159829a2ae5e9fd795165179b5fb8542727193dc489e78950d50c6554e926027ab340733f9ad8f83debaae9a8f55331d0016a6d023ce8e4e11534587ee41250 SHA512 (ha_cluster-1.8.1.tar.gz) = f6ae98323ee78e0642fd1797416c0215a03339184388c014551366253c8d120e89b290bdd6b48fc525c75afb3626a76160c5b9978da9916c56da817c7cfdba2a @@ -14,6 +15,7 @@ SHA512 (metrics-1.7.3.tar.gz) = 07df961ff1c42255f692e0ff5fa163167aef7ab5a99da030 SHA512 (nbde_client-1.2.6.tar.gz) = 0e05735e4de708aa771079ccda75a13db96b565032d465cb9df7f31f8371091b7f297e257ca778e2fbcc6dfd76524f9b35acaae22b55d20dd96c696b84a6d08a SHA512 (nbde_server-1.1.5.tar.gz) = 25e7824368f02b41f08ba44318c56696e3edf11caed10e4416728c5e8fbc2e0e8c39a9d619031eba4293a139d6c0f4815a0534f3713f950a730212b3606677d8 SHA512 (network-1.10.1.tar.gz) = 5f7b049bf9a2dfc4b2cbce4b019cf02d59e17c378cb2d2790ed1dd0e1d38866b04aa23b73a73b7375aa8d18a173c53e2e2af9ad66f283e1eaf92589cff2d1f01 +SHA512 (podman-1.0.1.tar.gz) = 4e5426e153a41f91c0544d47185e88e4245c7e8649050f4051ef3ff8467cf550bbc89a1ab23b8bb75db822835cdae3944fc2eb769296fb2b41534aee87be9835 SHA512 (postfix-1.2.4.tar.gz) = 8b44036c2220de31e6fb94f5ec30e94cd73133d820df151fcd91e6932ec274c90ac7c91c8e40f13d0fd8a972baa5a0eb1f58340cf310a91ac9134c4ae8f559d1 SHA512 (selinux-1.5.0.tar.gz) = 8779441ef87acc901724f2e402e9a36556a43f227e7aa23bf01e16aa774ffd2681bb7fa35672098d7256c98beaeda1ed022a84e750584a1af04c21552dfe4af0 SHA512 (ssh-1.1.11.tar.gz) = 42f67d11f903bfc645db734aaf8663eb0580bada658b0cb00a36dec926bb26b28991fc8ef71575da33e57ac57cac46fea92df06d7195d3a64f7628ea39c0a4ae