Skip to content

Commit 585cd88

Browse files
committed
Use Python3 for OpenBSD tests
Signed-off-by: Martin Schurz <[email protected]>
1 parent 66a48b4 commit 585cd88

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

molecule/ssh_hardening_bsd/converge.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
---
2+
- name: Prepare OpenBSD host
3+
hosts: all
4+
become: true
5+
gather_facts: false
6+
tasks:
7+
- name: Use Python 3 on OpenBSD
8+
ansible.builtin.set_fact:
9+
ansible_python_interpreter: /usr/bin/python3
10+
changed_when: false
11+
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'
12+
213
- name: Wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
314
hosts: all
415
environment:

molecule/ssh_hardening_bsd/prepare.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
ansible.builtin.raw: pkg_add python%3.10
1010
changed_when: false
1111
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'
12+
13+
- name: Use Python 3 on OpenBSD
14+
ansible.builtin.set_fact:
15+
ansible_python_interpreter: /usr/bin/python3
16+
changed_when: false
17+
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'
1218

1319
- name: Wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
1420
hosts: all

molecule/ssh_hardening_bsd/verify.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
hosts: all
44
become: true
55
tasks:
6+
- name: Use Python 3 on OpenBSD
7+
ansible.builtin.set_fact:
8+
ansible_python_interpreter: /usr/bin/python3
9+
changed_when: false
10+
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'
11+
612
- name: Use the type command instead of which to detect existing commands
713
ansible.builtin.file:
814
src: /usr/bin/which

0 commit comments

Comments
 (0)