From d9a3333255b719ef1b343384537f3a36cc3b05f3 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Sun, 8 Jan 2023 00:48:33 +0100 Subject: [PATCH] issue #14 : test ignore_modules cfg settings --- example.yml | 5 +++++ examplecfg.yml | 9 +++++++++ exampleconverted.yml | 5 +++++ test.sh | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 examplecfg.yml diff --git a/example.yml b/example.yml index 2cb5efc..2d7f973 100644 --- a/example.yml +++ b/example.yml @@ -63,6 +63,11 @@ commands: "{{ dellos_general_command | default([]) }}" when: ansible_network_os == "dellemc.os6.os6" +# this will be ignored due to cfg +- name: general command os10_config + os10_config: + commands: "{{ dellos_general_command | default([]) }}" + # unnamed task - file: path: /etc/apt/sources.list.d/pve-enterprise.list diff --git a/examplecfg.yml b/examplecfg.yml new file mode 100644 index 0000000..7be19cd --- /dev/null +++ b/examplecfg.yml @@ -0,0 +1,9 @@ +--- + +ignore_modules: + - os10_config +# - os9_config +# - os6_config + +exclude_paths: + - .github/ diff --git a/exampleconverted.yml b/exampleconverted.yml index 1a6f04b..b77e3c7 100644 --- a/exampleconverted.yml +++ b/exampleconverted.yml @@ -65,6 +65,11 @@ commands: "{{ dellos_general_command | default([]) }}" when: ansible_network_os == "dellemc.os6.os6" +# this will be ignored due to cfg +- name: general command os10_config + os10_config: + commands: "{{ dellos_general_command | default([]) }}" + # unnamed task - ansible.builtin.file: path: /etc/apt/sources.list.d/pve-enterprise.list diff --git a/test.sh b/test.sh index 7e675b2..59a8545 100755 --- a/test.sh +++ b/test.sh @@ -6,7 +6,7 @@ cd $(dirname $0) cp example.yml example.yml.orig -./fqcn-fixer.py -f example.yml -w -x +./fqcn-fixer.py -c examplecfg.yml -f example.yml -w -x cmp example.yml exampleconverted.yml E=$?