mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Update main.yml
This commit is contained in:
parent
ff76f3e429
commit
63009659f8
1 changed files with 13 additions and 12 deletions
|
@ -29,15 +29,6 @@
|
|||
path: /usr/lib/iiab
|
||||
state: directory
|
||||
|
||||
- name: Save openvpn_handle variable into /etc/iiab/openvpn_handle (BACKS UP FILE IF CHANGED)
|
||||
template:
|
||||
src: openvpn_handle.j2
|
||||
dest: /etc/iiab/openvpn_handle
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
backup: yes
|
||||
|
||||
- name: Configure OpenVPN
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
|
@ -61,6 +52,15 @@
|
|||
- { src: 'iiab-remote-on', 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:
|
||||
src: openvpn_handle.j2
|
||||
dest: /etc/iiab/openvpn_handle
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
backup: yes
|
||||
|
||||
- name: Put up_wan in place (debuntu)
|
||||
template:
|
||||
src: up_wan
|
||||
|
@ -100,16 +100,17 @@
|
|||
# when: openvpn_enabled and not stat.exists is defined and not installing
|
||||
|
||||
|
||||
- name: Make OpenVPN connection automatic
|
||||
- name: Enable hourly cron job for OpenVPN
|
||||
lineinfile:
|
||||
dest: /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
|
||||
|
||||
- name: Make OpenVPN connection manual
|
||||
- name: Remove hourly cron jobs for OpenVPN
|
||||
lineinfile:
|
||||
dest: /etc/crontab
|
||||
regexp: ".*/usr/bin/systemctl*"
|
||||
regexp: "openvpn@xscenet"
|
||||
#regexp: ".*/usr/bin/systemctl*"
|
||||
state: absent
|
||||
when: not openvpn_enabled or not openvpn_cron_enabled
|
||||
|
||||
|
|
Loading…
Reference in a new issue