tripleo-quickstart/playbooks/teardown-provision.yml
Lars Kellogg-Stedman 0cec56d80b fix teardown (tagging and ansible_user)
This patch fixes two large problems with our teardown logic:

(a) the tags applied to the teardown plays combined with the way we
were calling ansible in quickstart.sh meant that we never executed the
teardown tasks with the default `OPT_TEARDOWN=nodes` behavior.

(b) We were calling all of the teardown tasks at the same point, which
meant that the environment and node teardown tasks were being called
with `ansible_user=root`.  This meant that the node teardown in
particular was a no-op, because the libvirt environment of the stack
user was invisible to the tasks running as root.

With this change in place, I can successfully run quickstart.sh
several times in a row without error (previously this would fail
because the teardown tasks wouldn't execute, causing conflicts)

Change-Id: Ic94241c1d87b2dae335c6cb6627a4fdb5419482e
Closes-bug: 1610677
Closes-bug: 1610537
2016-08-11 10:57:36 -04:00

10 lines
248 B
YAML

# Finally, we conditionally remove basic setup (users,
# groups, directories)to start from scratch
- name: Tear down non-root user on virt host
hosts: virthost
roles:
- provision/teardown
tags:
- teardown-provision
- teardown-all