From 103561bfdf471ce6ed48c24684c2d34a51439b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= Date: Wed, 10 Jun 2015 12:20:57 +0000 Subject: [PATCH] Use ansible docker module to remove services --- resources/glance_api_service/actions/remove.yml | 8 +++++--- resources/glance_registry_service/actions/remove.yml | 8 +++++--- resources/haproxy_service/actions/remove.yml | 8 +++++--- resources/keystone_service/actions/remove.yml | 7 +++++-- resources/rabbitmq_service/actions/remove.yml | 1 - 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/resources/glance_api_service/actions/remove.yml b/resources/glance_api_service/actions/remove.yml index d3c3149f..36c74c18 100644 --- a/resources/glance_api_service/actions/remove.yml +++ b/resources/glance_api_service/actions/remove.yml @@ -1,6 +1,8 @@ - - hosts: [{{ ip }}] sudo: yes tasks: - - shell: docker stop {{ name }} - - shell: docker rm {{ name }} + - name: glance api container + docker: + name: {{ name }} + image: {{ image }} + state: absent diff --git a/resources/glance_registry_service/actions/remove.yml b/resources/glance_registry_service/actions/remove.yml index d3c3149f..a7c29381 100644 --- a/resources/glance_registry_service/actions/remove.yml +++ b/resources/glance_registry_service/actions/remove.yml @@ -1,6 +1,8 @@ - - hosts: [{{ ip }}] sudo: yes tasks: - - shell: docker stop {{ name }} - - shell: docker rm {{ name }} + - name: glance registry container + docker: + name: {{ name }} + image: {{ image }} + state: absent diff --git a/resources/haproxy_service/actions/remove.yml b/resources/haproxy_service/actions/remove.yml index d3c3149f..a686005d 100644 --- a/resources/haproxy_service/actions/remove.yml +++ b/resources/haproxy_service/actions/remove.yml @@ -1,6 +1,8 @@ - - hosts: [{{ ip }}] sudo: yes tasks: - - shell: docker stop {{ name }} - - shell: docker rm {{ name }} + - name: haproxy container + docker: + name: {{ name }} + image: {{ image }} + state: absent diff --git a/resources/keystone_service/actions/remove.yml b/resources/keystone_service/actions/remove.yml index 76142acf..ea815de9 100644 --- a/resources/keystone_service/actions/remove.yml +++ b/resources/keystone_service/actions/remove.yml @@ -2,5 +2,8 @@ - hosts: [{{ ip }}] sudo: yes tasks: - - shell: docker stop {{ name }} - - shell: docker rm {{ name }} + - name: keystone container + docker: + image: {{ image }} + name: {{ name }} + state: absent diff --git a/resources/rabbitmq_service/actions/remove.yml b/resources/rabbitmq_service/actions/remove.yml index 3230633a..77d2b98a 100644 --- a/resources/rabbitmq_service/actions/remove.yml +++ b/resources/rabbitmq_service/actions/remove.yml @@ -1,4 +1,3 @@ -# TODO - hosts: [{{ ip }}] sudo: yes tasks: