From 9a84c03802eebab1ac239399f7131b35ec948361 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 25 Sep 2020 10:19:33 -0400 Subject: [PATCH] Create container-puppet-tasks files per step in check mode In check mode, we still create the container-puppet-tasks json files, they are later processed, even in dry run. Change-Id: If999952c6cc0c9bf03ca745bddcf79c395a44e98 (cherry picked from commit 03bb3bbdb4d6569d4ca4b9bdf36ac225575902cd) --- common/host-container-puppet-tasks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/host-container-puppet-tasks.yaml b/common/host-container-puppet-tasks.yaml index 1737818038..fc569d7f8e 100644 --- a/common/host-container-puppet-tasks.yaml +++ b/common/host-container-puppet-tasks.yaml @@ -2,9 +2,10 @@ no_log: True copy: content: "{{lookup ('vars', 'host_container_puppet_tasks_' ~ step, default=[]) | to_nice_json}}" - dest: "/var/lib/container-puppet/container-puppet-tasks{{step}}.json" + dest: "/var/lib/container-puppet/{{ ansible_check_mode | bool | ternary('check-mode/', '') }}container-puppet-tasks{{step}}.json" force: yes mode: '0600' + check_mode: no tags: - container_config_tasks