From f2eb6caf2975b4c09b9216915c83a8f4db45e291 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 4 Apr 2022 14:27:00 -0700 Subject: [PATCH] Revert "Revert "batcave: switch to ansible-core + some collections instead of ansible 'classic'"" This reverts commit dc1f503bdd56351c5b68375aaade64787f7c413a. --- roles/ansible-server/files/requirements.yml | 30 +++++++++++++++++++++ roles/ansible-server/tasks/main.yml | 17 ++++-------- roles/batcave/tasks/main.yml | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 roles/ansible-server/files/requirements.yml diff --git a/roles/ansible-server/files/requirements.yml b/roles/ansible-server/files/requirements.yml new file mode 100644 index 0000000000..25a79a88c5 --- /dev/null +++ b/roles/ansible-server/files/requirements.yml @@ -0,0 +1,30 @@ +--- +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 diff --git a/roles/ansible-server/tasks/main.yml b/roles/ansible-server/tasks/main.yml index fc034dfd4f..835b7a18b5 100644 --- a/roles/ansible-server/tasks/main.yml +++ b/roles/ansible-server/tasks/main.yml @@ -5,7 +5,7 @@ - name: install needed packages package: name={{ item }} state=present with_items: - - ansible + - ansible-core - git tags: - packages @@ -21,14 +21,7 @@ tags: - ansible-server -# https://github.com/ansible/ansible-modules-core/pull/4070 -#- name: Fix the nova_compute module -# patch: src=4070.patch -# dest=/usr/lib/python2.7/site-packages/ansible/modules/cloud/openstack/_nova_compute.py -# -# -# TODO: -# cgit? -# rbac-playbook? -# zodbot notifications? -# +- name: install required collections + command: ansible-galaxy install -r files/requirements.yml + tags: + - ansible-server diff --git a/roles/batcave/tasks/main.yml b/roles/batcave/tasks/main.yml index af1f19e92e..a90c57eb80 100644 --- a/roles/batcave/tasks/main.yml +++ b/roles/batcave/tasks/main.yml @@ -25,7 +25,7 @@ package: name={{ item }} state=present with_items: - srm # secure rm to delete sensitive files. - - ansible # This is our ansible master, needs ansible installed. + - ansible-core # This is our ansible master, needs ansible installed. - ansible_utils # Needed for rbac-playbook - yum-rhn-plugin # Needed for rhn sync - createrepo_c # Needed for rhn sync