Skip to content

Instantly share code, notes, and snippets.

@TomaszKlosinski
Created May 16, 2017 12:33
Show Gist options
  • Save TomaszKlosinski/19fb6f1e0fe350c0cdc8184c73851807 to your computer and use it in GitHub Desktop.
Save TomaszKlosinski/19fb6f1e0fe350c0cdc8184c73851807 to your computer and use it in GitHub Desktop.
Molecule configuration for testing Ansible role of a systemd-based service in a docker container
---
dependency:
name: galaxy
driver:
name: docker
docker:
containers:
- name: ansible-role-nginx
image: williamyeh/ansible
image_version: centos7
ansible_groups:
- nginx
port_bindings: { 80: 80 }
privileged: True
volume_mounts:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
environment: { container: docker }
verifier:
name: testinfra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment