From 30205fb0338c29cc5152965689d81f72f7e3c23e Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:31:33 +0100 Subject: [PATCH 01/13] issue #37 : removed outdated tag --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index eedf364..a4b8a56 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -287,7 +287,7 @@ tags: clean when: delete_local_xml_file | default(false) -- name: sync # noqa 503 no-handler +- name: sync # noqa no-handler ansible.builtin.command: "{{ item }}" throttle: 1 # loop_control: @@ -299,7 +299,7 @@ - sync - copy -- name: reload # noqa 503 no-handler +- name: reload # noqa no-handler ansible.builtin.command: "{{ item }}" throttle: 1 # loop_control: From bc69c162ec69716bd7f495cb0474479a6053f267 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:32:59 +0100 Subject: [PATCH 02/13] issue #37 : noqa no-changed-when --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index a4b8a56..f0a0277 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -281,13 +281,13 @@ register: config tags: copy -- name: clean,safe delete +- name: clean,safe delete # noqa no-changed-when delegate_to: localhost ansible.builtin.command: srm "{{ local_config_path }}" tags: clean when: delete_local_xml_file | default(false) -- name: sync # noqa no-handler +- name: sync # noqa no-handler no-changed-when ansible.builtin.command: "{{ item }}" throttle: 1 # loop_control: @@ -299,7 +299,7 @@ - sync - copy -- name: reload # noqa no-handler +- name: reload # noqa no-handler no-changed-when ansible.builtin.command: "{{ item }}" throttle: 1 # loop_control: From e15ffa35cd96667b205a1222dcde99b5a543db32 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:34:10 +0100 Subject: [PATCH 03/13] issue #37 : use fqcn --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index f0a0277..96e6f3e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -50,7 +50,7 @@ - name: sysctl tags: - always - include_tasks: + ansible.builtin.include_tasks: file: sysctl.yml apply: tags: sysctl From 32b8eb6184a8f5ae9c80da5f5987369d15c84e91 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:35:03 +0100 Subject: [PATCH 04/13] issue #37 : fixed octal value --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 96e6f3e..8341462 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -277,7 +277,7 @@ backup: true owner: root group: wheel - mode: 0644 + mode: "0644" register: config tags: copy From 0cc0da109bfa0ad6a6c2046bc9c12ff50b0c8853 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:39:04 +0100 Subject: [PATCH 05/13] issue #37 : updated .ansible-lint cfg --- .ansible-lint | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.ansible-lint b/.ansible-lint index 7395bd6..ceaeb85 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,3 +1,9 @@ +--- +exclude_paths: + - .github/ + - .pre-commit-config.yaml + skip_list: - 'role-name' - 'name[casing]' + - 'name[template]' From 0a108efee6502e652d5a8cd6eb373fe9ec021d61 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:41:29 +0100 Subject: [PATCH 06/13] issue #37 : fixed jinja2 spacing --- tasks/gateways.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/gateways.yml b/tasks/gateways.yml index 29e5572..35d676f 100644 --- a/tasks/gateways.yml +++ b/tasks/gateways.yml @@ -113,7 +113,7 @@ community.general.xml: path: "{{ local_config_path }}" xpath: /opnsense/gateways/gateway_group[name/text()="{{ item.name }}"] - set_children: "{{ item.settings + [{'name':item.name }] }}" + set_children: "{{ item.settings + [{'name': item.name}] }}" pretty_print: true with_items: "{{ opn_gateway_groups | default([]) }}" From ca1420e71ebb7fe4da29026a3801c822bed2e1b4 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:41:58 +0100 Subject: [PATCH 07/13] fixed typo in comment --- tasks/gateways.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/gateways.yml b/tasks/gateways.yml index 35d676f..5d93595 100644 --- a/tasks/gateways.yml +++ b/tasks/gateways.yml @@ -80,7 +80,7 @@ # - key: ipprotocol # value: inet -# FIXME: in fact a definition as a dict would make like easier: +# FIXME: in fact a definition as a dict would make life much easier: # - interface: fwlink # name: GW_02 # gateway: 192.168.0.3 From 7de9fa509cb22306f9dd32b1a8ac0aa96bf65cd8 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:45:32 +0100 Subject: [PATCH 08/13] issue #37 : noqa jinja2 spacing --- tasks/interfaces.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/interfaces.yml b/tasks/interfaces.yml index e1cfcdb..aa56ae1 100644 --- a/tasks/interfaces.yml +++ b/tasks/interfaces.yml @@ -177,7 +177,7 @@ pretty_print: true when: opn_ifgroups is defined -- name: create ifgroupentry +- name: create ifgroupentry # noqa jinja[spacing] delegate_to: localhost community.general.xml: path: "{{ local_config_path }}" From 7c61429a43ba3d88ce8256d21aa21344f5500f8d Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:47:18 +0100 Subject: [PATCH 09/13] issue #37 : fixed jinja2 spacing --- tasks/ipsecphase1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/ipsecphase1.yml b/tasks/ipsecphase1.yml index fe4d265..55c78ba 100644 --- a/tasks/ipsecphase1.yml +++ b/tasks/ipsecphase1.yml @@ -65,7 +65,7 @@ ansible.builtin.include_tasks: ipsecphase2.yml vars: uniqid: "{{ p2.key }}" - ipsecphasevar2: "{{ {p2.key: ipsecphasevar.phase2_defaults|default({})} | combine(ipsecphasevar.phase2, recursive=true) }}" + ipsecphasevar2: "{{ {p2.key: ipsecphasevar.phase2_defaults | default({})} | combine(ipsecphasevar.phase2, recursive=true) }}" with_dict: - "{{ ipsecphasevar.phase2 }}" loop_control: From bdbea8342d02b2fa7bf3ec13a2d89610666882c1 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:49:18 +0100 Subject: [PATCH 10/13] issue #37 : noqa jinja2 spacing --- tasks/ipsecphase2.yml | 2 +- tasks/unbound.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/ipsecphase2.yml b/tasks/ipsecphase2.yml index 531616c..a08499c 100644 --- a/tasks/ipsecphase2.yml +++ b/tasks/ipsecphase2.yml @@ -104,7 +104,7 @@ - "{{ ipsecphasevar2[uniqid]['encryption-algorithm-options'] | default([]) }}" when: encalgopt_reset | default(false) -- name: "IPSec ike phase2 {{ uniqid }} create encryption-algorithm-options for ikeid {{ ikeid }}" +- name: "IPSec ike phase2 {{ uniqid }} create encryption-algorithm-options for ikeid {{ ikeid }}" # noqa jinja[spacing] delegate_to: localhost community.general.xml: path: "{{ local_config_path }}" diff --git a/tasks/unbound.yml b/tasks/unbound.yml index f11b58a..61e8e19 100644 --- a/tasks/unbound.yml +++ b/tasks/unbound.yml @@ -159,7 +159,7 @@ pretty_print: true when: unbound_domainoverrides_update | default(False) -- name: unbound domainoverrides +- name: unbound domainoverrides # noqa jinja[spacing] delegate_to: localhost community.general.xml: path: "{{ local_config_path }}" From 73df81477b442a877331f1959e361a7530936e53 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:51:21 +0100 Subject: [PATCH 11/13] issue #37 : updated lint workflow --- .github/workflows/lint.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 06c01c0..dca28e4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: run ansible-lint - uses: ansible/ansible-lint-action@v6.6.1 - with: - path: '.' + uses: ansible/ansible-lint@v6.22.0 From 17a1734a78171635988c02846f53600cb0502349 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:55:33 +0100 Subject: [PATCH 12/13] issue #37 : updated lint workflow --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dca28e4..16640d3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,6 +8,7 @@ on: jobs: build: + name: ansible lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 6e2f99223f1a1c0b754b311a1e619a768eb08911 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 5 Dec 2023 07:57:41 +0100 Subject: [PATCH 13/13] issue #37 : updated lint workflow - test main for lint action --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 16640d3..5123f4a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,4 +13,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: run ansible-lint - uses: ansible/ansible-lint@v6.22.0 + uses: ansible/ansible-lint@main