Skip to content

Commit

Permalink
Use Python3 for OpenBSD tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Schurz <[email protected]>
  • Loading branch information
schurzi committed Feb 4, 2024
1 parent 66a48b4 commit 585cd88
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions molecule/ssh_hardening_bsd/converge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
---
- name: Prepare OpenBSD host
hosts: all
become: true
gather_facts: false
tasks:
- name: Use Python 3 on OpenBSD
ansible.builtin.set_fact:
ansible_python_interpreter: /usr/bin/python3
changed_when: false
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'

- name: Wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
hosts: all
environment:
Expand Down
6 changes: 6 additions & 0 deletions molecule/ssh_hardening_bsd/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
ansible.builtin.raw: pkg_add python%3.10
changed_when: false
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'

Check failure on line 12 in molecule/ssh_hardening_bsd/prepare.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[trailing-spaces]

Trailing spaces
- name: Use Python 3 on OpenBSD
ansible.builtin.set_fact:
ansible_python_interpreter: /usr/bin/python3
changed_when: false
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'

- name: Wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
hosts: all
Expand Down
6 changes: 6 additions & 0 deletions molecule/ssh_hardening_bsd/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
hosts: all
become: true
tasks:
- name: Use Python 3 on OpenBSD
ansible.builtin.set_fact:
ansible_python_interpreter: /usr/bin/python3
changed_when: false
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'

Check failure on line 11 in molecule/ssh_hardening_bsd/verify.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[trailing-spaces]

Trailing spaces
- name: Use the type command instead of which to detect existing commands
ansible.builtin.file:
src: /usr/bin/which
Expand Down

0 comments on commit 585cd88

Please sign in to comment.