Skip to content

arnaudblancher/ansible-role-docker_unprovisionning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arnaudblancher.docker_unprovisionning

Goal: destroy dockers containers with ansible role arnaudblancher.docker_unprovisonning

This role is the companion of arnaudblancher.docker_provisionning witch take an ansible inventory and create one docker container for each listed hosts.

Requirements

  • docker-engine

Make sure your have a docker-engine running, test with (probably as root ...)

docker info

Role Variables

please see defaults/main.yml

Dependencies

None

Example Playbook

Please see subdirectory ./demo/

cat demo/docker-unprovisionning.yml

- name: "remove docker containers and network"
  hosts: localhost
  gather_facts: no

  roles:
    - { role : arnaudblancher.docker_unprovisionning,
      docker_unprovisionning_net: "ansible_myplateform" }

cat inventory/docker/000_hosts

[mysql]
dock-mysql

[apache]
dock-apache

[all:vars]
ansible_connection=docker

call :

ansible-playbook -i ./inventory/docker/ docker-unprovisionning.yml

Of course, you could use the same inventory for create and destroy yours containers.

License

GPLv3

Author Information

Arnaud Blancher

https://github.com/arnaudblancher/ansible-role-docker_unprovisionning

About

remove docker container create by docker_provisionning (see https://github.com/arnaudblancher/ansible-role-docker_provisionning)

Resources

Stars

Watchers

Forks

Packages

No packages published