Skip to content

Commit

Permalink
setup: Restrict to ansible version built with Py3.11
Browse files Browse the repository at this point in the history
Very recently on CentOS Stream 8 ansible version got updated to v2.16.3
built with Python 3.12. Due to unavailability of python 3.12 module for
jmespath playbook execution is expected to fail. Therefore restrict
ansible installation to latest version built with Python 3.11 on CentOS
Stream 8.

Signed-off-by: Anoop C S <[email protected]>
  • Loading branch information
anoopcs9 committed Feb 14, 2024
1 parent f984446 commit b933b22
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
5 changes: 5 additions & 0 deletions playbooks/roles/sit.cephfs/tasks/setup/centos8.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: Install ansible
yum:
name: ansible-core-2.16.2
state: latest

- name: Install Python jmespath module
yum:
name:
Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/sit.cephfs/tasks/setup/centos9.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: Install ansible
yum:
name: ansible-core
state: latest

- name: Install Python jmespath module
yum:
name:
Expand Down
15 changes: 7 additions & 8 deletions playbooks/roles/sit.cephfs/tasks/setup/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
- name: Install ansible
yum:
name:
- ansible-core
- ansible-collection-ansible-posix
- ansible-collection-community-general
state: latest

- name: Process OS specific tasks
include_tasks: "{{ include_file }}"
with_first_found:
- files: "{{ config.os[config.nodes[inventory_hostname].os].includes }}"
loop_control:
loop_var: include_file

- name: Install required ansible collections
yum:
name:
- ansible-collection-ansible-posix
- ansible-collection-community-general
state: latest
1 change: 0 additions & 1 deletion playbooks/roles/sit.glusterfs/tasks/setup/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- name: Install gluster-ansible
yum:
name:
- ansible-core
- gluster-ansible-cluster
- gluster-ansible-features
- gluster-ansible-infra
Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/sit.glusterfs/tasks/setup/centos8.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: Install ansible
yum:
name: ansible-core-2.16.2
state: latest

- name: Process common OS tasks
include_tasks: centos.yml

Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/sit.glusterfs/tasks/setup/centos9.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: Install ansible
yum:
name: ansible-core
state: latest

- name: Process common OS tasks
include_tasks: centos.yml

Expand Down

0 comments on commit b933b22

Please sign in to comment.