Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #37 : update lint version #39

Merged
merged 13 commits into from
Dec 5, 2023
6 changes: 6 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
exclude_paths:
- .github/
- .pre-commit-config.yaml

skip_list:
- 'role-name'
- 'name[casing]'
- 'name[template]'
7 changes: 3 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ on:

jobs:
build:
name: ansible lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: run ansible-lint
uses: ansible/[email protected]
with:
path: '.'
uses: ansible/ansible-lint@main
4 changes: 2 additions & 2 deletions tasks/gateways.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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([]) }}"

Expand Down
2 changes: 1 addition & 1 deletion tasks/interfaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/ipsecphase1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tasks/ipsecphase2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
10 changes: 5 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
- name: sysctl
tags:
- always
include_tasks:
ansible.builtin.include_tasks:
file: sysctl.yml
apply:
tags: sysctl
Expand Down Expand Up @@ -277,17 +277,17 @@
backup: true
owner: root
group: wheel
mode: 0644
mode: "0644"
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 503 no-handler
- name: sync # noqa no-handler no-changed-when
ansible.builtin.command: "{{ item }}"
throttle: 1
# loop_control:
Expand All @@ -299,7 +299,7 @@
- sync
- copy

- name: reload # noqa 503 no-handler
- name: reload # noqa no-handler no-changed-when
ansible.builtin.command: "{{ item }}"
throttle: 1
# loop_control:
Expand Down
2 changes: 1 addition & 1 deletion tasks/unbound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down