From b12e1205e0c5c27d296b4ead1b6dd56a25cbacfe Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Tue, 31 Jul 2018 16:31:26 -0500 Subject: [PATCH] Change command for shell The nspawn container destory command uses a pipe which is not allowed in the command module. To correct this the shell module is used. Change-Id: I7dacedfb62e9fd70d7b7c3130ac5af3d05711024 Signed-off-by: Kevin Carter --- playbooks/containers-nspawn-destroy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/containers-nspawn-destroy.yml b/playbooks/containers-nspawn-destroy.yml index 7e0bb71e63..05aa79e614 100644 --- a/playbooks/containers-nspawn-destroy.yml +++ b/playbooks/containers-nspawn-destroy.yml @@ -51,7 +51,7 @@ delegate_to: "{{ physical_host }}" - name: Get machine-id - command: >- + shell: >- hostnamectl --machine="{{ inventory_hostname }}" status | awk '/Machine ID/ {print $3}' register: _container_machine_id delegate_to: "{{ physical_host }}"