ci: add various configs and linter fixes

This commit is contained in:
Simon Cornet 2026-02-16 17:51:23 +01:00
commit b92f2c6175
5 changed files with 18 additions and 6 deletions

12
.markdownlint-cli2.jsonc Normal file
View file

@ -0,0 +1,12 @@
{
// files to lint
"globs": [
"readme.md"
],
// linting rules
"config": {
"MD013": {
"line_length": 120
}
}
}

View file

@ -11,7 +11,8 @@
ansible.builtin.shell: ansible.builtin.shell:
cmd: | cmd: |
{% for route in static_routes %} {% for route in static_routes %}
ip route replace {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }} ip route replace {{ route.destination }} via {{ route.gateway }}
{% if route.interface is defined %}dev {{ route.interface }}{% endif %}
{% endfor %} {% endfor %}
when: "static_routes | length > 0" when: "static_routes | length > 0"
changed_when: false changed_when: false

View file

@ -10,7 +10,7 @@
# due to semaphore bug we need to do this ourselves # due to semaphore bug we need to do this ourselves
- name: "force-update requirements" - name: "force-update requirements"
ansible.builtin.command: ansible.builtin.command:
cmd: "ansible-galaxy install -f -r roles/requirements.yaml" cmd: "ansible-galaxy install -f -r roles/requirements.yml"
become: false become: false
delegate_to: "localhost" delegate_to: "localhost"
changed_when: false changed_when: false

View file

@ -49,7 +49,6 @@
{% else %} {% else %}
down ip route del {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }} down ip route del {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }}
up ip route add {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }} up ip route add {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
insertafter: "^iface {{ lan_interface }} inet.*\\n(\\s+.*\\n)*\\s+netmask" insertafter: "^iface {{ lan_interface }} inet.*\\n(\\s+.*\\n)*\\s+netmask"