Add netbox role
Kinda ouroborosish if you think about it. Better don’t.
This commit is contained in:
parent
43b9010126
commit
c7a3513fa1
14 changed files with 379 additions and 0 deletions
27
roles/netbox/handlers/main.yml
Normal file
27
roles/netbox/handlers/main.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
- 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"
|
Loading…
Add table
Add a link
Reference in a new issue