Skip to content

Latest commit

 

History

History
105 lines (75 loc) · 4.32 KB

README.md

File metadata and controls

105 lines (75 loc) · 4.32 KB

Ansible Molecule Container

Collection of Dockerfiles to build Container Images that include necessary packages to test Ansible Roles with Molecule.

REUSE status

Table of Content

Container

SLES 12 SP5 - Python2

Container based on sles12sp5:latest that includes Python2 to allow testing Ansible Roles with Molecule.

SLES 12 SP5 - Python2, systemd

Container based on sles12sp5:latest that includes Python2 and systemd to allow testing Ansible Roles with Molecule.

RHEL 7 (UBI) - Python2, systemd

Container based on ubi7/ubi-init:latest:latest that includes Python2 and systemd to allow testing Ansible Roles with Molecule.

How to run systemd Container with Docker

docker run \
--tmpfs /run --tmpfs /tmp \
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro \
--volume /dev/shm --tmpfs /dev/shm:rw,nosuid,nodev,exec,size=64M \
--detach --rm \
--name <containername> \
<image>

The /dev/shm line is nececessary to meet requirements of the included sapconf package in the sles12sp5-python2-systemd container. Can be omitted when using other container or if sapconf isn't required / can be ignored.

Further details why the other tmpfs and volume statements are necessary:

How to use systemd Container with Molecule

platforms:
  - name: <containername>
    image: <image>
    pre_build_image: true
    tmpfs:
      - /run
      - /tmp
      - /dev/shm:rw,nosuid,nodev,exec,size=64M
    volumes:
      - "/sys/fs/cgroup:/sys/fs/cgroup:ro"
      - "/dev/shm"

See How to run systemd Container with Docker section above for information about /dev/shm.

Source

The primary location is: https://git.sr.ht/~wombelix/ansible-molecule-container

Mirrors of the repository are available on Codeberg, Gitlab and Github.

Contribute

Don't hesitate to provide Feedback, open an Issue or create an Pull / Merge Request.

Just pick the workflow or platform you prefer and are most comfortable with.

Feedback, Bug Reports or Patches via Email are also always welcome.

License

Unless otherwise stated: GNU General Public License v3.0 or later

All files contain license information either as header comment or corresponding .license file.

REUSE from the FSFE implemented to verify license and copyright compliance.