diff options
author | Niklas Yann Wettengel <niyawe@niyawe.de> | 2021-07-28 01:12:10 +0200 |
---|---|---|
committer | Niklas Yann Wettengel <niyawe@niyawe.de> | 2021-07-28 01:12:10 +0200 |
commit | 9ec1670a262597356c24bff27d473eccceb45b61 (patch) | |
tree | 8d94c1ab62fef270ea45a103be179609272b3f82 /roles/install_wgkex/tasks | |
parent | f394fd81667a44e267e83d3c453101598a21c58c (diff) |
wg
Diffstat (limited to 'roles/install_wgkex/tasks')
-rw-r--r-- | roles/install_wgkex/tasks/main.yml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/roles/install_wgkex/tasks/main.yml b/roles/install_wgkex/tasks/main.yml new file mode 100644 index 0000000..c8b3264 --- /dev/null +++ b/roles/install_wgkex/tasks/main.yml @@ -0,0 +1,42 @@ +--- +- name: install wgkex dependencies + pacman: + name: + - git + - python-virtualenv + - python-setuptools + state: present + +- name: clone wgkex repo + git: + repo: https://github.com/FreifunkMYK/wgkex.git + dest: /opt/wgkex + +- name: create venv + command: + cmd: "python -m venv /opt/wgkex/.venv" + creates: /opt/wgkex/.venv + +- name: install requirements + pip: + requirements: /opt/wgkex/requirements.txt + virtualenv: /opt/wgkex/.venv + +- name: install wgkex config + template: + src: wgkex.yaml.j2 + dest: /etc/wgkex.yaml + mode: 0644 + notify: restart wgkex + +- name: create wgkex service + copy: + src: wgkex.service + dest: /etc/systemd/system/wgkex.service + mode: 0644 + +- name: start and enable wgkex service + systemd: + name: wgkex + state: started + enabled: yes |