Skip to content

Commit

Permalink
Add pre tasks to converge playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
drmatthews committed Dec 18, 2023
1 parent b1c8d52 commit 60540ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 13 additions & 0 deletions tests/molecule/resources/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
hosts: all
become: true
gather_facts: true
pre_tasks:
- name: Check the major Python version for the OS
tags: python
block:
- name: Check default version
ansible.builtin.include_role:
name: mirsg.infrastructure.install_python
tasks_from: check_default_version

- name: Set install_python variable based on the version to be installed
ansible.builtin.set_fact:
install_python: "{{ install_python2 if default_python_version is version('2') else install_python3 }}"

roles:
- role: mirsg.infrastructure.provision
tags: provision
Expand Down
12 changes: 0 additions & 12 deletions tests/molecule/resources/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@
regexp: "^FirewallBackend="
line: FirewallBackend=iptables

- name: Check the major Python version for the OS
tags: python
block:
- name: Check default version
ansible.builtin.include_role:
name: mirsg.infrastructure.install_python
tasks_from: check_default_version

- name: Set install_python variable based on the version to be installed
ansible.builtin.set_fact:
install_python: "{{ install_python2 if default_python_version is version('2') else install_python3 }}"

- name: Setup for PostgreSQL
tags: postgresql
block:
Expand Down

0 comments on commit 60540ca

Please sign in to comment.