OpenSUSE 15 Image for Ansible testing
1.1K
OpenSUSE (Leap) 15 Docker container for Ansible playbook and role testing.
This container is used to test Ansible roles and playbooks (e.g. with molecule) running locally inside the container.
A non-priviledged user ansible is created with password-less sudo configured.
The following tags are available:
latest: Latest stable version of Ansible on Python 3.xThis image is built on Docker Hub automatically any time the upstream OS container is rebuilt, and any time a commit is made or merged to the master branch. But if you need to build the image on your own locally, do the following:
cd into this directory.docker build -t opensuse15-ansible .opensuse15-ansible:latest.docker pull timgrt/opensuse15-ansible:latest
--volume=`pwd`:/etc/ansible/roles/role_under_test:ro.docker run --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro timgrt/opensuse15-ansible:latest
docker exec --tty [container_id] env TERM=xterm ansible --version
docker exec --tty [container_id] env TERM=xterm ansible-playbook /path/to/ansible/playbook.yml
For example:
---
driver:
name: docker
platforms:
- name: opensuse15
image: timgrt/opensuse15-ansible:latest
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
command: "/sbin/init"
pre_build_image: true
provisioner:
name: ansible
config_options:
defaults:
interpreter_python: auto_silent
callback_whitelist: profile_tasks, timer, yaml
stdout_callback: yaml
ssh_connection:
pipelining: false
inventory:
host_vars:
opensuse15:
ansible_user: ansible
Created 2021 by Tim Grützmacher, inspired by Jeff Geerling
Content type
Image
Digest
Size
208 MB
Last updated
over 5 years ago
docker pull timgrt/opensuse15-ansible