chore: fix ansible-lint violations and add pre-commit hooks
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
---
|
||||
# defaults file for roles/networking
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
# handlers file for roles/networking
|
||||
- name: reload sysctl
|
||||
command: sysctl --system
|
||||
- name: Reload sysctl
|
||||
ansible.builtin.command: sysctl --system
|
||||
changed_when: false
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
---
|
||||
- name: Ensure bridge-utils is installed
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- bridge-utils
|
||||
- vlan
|
||||
- iproute2
|
||||
state: present
|
||||
state: present
|
||||
|
||||
- name: Create bridge if missing
|
||||
command: ip link add br-main-vpn type bridge
|
||||
ansible.builtin.command: ip link add br-main-vpn type bridge
|
||||
register: bridge_create
|
||||
failed_when: false
|
||||
changed_when: bridge_create.rc == 0
|
||||
|
||||
- name: Bring bridge up
|
||||
command: ip link set br-main-vpn up
|
||||
ansible.builtin.command: ip link set br-main-vpn up
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
changed_when: false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# tasks file for roles/networking
|
||||
- name: Deploy networking sysctl configuration
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: 99-openvpn.conf.j2
|
||||
dest: /etc/sysctl.d/99-openvpn.conf
|
||||
owner: root
|
||||
@@ -10,7 +10,8 @@
|
||||
notify: reload sysctl
|
||||
|
||||
- name: Apply sysctl immediately
|
||||
command: sysctl --system
|
||||
ansible.builtin.command: sysctl --system
|
||||
changed_when: false
|
||||
|
||||
- import_tasks: bridge.yml
|
||||
- name: Import bridge configuration tasks
|
||||
ansible.builtin.import_tasks: bridge.yml
|
||||
|
||||
@@ -3,4 +3,4 @@ net.ipv4.ip_forward=1
|
||||
net.ipv4.conf.all.rp_filter=0
|
||||
net.ipv4.conf.default.rp_filter=0
|
||||
|
||||
net.ipv4.conf.enp7s0.rp_filter=0
|
||||
net.ipv4.conf.enp7s0.rp_filter=0
|
||||
|
||||
Reference in New Issue
Block a user