feat: initial playbook

This commit is contained in:
Doni Crosby 2025-09-25 19:24:11 -04:00
parent 99bfb97ee7
commit f8e1de4f0a
30 changed files with 1097 additions and 2 deletions

View file

@ -0,0 +1,43 @@
---
- name: Update NetBox Docker Repository
hosts: netbox
become: yes
gather_facts: no
tasks:
- name: Update NetBox Docker repository
git:
repo: "{{ netbox_repo_url }}"
dest: "{{ netbox_install_dir }}"
version: "{{ netbox_repo_branch }}"
update: yes
force: yes
tags:
- update-repo
- name: Pull latest Docker images
docker_compose:
project_src: "{{ netbox_install_dir }}"
pull: yes
tags:
- pull-images
- name: Restart NetBox services
docker_compose:
project_src: "{{ netbox_install_dir }}"
state: present
recreate: yes
tags:
- restart-services
- name: Wait for NetBox to be ready
uri:
url: "http://localhost:8000/"
method: GET
status_code: 200
register: netbox_ready
until: netbox_ready.status == 200
retries: 30
delay: 10
tags:
- health-check