From b20a0b5495d99a923899aa68b7fcb98e29719404 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 19 May 2022 12:43:20 -0500 Subject: [PATCH] ansible-server: Use RPM collection packages We now have all the collections that are used by Fedora Infra packaged for EPEL 8 (the ansible control host runs on RHEL 8, as far as I know), except community.postgresql. ansible-collection-community-rabbitmq[1] and ansible-collection-community-libvirt[2] are new packages that are still in epel8-next testing, so I would wait to merge this until they're pushed. I would also recommend clearing the current collections directory (`rm -rf ~/.ansible/ansible_collections/*`) before merging this to ensure that ansible uses the packaged versions and not the old versions that were installed with ansible-galaxy. [1]: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-a7237cc021 [2]: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-a9ccbc0012 Signed-off-by: Maxwell G --- roles/ansible-server/files/requirements.yml | 26 +-------------------- roles/ansible-server/tasks/main.yml | 14 +++++++---- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/roles/ansible-server/files/requirements.yml b/roles/ansible-server/files/requirements.yml index 25a79a88c5..cc4fdcee64 100644 --- a/roles/ansible-server/files/requirements.yml +++ b/roles/ansible-server/files/requirements.yml @@ -1,30 +1,6 @@ --- collections: - - name: ansible.posix - type: git - source: https://github.com/ansible-collections/ansible.posix.git - version: 1.3.0 - - name: community.general - type: git - source: https://github.com/ansible-collections/community.general.git - version: 4.6.1 - - name: community.libvirt - type: git - source: https://github.com/ansible-collections/community.libvirt.git - version: 1.0.2 - - name: community.mysql - type: git - source: https://github.com/ansible-collections/community.mysql.git - version: 3.1.2 - name: community.postgresql type: git source: https://github.com/ansible-collections/community.postgresql.git - version: 2.1.2 - - name: community.docker - type: git - source: https://github.com/ansible-collections/community.docker.git - version: 2.3.0 - - name: community.rabbitmq - type: git - source: https://github.com/ansible-collections/community.rabbitmq.git - version: 1.1.0 + version: 2.1.5 diff --git a/roles/ansible-server/tasks/main.yml b/roles/ansible-server/tasks/main.yml index d107e2c595..0e5a064753 100644 --- a/roles/ansible-server/tasks/main.yml +++ b/roles/ansible-server/tasks/main.yml @@ -3,10 +3,16 @@ # Setup ansible-server instance # - name: install needed packages - package: name={{ item }} state=present - with_items: - - ansible-core - - git + package: + name: + - ansible-core + - git + - ansible-collection-community-posix + - ansible-collection-community-general + - ansible-collection-community-mysql + - ansible-collection-community-docker + - ansible-collection-community-libvirt + - ansible-collection-community-rabbitmq tags: - packages - ansible-server