Add respondd (aka alfred-announce)
This commit is contained in:
parent
a774357218
commit
b9efe6c8be
7
roles/git/tasks/main.yml
Normal file
7
roles/git/tasks/main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Install git
|
||||
apt: name=git
|
||||
|
||||
- name: Install ca-certificates
|
||||
apt: name=ca-certificates
|
5
roles/respondd/defaults/main.yml
Normal file
5
roles/respondd/defaults/main.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
respondd_announce_git_root: https://github.com/ffnord/ffnord-alfred-announce/
|
||||
batman_interface: bat-{{ site_code }}
|
||||
main_bridge: br-{{ site_code }}
|
7
roles/respondd/handlers/main.yml
Normal file
7
roles/respondd/handlers/main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Restart respondd
|
||||
service: name=respondd state=restarted
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
4
roles/respondd/meta/main.yml
Normal file
4
roles/respondd/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: git }
|
14
roles/respondd/tasks/main.yml
Normal file
14
roles/respondd/tasks/main.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
|
||||
- name: Clone respondd announce repository
|
||||
git: repo={{ respondd_announce_git_root }} dest=/opt/{{ site_code }}/respondd-announce/
|
||||
notify: Restart respondd
|
||||
|
||||
- name: Install system unit
|
||||
template: src=respondd.service.j2 dest=/lib/systemd/system/respondd.service
|
||||
notify:
|
||||
- Reload systemd
|
||||
- Restart respondd
|
||||
|
||||
- name: Enable respondd
|
||||
service: name=respondd enabled=yes
|
10
roles/respondd/templates/respondd.service.j2
Normal file
10
roles/respondd/templates/respondd.service.j2
Normal file
@ -0,0 +1,10 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=Respondd
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/{{ site_code }}/respondd-announce/respondd.py -b {{ batman_interface }} -i {{ main_bridge }} -i vpn-{{ site_code }} -d /opt/{{ site_code }}/respondd-announce/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user