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
22 changes: 3 additions & 19 deletions molecule/almalinux-9/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false
- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml

- name: Prepare AlmaLinux
hosts: all
Expand All @@ -26,4 +10,4 @@
path: /etc/shadow
mode: '0640'
owner: root
group: root
group: root
20 changes: 2 additions & 18 deletions molecule/archlinux/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false
- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml

- name: Prepare ArchLinux
hosts: all
Expand Down
22 changes: 3 additions & 19 deletions molecule/centos-stream-9-enterprise/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false
- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml

- name: Prepare CentOS
hosts: all
Expand All @@ -26,4 +10,4 @@
path: /etc/shadow
mode: '0640'
owner: root
group: root
group: root
22 changes: 3 additions & 19 deletions molecule/centos-stream-9/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false
- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml

- name: Prepare CentOS
hosts: all
Expand All @@ -26,4 +10,4 @@
path: /etc/shadow
mode: '0640'
owner: root
group: root
group: root
23 changes: 4 additions & 19 deletions molecule/debian-13-enterprise/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false

- name: Prepare Debian
hosts: all
gather_facts: false
tasks:
- name: Bootstrap Python
ansible.builtin.raw: "test -e /usr/bin/python || apt-get install --update python3 -y"
changed_when: true

- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml
23 changes: 4 additions & 19 deletions molecule/debian-13/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false

- name: Prepare Debian
hosts: all
gather_facts: false
tasks:
- name: Bootstrap Python
ansible.builtin.raw: "test -e /usr/bin/python || apt-get install --update python3 -y"
changed_when: true

- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml
29 changes: 26 additions & 3 deletions molecule/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Prepare
- name: Prepare host
hosts: localhost
connection: local

Expand All @@ -9,11 +9,34 @@
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
package:
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
pip:
ansible.builtin.pip:
name: netaddr
become: false

- name: Stub out vault enterprise service
hosts: all
tasks:
- name: Prepare CI environment
when:
- "'enterprise' in lookup('env', 'MOLECULE_SCENARIO_DIRECTORY')"
- ansible_service_mgr == "systemd"
block:
- name: Make sure dropin directory exists
ansible.builtin.file:
path: /etc/systemd/system/vault.service.d/
state: directory
mode: '0755'

- name: Write dropin file
ansible.builtin.copy:
dest: /etc/systemd/system/vault.service.d/fake-service.conf
mode: '0644'
content: |
[Service]
ExecStart=
ExecStart=/usr/bin/sleep 100000
22 changes: 3 additions & 19 deletions molecule/rockylinux-9/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
---
- name: Prepare controlling host
hosts: localhost
connection: local

tasks:
- name: Prepare CI environment
when: lookup('env', 'CI') is truthy
block:
- name: Install OS packages on controlling host
when: ansible_distribution != 'MacOSX'
ansible.builtin.package:
name: unzip
become: true

- name: Install netaddr dependency on controlling host
ansible.builtin.pip:
name: netaddr
become: false
- name: Common prepare
ansible.builtin.import_playbook: ../prepare.yml

- name: Prepare Rocky
hosts: all
Expand All @@ -26,4 +10,4 @@
path: /etc/shadow
mode: '0640'
owner: root
group: root
group: root