Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/assert_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- "common: assert python2 interpreter on OL/RHEL7 (oravirt#330)"
13 changes: 13 additions & 0 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Common playbook - sets up the host generic stuff
---
# ansible-oracle needs python2 on some distributions for later installation of cx_Oracle
- name: Check for correct Ansible Interpreter on RHEL/OL 7
ansible.builtin.assert:
quiet: true
that:
- discovered_interpreter_python == '/usr/bin/python'
fail_msg: Set interpreter_python to /usr/bin/python
when:
- ansible_distribution in('OracleLinux', 'RedHat')
- ansible_distribution_major_version == '7'
- interpreter_python is not defined
tags:
- assert

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