1
0
Fork 0
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:
A Holt 2018-08-13 20:33:54 -04:00 committed by GitHub
parent ff76f3e429
commit 63009659f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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