diff --git a/examples/resources/simple/haproxy/remove.yml b/examples/resources/simple/haproxy/remove.yml new file mode 100644 index 00000000..d7420fec --- /dev/null +++ b/examples/resources/simple/haproxy/remove.yml @@ -0,0 +1,5 @@ + +- hosts: [service/haproxy] + sudo: yes + tasks: + - shell: docker rm -f {{ name }} || true diff --git a/examples/resources/simple/haproxy/run.yml b/examples/resources/simple/haproxy/run.yml index f9aff6b3..d2604c4f 100644 --- a/examples/resources/simple/haproxy/run.yml +++ b/examples/resources/simple/haproxy/run.yml @@ -5,7 +5,6 @@ - file: state=directory path=/etc/solar/{{name}} # TODO Remove hardcoded path - template: src=/vagrant/examples/resources/templates/haproxy.cfg.j2 dest=/etc/solar/{{name}}/haproxy.cfg backup=yes - - shell: docker rm -f {{name}} || true - shell: docker run -d \ --net="host" \ --privileged \ diff --git a/examples/resources/simple/keystone/remove.yml b/examples/resources/simple/keystone/remove.yml new file mode 100644 index 00000000..f2d9cb2d --- /dev/null +++ b/examples/resources/simple/keystone/remove.yml @@ -0,0 +1,5 @@ + +- hosts: [service/keystone] + sudo: yes + tasks: + - shell: docker rm -f {{ name }} || true diff --git a/examples/resources/simple/keystone/run.yml b/examples/resources/simple/keystone/run.yml index 4891a874..1dff9800 100644 --- a/examples/resources/simple/keystone/run.yml +++ b/examples/resources/simple/keystone/run.yml @@ -2,7 +2,6 @@ - hosts: [service/keystone] sudo: yes tasks: - - shell: docker rm -f {{name}} || true # NOTE(eli): specify restart policy (--restart parameter) for # keystone conatiner if there are more than 2 keystone containers # to be deployed, they both will perform db migration and will fail, diff --git a/examples/resources/simple/mariadb/remove.yml b/examples/resources/simple/mariadb/remove.yml index b1afd0e4..edbad24a 100644 --- a/examples/resources/simple/mariadb/remove.yml +++ b/examples/resources/simple/mariadb/remove.yml @@ -1,6 +1,5 @@ -- hosts: [mariadb] +- hosts: [service/mariadb] sudo: yes tasks: - - shell: docker stop {{ mariadb.name }} - - shell: docker rm {{ mariadb.name }} + - shell: docker rm -f {{ name }} || true diff --git a/examples/resources/simple/mariadb/run.yml b/examples/resources/simple/mariadb/run.yml index 839eaf36..a76e7e5b 100644 --- a/examples/resources/simple/mariadb/run.yml +++ b/examples/resources/simple/mariadb/run.yml @@ -2,7 +2,6 @@ - hosts: [service/mariadb] sudo: yes tasks: - - shell: docker rm -f {{name}} || true - shell: docker run \ -d \ --net="host" \ diff --git a/templates/profile.yml b/templates/profile.yml index 991e5f51..54ba1cd3 100644 --- a/templates/profile.yml +++ b/templates/profile.yml @@ -20,5 +20,7 @@ run: - haproxy.actions.run remove: + - haproxy.actions.remove + - keystone.actions.remove - mariadb.actions.remove - docker.actions.remove