add netbox role for ensuring netbox is deployed as specified
The role takes over the deployment of netbox and its dependencies, while still requiring the user to provide the netbox version, db password and config as well as to set up a web server and handle stuff like creating users, etc.
This commit is contained in:
parent
9662995377
commit
783c36bcc1
5 changed files with 227 additions and 0 deletions
24
roles/netbox/handlers/main.yaml
Normal file
24
roles/netbox/handlers/main.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
- name: Run upgrade script
|
||||
ansible.builtin.command: /opt/netbox/upgrade.sh
|
||||
become: true
|
||||
# When it runs, this should always report changed.
|
||||
changed_when: true
|
||||
|
||||
- name: Ensure netbox systemd services are set up and up-to-date
|
||||
ansible.builtin.systemd_service:
|
||||
daemon_reload: true
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
state: restarted
|
||||
become: true
|
||||
loop:
|
||||
- "netbox.service"
|
||||
- "netbox-rq.service"
|
||||
|
||||
- name: Ensure netbox housekeeping timer is set up and up-to-date
|
||||
ansible.builtin.systemd_service:
|
||||
daemon_reload: true
|
||||
name: "netbox-housekeeping.timer"
|
||||
enabled: true
|
||||
state: restarted
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue