Always update Vagrant Boxes before using

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
This commit is contained in:
Martin Schurz 2024-02-04 15:42:09 +01:00
parent 4c4721c32f
commit 063f3190b8
5 changed files with 8 additions and 23 deletions

View file

@ -58,6 +58,10 @@ jobs:
path: ansible_collections/devsec/hardening
submodules: true
- name: Update Vagrant Box
run: |
vagrant box update --box ${{ matrix.molecule_distro }}
- name: Test with molecule
run: |
molecule --version

View file

@ -47,6 +47,10 @@ jobs:
path: ansible_collections/devsec/hardening
submodules: true
- name: Update Vagrant Box
run: |
vagrant box update --box generic/${{ matrix.molecule_distro }}
- name: Test with molecule
run: |
molecule --version

View file

@ -1,15 +1,4 @@
---
- 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:

View file

@ -9,12 +9,6 @@
ansible.builtin.raw: pkg_add python%3.10
changed_when: false
when: lookup('env', 'MOLECULE_DISTRO') == 'openbsd7'
- 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

View file

@ -3,12 +3,6 @@
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'
- name: Use the type command instead of which to detect existing commands
ansible.builtin.file:
src: /usr/bin/which