Skip to content

Commit 972e186

Browse files
committed
common: assert python2 interpreter on OL/RHEL7
1 parent 06bfcba commit 972e186

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- "common: assert python2 interpreter on OL/RHEL7 (oravirt#330)"

roles/common/tasks/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Common playbook - sets up the host generic stuff
22
---
3+
# ansible-oracle needs python2 on some distributions for later installation of cx_Oracle
4+
- name: Check for correct Ansible Interpreter on RHEL/OL 7
5+
ansible.builtin.assert:
6+
quiet: true
7+
that:
8+
- discovered_interpreter_python == '/usr/bin/python'
9+
fail_msg: Set interpreter_python to /usr/bin/python
10+
when:
11+
- ansible_distribution in('OracleLinux', 'RedHat')
12+
- ansible_distribution_major_version == '7'
13+
- interpreter_python is not defined
14+
tags:
15+
- assert
316

417
- name: Check for correct Ansible Version (>= 2.8)
518
ansible.builtin.assert:

0 commit comments

Comments
 (0)