Prioritize vpn tasks over other tasks

This commit is contained in:
Sonny Bakker 2020-12-17 20:46:41 +01:00
parent 56efbf8e32
commit c966d6f99d
3 changed files with 8 additions and 10 deletions

View file

@ -22,13 +22,6 @@
state: stopped state: stopped
enabled: false enabled: false
- name: restart vpn
become: true
systemd:
name: openvpn-client@zeus
state: restarted
enabled: true
- name: restart user ssh-agent - name: restart user ssh-agent
systemd: systemd:
name: ssh-agent name: ssh-agent

View file

@ -54,11 +54,11 @@
when: platform == "laptop" when: platform == "laptop"
- include_tasks: systemd.yml - include_tasks: systemd.yml
- include_tasks: openvpn.yml
- include_tasks: gpg.yml # TODO - include_tasks: gpg.yml # TODO
- include_tasks: git.yml # TODO - include_tasks: git.yml # TODO
- include_tasks: mpv.yml - include_tasks: mpv.yml
- include_tasks: mpd.yml - include_tasks: mpd.yml
- include_tasks: postgres.yml # TODO - include_tasks: postgres.yml # TODO
- include_tasks: syncthing.yml - include_tasks: syncthing.yml
- include_tasks: openvpn.yml
- include_tasks: timer.yml - include_tasks: timer.yml

View file

@ -45,7 +45,6 @@
src: "{{ platform }}/openvpn/ta.key", src: "{{ platform }}/openvpn/ta.key",
dest: "/etc/openvpn/client/zeus/ta.key", dest: "/etc/openvpn/client/zeus/ta.key",
} }
notify: restart vpn
when: platform == "desktop" when: platform == "desktop"
- name: copy laptop credentials - name: copy laptop credentials
@ -73,5 +72,11 @@
src: "{{ platform }}/openvpn/ta.key", src: "{{ platform }}/openvpn/ta.key",
dest: "/etc/openvpn/client/zeus/ta.key", dest: "/etc/openvpn/client/zeus/ta.key",
} }
notify: restart vpn
when: platform == "laptop" when: platform == "laptop"
- name: restart vpn
become: true
systemd:
name: openvpn-client@zeus
state: restarted
enabled: true