From 150a7ce13573ccd386d55a8b1ebb3a6fed8d159f Mon Sep 17 00:00:00 2001 From: Eric Engstrom Date: Tue, 20 Apr 2021 11:16:09 -0500 Subject: [PATCH] ignore likely errors if in `ansible_check_mode` --- handlers/main.yml | 1 + tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index 7847bc1..a173b0d 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,3 +1,4 @@ --- - name: restart docker service: "name=docker state={{ docker_restart_handler_state }}" + ignore_errors: "{{ ansible_check_mode }}" diff --git a/tasks/main.yml b/tasks/main.yml index 56449ef..dd90c22 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,6 +16,7 @@ name: docker state: "{{ docker_service_state }}" enabled: "{{ docker_service_enabled }}" + ignore_errors: "{{ ansible_check_mode }}" - name: Ensure handlers are notified now to avoid firewall conflicts. meta: flush_handlers