Giter VIP home page Giter VIP logo

almalinux8-systemd-ansible's Introduction

AlmaLinux 8 Container Image for Ansible Testing

This Dockerfile builds an AlmaLinux 8.9 based container, capable of using systemd, mainly for Ansible role testing.

How to build locally

  1. Install Docker.

  2. Clone the repository:

    git clone https://github.com/wfelipew/almalinux8-systemd-ansible.git
  3. cd into the directory and run docker build -t almalinux8-systemd-ansible .

docker can be substituted for any other container engine, e.g., Podman.

How to use

  1. Install Docker.

  2. Pull this image from Docker hub:

    docker pull wfelipew/almalinux8-systemd-ansible:latest

If you built the image locally, you can use that instead.

Now, you can either run commands directly inside the container:

docker run -d --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro almalinux8-systemd-ansible:latest ansible --version

Or, you can use it with molecule:

# molecule/default/molecule.yml
---
dependency:
  name: galaxy
driver:
  name: docker
lint: |
  set -e
  yamllint .
  ansible-lint
platforms:
  - name: instance
    image: "chzerv/${IMAGE:-almalinux8}-systemd-ansible:latest"
    command: ${DOCKER_COMMAND:-""}
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    privileged: true
    pre_build_image: true
provisioner:
  name: ansible
  playbooks:
    converge: "${MOLECULE_PLAYBOOK:-converge.yml}"
verifier:
  name: ansible

Notes

This image is used for testing Ansible roles and playbooks locally and/or in CI, hence, security is not a concern. It is not intended or recommended to use this image in production environments.

almalinux8-systemd-ansible's People

Contributors

wfelipew avatar chzerv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.