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.
24 lines
643 B
YAML
24 lines
643 B
YAML
- 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
|