Use 'become' for destroy container playbook.

Due to the use of delegation to localhost in this task,
we also need to set 'become' otherwise the task does not
have access to the socket because it's executed as the
user running the playbook (zuul).

Change-Id: I999aa55269348497154a8eb073c2ff663242af4e
This commit is contained in:
Marc Gariepy 2018-07-12 10:20:33 -04:00
parent 63fd37eb5e
commit 03f9f1fdc5

View File

@ -16,6 +16,12 @@
- name: Playbook for destroying test containers - name: Playbook for destroying test containers
hosts: all_containers hosts: all_containers
remote_user: root remote_user: root
# Due to the use of delegation to localhost
# in this task, we also need to set 'become'
# otherwise the task does not have access to
# the socket because it's executed as the
# user running the playbook (zuul).
become: yes
gather_facts: false gather_facts: false
tasks: tasks:
- name: Destroy a container - name: Destroy a container