fix : update var names with a prefix to pass the ansible-lint test
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
- name: Create bridge if missing
|
- name: Create bridge if missing
|
||||||
ansible.builtin.command: ip link add br-main-vpn type bridge
|
ansible.builtin.command: ip link add br-main-vpn type bridge
|
||||||
register: bridge_create
|
register: networking_bridge_create
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: bridge_create.rc == 0
|
changed_when: networking_bridge_create.rc == 0
|
||||||
|
|
||||||
- name: Bring bridge up
|
- name: Bring bridge up
|
||||||
ansible.builtin.command: ip link set br-main-vpn up
|
ansible.builtin.command: ip link set br-main-vpn up
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ openvpn_config_dir: /etc/openvpn/server
|
|||||||
|
|
||||||
openvpn_service: openvpn-server@server
|
openvpn_service: openvpn-server@server
|
||||||
|
|
||||||
radius_server: 10.1.0.101
|
openvpn_radius_server: 10.1.0.101
|
||||||
radius_auth_port: 1812
|
openvpn_radius_auth_port: 1812
|
||||||
radius_acct_port: 1813
|
openvpn_radius_acct_port: 1813
|
||||||
radius_shared_secret: aloulou
|
openvpn_radius_shared_secret: aloulou
|
||||||
|
|
||||||
nas_identifier: "{{ inventory_hostname }}"
|
openvpn_nas_identifier: "{{ inventory_hostname }}"
|
||||||
nas_ip_address: "{{ private_ip }}"
|
openvpn_nas_ip_address: "{{ private_ip }}"
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
- name: Wait for tap0
|
- name: Wait for tap0
|
||||||
ansible.builtin.command: ip link show tap0
|
ansible.builtin.command: ip link show tap0
|
||||||
register: tap_check
|
register: openvpn_tap_check
|
||||||
retries: 10
|
retries: 10
|
||||||
delay: 2
|
delay: 2
|
||||||
until: tap_check.rc == 0
|
until: openvpn_tap_check.rc == 0
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Bring tap0 up
|
- name: Bring tap0 up
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
NAS-Identifier={{ nas_identifier }}
|
NAS-Identifier={{ openvpn_nas_identifier }}
|
||||||
NAS-IP-Address={{ nas_ip_address }}
|
NAS-IP-Address={{ openvpn_nas_ip_address }}
|
||||||
|
|
||||||
Service-Type=5
|
Service-Type=5
|
||||||
Framed-Protocol=1
|
Framed-Protocol=1
|
||||||
@@ -21,10 +21,10 @@ log_level=5
|
|||||||
|
|
||||||
server
|
server
|
||||||
{
|
{
|
||||||
name={{ radius_server }}
|
name={{ openvpn_radius_server }}
|
||||||
authport={{ radius_auth_port }}
|
authport={{ openvpn_radius_auth_port }}
|
||||||
acctport={{ radius_acct_port }}
|
acctport={{ openvpn_radius_acct_port }}
|
||||||
sharedsecret={{ radius_shared_secret }}
|
sharedsecret={{ openvpn_radius_shared_secret }}
|
||||||
|
|
||||||
retry=3
|
retry=3
|
||||||
wait=10
|
wait=10
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
# defaults file for roles/networking
|
# defaults file for roles/networking
|
||||||
radius_auth_nodeport: 30131
|
radius_nat_auth_nodeport: 30131
|
||||||
radius_acct_nodeport: 31622
|
radius_nat_acct_nodeport: 31622
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
protocol: udp
|
protocol: udp
|
||||||
destination_port: "1812"
|
destination_port: "1812"
|
||||||
jump: DNAT
|
jump: DNAT
|
||||||
to_destination: ":{{ radius_auth_nodeport }}"
|
to_destination: ":{{ radius_nat_auth_nodeport }}"
|
||||||
|
|
||||||
- name: DNAT RADIUS accounting traffic
|
- name: DNAT RADIUS accounting traffic
|
||||||
ansible.builtin.iptables:
|
ansible.builtin.iptables:
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
protocol: udp
|
protocol: udp
|
||||||
destination_port: "1813"
|
destination_port: "1813"
|
||||||
jump: DNAT
|
jump: DNAT
|
||||||
to_destination: ":{{ radius_acct_nodeport }}"
|
to_destination: ":{{ radius_nat_acct_nodeport }}"
|
||||||
|
|
||||||
- name: Save iptables rules
|
- name: Save iptables rules
|
||||||
ansible.builtin.command: netfilter-persistent save
|
ansible.builtin.command: netfilter-persistent save
|
||||||
|
|||||||
Reference in New Issue
Block a user