From 2612094889953eead2076a303edb0ae47d30a8bc Mon Sep 17 00:00:00 2001 From: Richard Braakman Date: Wed, 16 Oct 2024 23:45:27 +0300 Subject: [PATCH] dump_config: support for dumping role configs locally --- tasks/main.yml | 10 +++++++--- tasks/main_default.yml | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index c0742be..654499d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -76,16 +76,20 @@ tags: - base_config - access_setup - when: ansible_os_family != "Windows" + when: > + ansible_os_family != "Windows" and + dump_config is not defined - name: include main tasks for windows include_tasks: main_windows.yml tags: - base_config - access_setup - when: ansible_os_family == "Windows" + when: > + ansible_os_family == "Windows" and + dump_config is not defined - name: include additional tasks include_tasks: "tasks/{{item}}.yml" with_items: "{{basic_host_extra_tasks}}" - when: basic_host_extra_tasks is defined \ No newline at end of file + when: basic_host_extra_tasks is defined diff --git a/tasks/main_default.yml b/tasks/main_default.yml index 468cc0d..cdb42ba 100644 --- a/tasks/main_default.yml +++ b/tasks/main_default.yml @@ -12,8 +12,8 @@ set_fact: systemd_version: "{{_systemctl_version.stdout}}" when: > - ansible_service_mgr == 'systemd' and - _systemctl_version is defined + ansible_service_mgr == 'systemd' and + _systemctl_version is defined - name: check provisioning marker stat: