Run molecule test in rootless mode
See: - https://github.com/actions/virtual-environments/issues/3536 - https://github.com/ansible-community/molecule/discussions/3155
This commit is contained in:
parent
4185f44164
commit
be3e1a07ee
|
|
@ -35,17 +35,20 @@ jobs:
|
|||
playbook: converge.yml
|
||||
|
||||
steps:
|
||||
# see https://github.com/actions/virtual-environments/issues/3536#issuecomment-858433636)
|
||||
# - name: Set rights for podman
|
||||
# run: sudo chmod o+rwx -R /sys/fs/cgroup/systemd
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install requirements
|
||||
run: |
|
||||
sudo python3 -m pip install --upgrade pip
|
||||
sudo python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r requirements.txt
|
||||
# This is necessary on GH Actions to allow running systemd in rootless containers
|
||||
# see: https://github.com/actions/virtual-environments/issues/3536
|
||||
# see: https://github.com/ansible-community/molecule/discussions/3155
|
||||
- name: Start systemd user service
|
||||
run: |
|
||||
loginctl enable-linger $(whoami)
|
||||
sleep 1
|
||||
- name: Run molecule
|
||||
# using sudo see https://github.com/actions/virtual-environments/issues/3536
|
||||
run: sudo molecule test
|
||||
run: molecule test
|
||||
env:
|
||||
PY_COLORS: "1"
|
||||
ANSIBLE_FORCE_COLOR: "1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue