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
ff76f3e429
commit
63009659f8
1 changed files with 13 additions and 12 deletions
|
@ -29,15 +29,6 @@
|
||||||
path: /usr/lib/iiab
|
path: /usr/lib/iiab
|
||||||
state: directory
|
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
|
- name: Configure OpenVPN
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
|
@ -61,6 +52,15 @@
|
||||||
- { src: 'iiab-remote-on', dest: '/usr/bin/iiab-remote-on', mode: '0755' }
|
- { src: 'iiab-remote-on', dest: '/usr/bin/iiab-remote-on', mode: '0755' }
|
||||||
- { src: 'iiab-remote-off', dest: '/usr/bin/iiab-remote-off', 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)
|
- name: Put up_wan in place (debuntu)
|
||||||
template:
|
template:
|
||||||
src: up_wan
|
src: up_wan
|
||||||
|
@ -100,16 +100,17 @@
|
||||||
# when: openvpn_enabled and not stat.exists is defined and not installing
|
# 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:
|
lineinfile:
|
||||||
dest: /etc/crontab
|
dest: /etc/crontab
|
||||||
line: "25 * * * * root (/usr/bin/systemctl start openvpn@xscenet.service) > /dev/null"
|
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 and not stat.exists is defined
|
||||||
|
|
||||||
- name: Make OpenVPN connection manual
|
- name: Remove hourly cron jobs for OpenVPN
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/crontab
|
dest: /etc/crontab
|
||||||
regexp: ".*/usr/bin/systemctl*"
|
regexp: "openvpn@xscenet"
|
||||||
|
#regexp: ".*/usr/bin/systemctl*"
|
||||||
state: absent
|
state: absent
|
||||||
when: not openvpn_enabled or not openvpn_cron_enabled
|
when: not openvpn_enabled or not openvpn_cron_enabled
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue