Fixed errors in playbook
This commit is contained in:
@ -1,21 +1,23 @@
|
||||
---
|
||||
- name: install notify_push
|
||||
when: installation.changed
|
||||
block:
|
||||
- name: install app
|
||||
ansible.builtin.command:
|
||||
command:
|
||||
chdir: ~/html
|
||||
cmd: php occ app:install notify_push
|
||||
creates: ~/html/apps/notify_push
|
||||
- name: set permissions
|
||||
ansible.builtin.file:
|
||||
path: ~/html/apps/notify_push/x86_64/notify_push
|
||||
file:
|
||||
path: ~/html/apps/notify_push/bin/x86_64/notify_push
|
||||
mode: 0744
|
||||
- name: create symlink
|
||||
ansible.builtin.file:
|
||||
file:
|
||||
path: ~/bin/notify_push
|
||||
src: ~/html/apps/notify_push/x86_64/notify_push
|
||||
src: ~/html/apps/notify_push/bin/x86_64/notify_push
|
||||
state: link
|
||||
- name: create service
|
||||
ansible.builtin.template:
|
||||
template:
|
||||
src: notify_push_service.j2
|
||||
dest: ~/etc/services.d/notify_push.ini
|
||||
mode: 0644
|
||||
@ -23,19 +25,21 @@
|
||||
- reload supervisorctl
|
||||
- update supervisorctl
|
||||
- name: get backend list
|
||||
ansible.builtin.command: uberspace web backend list
|
||||
command: uberspace web backend list
|
||||
register: backends
|
||||
- name: add backend
|
||||
when: backend.stdout.find('http:7867') == -1
|
||||
ansible.builtin.command: uberspace web backend set /push --http --port 7867
|
||||
when: backends.stdout.find('http:7867') == -1
|
||||
command: uberspace web backend set /push --http --port 7867
|
||||
- name: get ip route
|
||||
ansible.builtin.command: ip route
|
||||
command: /usr/sbin/ip route
|
||||
register: ip
|
||||
- name: set trusted proxies
|
||||
ansible.builtin.command:
|
||||
command:
|
||||
chdir: ~/html
|
||||
cmd: php occ config:system:set trusted_proxies 0 --value="{{ ip.stdout.split().8 }}"
|
||||
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
|
||||
ansible.builtin.command:
|
||||
command:
|
||||
chdir: ~/html
|
||||
cmd: php occ notify_push:setup https://{{ domain }}/push
|
||||
Reference in New Issue
Block a user