update...

This commit is contained in:
2021-01-12 00:42:48 +01:00
parent 4b9e71e6fe
commit 302160818e
4 changed files with 56 additions and 165 deletions

View File

@ -4,6 +4,10 @@
# Install/Uodate git firewall repository
# ---
- meta: end_play
when: git_firewall_repository is not defined or git_firewall_repository|length < 1
- name: Install/update firewall repository
git:
repo: '{{ git_firewall_repository.repo }}'
@ -18,12 +22,12 @@
- name: Check if file '/etc/ipt-firewall/main_ipv6.conf' exists
stat:
path: /etc/ipt-firewall/main_ipv6.conf
register: main_ipv4_exists
register: main_ipv6_exists
- name: Check if file '/etc/ipt-firewall/main_ipv4.conf' exists
stat:
path: /etc/ipt-firewall/main_ipv4.conf
register: main_ipv6_exists
register: main_ipv4_exists
- name: Check if file '/etc/munin/munin-node.conf' exists
stat:
@ -81,6 +85,8 @@
path: /etc/ipt-firewall/main_ipv4.conf
regexp: '^dovecot_auth_port='
line: 'dovecot_auth_port="$dovecot_external_auth_port"'
when:
- main_ipv4_exists.stat.exists
- name: addjust line 'dovecot_auth_port' (IPv6)
lineinfile:
@ -95,6 +101,8 @@
path: /etc/ipt-firewall/main_ipv4.conf
regexp: '^jitsi_tcp_ports='
line: 'jitsi_tcp_ports="$standard_jitsi_tcp_ports"'
when:
- main_ipv4_exists.stat.exists
- name: addjust line 'jitsi_tcp_ports' (IPv6)
lineinfile:
@ -109,6 +117,8 @@
path: /etc/ipt-firewall/main_ipv4.conf
regexp: '^jitsi_udp_port_range='
line: 'jitsi_udp_port_range="$standard_jitsi_udp_port_range"'
when:
- main_ipv4_exists.stat.exists
- name: addjust line 'jitsi_udp_ports' (IPv6)
lineinfile:
@ -123,6 +133,8 @@
path: /etc/ipt-firewall/main_ipv4.conf
regexp: '^jitsi_dovecot_port='
line: 'jitsi_dovecot_port="$default_jitsi_dovecout_auth_port"'
when:
- main_ipv4_exists.stat.exists
- name: addjust line 'jitsi_dovecot_port' (IPv6)
lineinfile:
@ -137,6 +149,8 @@
path: /etc/ipt-firewall/main_ipv4.conf
regexp: '^nc_turn_ports='
line: 'nc_turn_ports="$standard_turn_service_ports"'
when:
- main_ipv4_exists.stat.exists
- name: addjust line 'nc_turn_ports' (IPv6)
lineinfile:
@ -725,7 +739,7 @@
failed_when: "jitsi_jibri_remote_auth_ipv4_present.rc > 1"
changed_when: "jitsi_jibri_remote_auth_ipv4_present.rc > 0"
- name: Adjust file '/etc/ipt-firewall/main_ipv4.conf' (jitsi dovecot auth)
- name: Adjust file '/etc/ipt-firewall/main_ipv4.conf' (jibri streamin/recording)
blockinfile:
path: /etc/ipt-firewall/main_ipv4.conf
insertafter: '^#?\s*jitsi_dovecot_port'
@ -751,7 +765,7 @@
forward_jibri_server_ips=""
jibri_remote_jitsi_server=""
jibri_remote_auth_port="$default_jibri_out_port"
marker: "# Marker set by modify-ipt-server.yml (jitsi dovecot auth)"
marker: "# Marker set by modify-ipt-server.yml (jibri streamin/recording)"
when:
- main_ipv4_exists.stat.exists
- jitsi_jibri_remote_auth_ipv4_present is changed
@ -759,21 +773,37 @@
- name: Check if String 'jitsi_jibri_remote_auth=..' (IPv6) is present
shell: grep -q -E "^jitsi_jibri_remote_auth=" /etc/ipt-firewall/main_ipv6.conf
register: jitsi_jibri_remote_auth_ipv6_present
when: main_ipv4_exists.stat.exists
when: main_ipv6_exists.stat.exists
failed_when: "jitsi_jibri_remote_auth_ipv6_present.rc > 1"
changed_when: "jitsi_jibri_remote_auth_ipv6_present.rc > 0"
- name: Adjust file '/etc/ipt-firewall/main_ipv6.conf' (jitsi dovecot auth)
- name: Adjust file '/etc/ipt-firewall/main_ipv6.conf' (jibri streamin/recording)
blockinfile:
path: /etc/ipt-firewall/main_ipv6.conf
insertafter: '^#?\s*jitsi_dovecot_port'
block: |
# - Jitsi Dovecot Authentication
# - Jibri extern Client Recording / Streamin
# -
jitsi_dovecot_auth=false
jitsi_dovecot_host=""
jitsi_dovecot_port="$default_jitsi_dovecout_auth_port"
marker: "# Marker set by modify-ipt-server.yml (jitsi dovecot auth)"
jitsi_jibri_remote_auth=false
# - Remote Jibri servers
# -
# - colon separated list of ipv6 addresses
# -
jitsi_jibri_remote_ips=""
jitsi_jibri_remote_auth_port="$default_jibri_out_port"
# - Jibri Recording / Streaming Service
# -
# - colon separated list of ipv6 addresses
# -
jibri_server_ips=""
# - colon separated list of ipv6 addresses
# -
forward_jibri_server_ips=""
jibri_remote_jitsi_server=""
jibri_remote_auth_port="$default_jibri_out_port"
marker: "# Marker set by modify-ipt-server.yml (jibri streamin/recording)"
when:
- main_ipv6_exists.stat.exists
- jitsi_jibri_remote_auth_ipv6_present is changed
@ -936,7 +966,8 @@
# 1 -> changed
# 2 -> not present
failed_when: "diff_script_output.rc > 2"
when: git_firewall_repository is defined and git_firewall_repository > 0
when:
- git_firewall_repository is defined and git_firewall_repository|length > 0
loop:
- default_ports.conf
- include_functions.conf
@ -958,7 +989,7 @@
- logging_ipv6.conf
- post_decalrations.conf
when:
- git_firewall_repository is defined and git_firewall_repository > 0
- git_firewall_repository is defined and git_firewall_repository|length > 0
- diff_script_output.changed
notify:
- Restart IPv4 Firewall
@ -976,7 +1007,8 @@
# 1 -> changed
# 2 -> not present
failed_when: "diff_script_output.rc > 2"
when: git_firewall_repository is defined and git_firewall_repository > 0
when:
- git_firewall_repository is defined and git_firewall_repository|length > 0
loop:
- ipt-firewall-server
- ip6t-firewall-server
@ -988,7 +1020,7 @@
- ipt-firewall-server
- ip6t-firewall-server
when:
- git_firewall_repository is defined and git_firewall_repository > 0
- git_firewall_repository is defined and git_firewall_repository|length > 0
- diff_script_output.changed
notify:
- Restart IPv4 Firewall