From ace0d8aebe92474f1348c39b4c03b81bb903cb78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o?= <theo@le-filament.com>
Date: Tue, 28 Sep 2021 10:24:27 +0200
Subject: [PATCH] fix dockremap in check mode

---
 tasks/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tasks/main.yml b/tasks/main.yml
index efe8f5d..2bdc6dd 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -170,7 +170,7 @@
   connection: local
   become: false
   delegate_to: localhost
-  when: docker_userns_remap and dockremap_subuid_output.stdout is defined
+  when: docker_userns_remap and dockremap_subuid_output.stdout is defined and not ansible_check_mode
 
 - name: Save gid to hostvars for dockremap user
   lineinfile:
@@ -182,4 +182,4 @@
   connection: local
   become: false
   delegate_to: localhost
-  when: docker_userns_remap and dockremap_subgid_output.stdout is defined
+  when: docker_userns_remap and dockremap_subgid_output.stdout is defined and not ansible_check_mode
-- 
GitLab