45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
---
|
|
- name: install notify_push
|
|
when: installation.changed
|
|
block:
|
|
- name: install app
|
|
command:
|
|
chdir: ~/html
|
|
cmd: php occ app:install notify_push
|
|
creates: ~/html/apps/notify_push
|
|
- name: set permissions
|
|
file:
|
|
path: ~/html/apps/notify_push/bin/x86_64/notify_push
|
|
mode: 0744
|
|
- name: create symlink
|
|
file:
|
|
path: ~/bin/notify_push
|
|
src: ~/html/apps/notify_push/bin/x86_64/notify_push
|
|
state: link
|
|
- name: create service
|
|
template:
|
|
src: notify_push_service.j2
|
|
dest: ~/etc/services.d/notify_push.ini
|
|
mode: 0644
|
|
notify:
|
|
- reload supervisorctl
|
|
- update supervisorctl
|
|
- name: get backend list
|
|
command: uberspace web backend list
|
|
register: backends
|
|
- name: add backend
|
|
when: backends.stdout.find('http:7867') == -1
|
|
command: uberspace web backend set /push --http --port 7867
|
|
- name: get ip route
|
|
command: /usr/sbin/ip route
|
|
register: ip
|
|
- name: set trusted proxies
|
|
command:
|
|
chdir: ~/html
|
|
cmd: php occ config:system:set trusted_proxies 0 --value="{{ ip.stdout.split().15 }}"
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|
|
- name: configure notify_push app with backend
|
|
command:
|
|
chdir: ~/html
|
|
cmd: php occ notify_push:setup https://{{ domain }}/push |