Docker container management module

This module manages the life cycle of a Docker container running on either on a local machine or other hosts. The following playbook shows how this module works:

---
- name: Docker Module running
hosts: local
tasks:
- name: create a container
docker_container:
name: debianlinux
image: debian:9
pull: yes
state: present

- name: start a container
docker_container:
name: debianlinux
state: started
devices:
- "/dev/sda:/dev/xvda:rwm"

- name: stop a container
docker_container:
name: debianlinux
state: stopped
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.137.64