mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update main.yml
This commit is contained in:
parent
98e7af657f
commit
f715aabfdd
1 changed files with 17 additions and 14 deletions
|
@ -45,17 +45,18 @@
|
|||
- { src: 'announcer.j2', dest: '/etc/openvpn/scripts/announcer', mode: '0755' }
|
||||
- { src: 'silence', dest: '/etc/openvpn/scripts/silence', mode: '0755' }
|
||||
- { src: 'xscenet.conf.j2', dest: '/etc/openvpn/xscenet.conf', mode: '0644' }
|
||||
- { src: 'iiab-remote-on.j2', dest: '/usr/bin/iiab-remote-on', mode: '0755' }
|
||||
- { src: 'iiab-remote-off', dest: '/usr/bin/iiab-remote-off', mode: '0755' }
|
||||
# Comment out in future? Not recommended as of August 2018:
|
||||
- { src: 'iiab-handle.j2', dest: '/usr/bin/iiab-handle', mode: '0755' }
|
||||
# Comment out in future? Might still be relevant for CentOS but unused for ~2 years as of August 2018:
|
||||
- { src: 'up_wan', dest: '/usr/lib/iiab/up_wan', mode: '0755' }
|
||||
# Unused for ~2 years as of August 2018:
|
||||
#- { src: 'start.j2', dest: '/usr/lib/iiab/start', mode: '0755' }
|
||||
# Buggy & rarely used as of August 2018:
|
||||
#- { src: 'iiab-vpn.conf.in', dest: '/etc/openvpn/iiab-vpn.conf.in', mode: '0644' }
|
||||
# Buggy & rarely used as of August 2018:
|
||||
#- { src: 'iiab-vpn.j2', dest: '/usr/bin/iiab-vpn', mode: '0755' }
|
||||
- { src: 'iiab-handle.j2', dest: '/usr/bin/iiab-handle', mode: '0755' }
|
||||
# Comment out in future? Unused for ~2 years as of August 2018:
|
||||
- { src: 'up_wan', dest: '/usr/lib/iiab/up_wan', mode: '0755' }
|
||||
# Unused for ~2 years as of August 2018:
|
||||
#- { src: 'start.j2', dest: '/usr/lib/iiab/start', mode: '0755' }
|
||||
- { src: 'iiab-remote-on.j2', dest: '/usr/bin/iiab-remote-on', mode: '0755' }
|
||||
- { src: 'iiab-remote-off', dest: '/usr/bin/iiab-remote-off', mode: '0755' }
|
||||
|
||||
- name: Save openvpn_handle variable into /etc/iiab/openvpn_handle (BACKS UP FILE IF CHANGED)
|
||||
template:
|
||||
|
@ -84,11 +85,11 @@
|
|||
dest: /etc/NetworkManager/dispatcher.d/
|
||||
when: not is_debuntu
|
||||
|
||||
# Comment out in future? Unused for ~2 years as of August 2018:
|
||||
- name: Check for manually configured OpenVPN tunnel
|
||||
stat:
|
||||
path: /etc/openvpn/iiab-vpn.conf
|
||||
register: stat
|
||||
# Was buggy & unused for ~2 years as of August 2018:
|
||||
#- name: Check for manually configured OpenVPN tunnel
|
||||
# stat:
|
||||
# path: /etc/openvpn/iiab-vpn.conf
|
||||
# register: stat
|
||||
|
||||
|
||||
# FIXED SOMETIME PRIOR TO AUGUST 2018: earlier versions of Ansible had not
|
||||
|
@ -120,13 +121,15 @@
|
|||
name: openvpn@xscenet.service
|
||||
enabled: yes
|
||||
state: restarted
|
||||
when: openvpn_enabled and not stat.exists is defined
|
||||
when: openvpn_enabled
|
||||
#when: openvpn_enabled and not stat.exists is defined
|
||||
|
||||
- name: Enable hourly cron job for OpenVPN
|
||||
lineinfile:
|
||||
path: /etc/crontab
|
||||
line: "25 * * * * root (/usr/bin/systemctl start openvpn@xscenet.service) > /dev/null"
|
||||
when: openvpn_enabled and openvpn_cron_enabled and not stat.exists is defined
|
||||
when: openvpn_enabled and openvpn_cron_enabled
|
||||
#when: openvpn_enabled and openvpn_cron_enabled and not stat.exists is defined
|
||||
|
||||
- name: Remove hourly cron job for OpenVPN
|
||||
lineinfile:
|
||||
|
|
Loading…
Add table
Reference in a new issue