Coder Social home page Coder Social logo

chzerv / debian9-systemd-ansible Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

Debian 9 (Stretch) container capable to use systemd, for Ansible role and playbook testing.

License: MIT License

Dockerfile 100.00%
debian 9 systemd ansible container testing

debian9-systemd-ansible's Introduction

Debian 9 (Stretch) Container Image for Ansible Testing

This Dockerfile builds a Debian 9 (Stretch) 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/chzerv/debian9-systemd-ansible.git
  3. cd into the directory and run docker build -t debian9-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 chzerv/debian9-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 debian9-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:-debian9}-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.

debian9-systemd-ansible's People

Contributors

chzerv avatar

Stargazers

 avatar

Watchers

 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.