Add netbox role

Kinda ouroborosish if you think about it. Better don’t.
This commit is contained in:
Timotej Lazar 2024-05-28 12:32:28 +02:00
parent 43b9010126
commit c7a3513fa1
14 changed files with 379 additions and 0 deletions

View 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"