Skip to content

Commit

Permalink
setup: Install jmespath python module using pip
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 switch the
python module installation from RPMs to pip where it can be versionized.

Signed-off-by: Anoop C S <[email protected]>
  • Loading branch information
anoopcs9 committed Feb 15, 2024
1 parent d8fd8c1 commit 4f80db3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
14 changes: 10 additions & 4 deletions playbooks/roles/sit.cephfs/tasks/setup/centos8.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
- name: Install Python jmespath module
yum:
name:
- python3.11-jmespath
state: latest
block:
- name: Install pip
yum:
name: python3.12-pip
state: latest

- name: Install jmespath
pip:
executable: pip3.12
name: jmespath
13 changes: 9 additions & 4 deletions playbooks/roles/sit.cephfs/tasks/setup/centos9.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
- name: Install Python jmespath module
yum:
name:
- python3-jmespath
state: latest
block:
- name: Install pip
yum:
name: python3-pip
state: latest

- name: Install jmespath
pip:
name: jmespath
14 changes: 10 additions & 4 deletions playbooks/roles/sit.glusterfs/tasks/setup/centos8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
include_tasks: centos.yml

- name: Install Python jmespath module
yum:
name:
- python3.11-jmespath
state: latest
block:
- name: Install pip
yum:
name: python3.12-pip
state: latest

- name: Install jmespath
pip:
executable: pip3.12
name: jmespath
13 changes: 9 additions & 4 deletions playbooks/roles/sit.glusterfs/tasks/setup/centos9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
include_tasks: centos.yml

- name: Install Python jmespath module
yum:
name:
- python3-jmespath
state: latest
block:
- name: Install pip
yum:
name: python3-pip
state: latest

- name: Install jmespath
pip:
name: jmespath

0 comments on commit 4f80db3

Please sign in to comment.