Skip to content

Commit

Permalink
run molecule as root in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi8080 committed Jul 12, 2024
1 parent f4dcdbc commit 5af081b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
26 changes: 3 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy

jobs:
molecule:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
distro:
Expand All @@ -34,28 +34,8 @@ jobs:
- name: Install molecule
run: pip3 install ansible molecule molecule-docker

- name: Run molecule create
run: molecule create
env:
MOLECULE_DISTRO: ${{ matrix.distro.image }}
MOLECULE_INSTANCE_NAME: ${{ matrix.distro.instance }}
MOLECULE_BEATS_FLAVOR: ${{ matrix.beats_flavor }}

- name: Check docker
run: docker --version && docker ps -a

- name: Run molecule prepare
run: molecule prepare
env:
MOLECULE_DISTRO: ${{ matrix.distro.image }}
MOLECULE_INSTANCE_NAME: ${{ matrix.distro.instance }}
MOLECULE_BEATS_FLAVOR: ${{ matrix.beats_flavor }}

- name: Check docker__
run: docker --version && docker ps -a

- name: Run molecule
run: molecule converge
- name: Run molecule test
run: sudo molecule test
env:
MOLECULE_DISTRO: ${{ matrix.distro.image }}
MOLECULE_INSTANCE_NAME: ${{ matrix.distro.instance }}
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Prepare
hosts: all
gather_facts: false
gather_facts: true
roles:
- nkakouros.easyrsa
pre_tasks:
Expand Down

0 comments on commit 5af081b

Please sign in to comment.