From 03f9f1fdc5666162aedc438f2f819d2472823ebb Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Thu, 12 Jul 2018 10:20:33 -0400 Subject: [PATCH] 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 --- destroy_containers.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/destroy_containers.yml b/destroy_containers.yml index 8554b19b..faa35ee7 100644 --- a/destroy_containers.yml +++ b/destroy_containers.yml @@ -16,6 +16,12 @@ - name: Playbook for destroying test containers hosts: all_containers 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 tasks: - name: Destroy a container