mirror of
https://github.com/geerlingguy/ansible-for-devops.git
synced 2024-05-19 06:50:03 +00:00
Fixes #531: systemd with molecule Docker containers requires cgroupns set to host and rw.
This commit is contained in:
@@ -12,7 +12,8 @@ platforms:
|
|||||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
|
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest"
|
||||||
command: ""
|
command: ""
|
||||||
volumes:
|
volumes:
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||||
|
cgroupns_mode: host
|
||||||
privileged: true
|
privileged: true
|
||||||
pre_build_image: true
|
pre_build_image: true
|
||||||
provisioner:
|
provisioner:
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ pip3 install ansible
|
|||||||
cd orchestration/scripts
|
cd orchestration/scripts
|
||||||
|
|
||||||
# Test Django app installation.
|
# Test Django app installation.
|
||||||
docker run -d --name app -p 80:80 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro geerlingguy/docker-rockylinux8-ansible
|
docker run -d --name app -p 80:80 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host geerlingguy/docker-rockylinux8-ansible
|
||||||
./app.sh
|
./app.sh
|
||||||
|
|
||||||
# Test Django db installation.
|
# Test Django db installation.
|
||||||
docker run -d --name db -p 3360:3360 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro geerlingguy/docker-rockylinux8-ansible
|
docker run -d --name db -p 3360:3360 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host geerlingguy/docker-rockylinux8-ansible
|
||||||
./db.sh
|
./db.sh
|
||||||
|
|
||||||
# Other tests from the book.
|
# Other tests from the book.
|
||||||
|
|||||||
Reference in New Issue
Block a user