From dd203403dbf6997161ce815a45cb15875175bdba Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Thu, 10 May 2018 16:01:06 +0200 Subject: [PATCH] Use docker_image module instead of command Signed-off-by: Clement Verna --- playbooks/groups/osbs-cluster.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/playbooks/groups/osbs-cluster.yml b/playbooks/groups/osbs-cluster.yml index b59c6ae3aa..e845621970 100644 --- a/playbooks/groups/osbs-cluster.yml +++ b/playbooks/groups/osbs-cluster.yml @@ -711,8 +711,16 @@ handlers: - - name: buildroot container - command: 'docker rmi buildroot; docker build --no-cache --rm -t buildroot /etc/osbs/buildroot/' + - name: Remove the previous buildroot image + docker_image: + state: absent + name: buildroot + + - name: Build the new buildroot container + docker_image: + path: /etc/osbs/buildroot/ + name: buildroot + nocache: yes - name: restart and reload docker service systemd: