Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
ansible_interpreter: /usr/bin/python3
- distro: debian12
ansible_interpreter: /usr/bin/python3
- distro: centos7
ansible_interpreter: /usr/bin/python3
- distro: rockylinux8
ansible_interpreter: /usr/bin/python3

steps:
- uses: actions/checkout@v5
Expand Down
11 changes: 9 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
- name: reload supervisor
command: supervisorctl reload
- name: restart wireguard vpn updater
command: "supervisorctl restart openwisp-flask-vpn-updater-{{ openwisp2_wireguard_vpn_uuid }}"
register: supervisor_restart
failed_when: >
supervisor_restart.rc != 0 and
'ERROR (no such process)' not in supervisor_restart.stderr
changed_when: >
supervisor_restart.rc == 0 and
'ERROR (no such process)' not in supervisor_restart.stderr
8 changes: 4 additions & 4 deletions tasks/flask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
group: "{{ openwisp_group }}"
mode: 0750
tags: [wireguard, updater_script]
notify: reload supervisor
notify: restart wireguard vpn updater

- name: Bring up WireGuard interface on boot
block:
Expand Down Expand Up @@ -63,7 +63,7 @@
mode: 0750
group: "{{ openwisp_group }}"
tags: [wireguard, updater_script]
notify: reload supervisor
notify: restart wireguard vpn updater

- name: Add wireguard_update.sh script to cron
cron:
Expand All @@ -79,7 +79,7 @@
tags: [wireguard, updater_script]

- name: Deploy VPN updater flask app
notify: reload supervisor
notify: restart wireguard vpn updater
template:
src: flask/vpn_updater.py
dest: "{{ openwisp2_wireguard_path }}/vpn_updater.py"
Expand All @@ -98,5 +98,5 @@
src: supervisor/vpn_updater.j2
dest: "{{ supervisor_conf_path }}/flask_vpn_updater_{{ openwisp2_wireguard_vpn_uuid }}.{{ supervisord_conf_extension }}"
mode: 0744
notify: reload supervisor
notify: restart wireguard vpn updater
tags: [flask]
4 changes: 2 additions & 2 deletions tasks/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
delay: 10
register: result
until: result is success
notify: reload supervisor
notify: restart wireguard vpn updater

- name: Copy requirements.txt
copy:
Expand All @@ -31,7 +31,7 @@
virtualenv_python: "{{ openwisp2_wireguard_python }}"
virtualenv_site_packages: true
virtualenv_command: "{{ openwisp2_wireguard_virtualenv_command }}"
notify: reload supervisor
notify: restart wireguard vpn updater
retries: 5
delay: 10
register: result
Expand Down
3 changes: 1 addition & 2 deletions tasks/uwsgi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@
- certbot_check.rc == 0
- certbot_check.stdout != ""
tags: [ssl]

- name: uwsgi.ini
notify: reload supervisor
notify: restart wireguard vpn updater
template:
src: flask/uwsgi.ini
dest: "{{ openwisp2_wireguard_path }}/uwsgi.ini"
Expand Down
Loading