servers/roles/netbox/handlers/main.yml
Timotej Lazar c7a3513fa1 Add netbox role
Kinda ouroborosish if you think about it. Better don’t.
2024-05-28 12:32:28 +02:00

28 lines
569 B
YAML

- name: reload nginx
service:
name: nginx
state: reloaded
when: "'handler' not in ansible_skip_tags"
- name: reload package cache
package:
update_cache: yes
when: "'handler' not in ansible_skip_tags"
- name: restart netbox
service:
name: '{{ item }}'
state: restarted
loop:
- netbox
- netbox-rq
when: "'handler' not in ansible_skip_tags"
- name: run migrations
become: yes
become_method: su
become_user: '{{ user }}'
command: sh ~/app/upgrade.sh
notify: restart netbox
when: "'handler' not in ansible_skip_tags"