Migrated from legacy playbook repo into Ansible collection format: Roles (171 total): - common: 44 roles (fact gathering, SSH setup, utilities) - configuration: 32 roles (system config, networking, satellite) - provisioning: 16 roles (VMware, Azure, physical server deployment) - security: 15 roles (OpenSCAP hardening, certificates, AD integration) - monitoring: 12 roles (Zabbix, logging agents, metrics) - networking: 12 roles (DNS, DHCP, network interfaces) - satellite: 4 roles (Pulp/Satellite management) - misc: 36 roles (various utilities) Playbooks (159 total): - provisioning: 14 playbooks - azure: 13 playbooks - configuration: 22 playbooks - maintenance: 10 playbooks - security: 10 playbooks - monitoring: 9 playbooks - vcenter: 6 playbooks - networking: 7 playbooks - misc: 65 playbooks
28 lines
1.0 KiB
YAML
28 lines
1.0 KiB
YAML
---
|
|
# Orchestrator: use NetBox inventory, determine cloud provider per-host, and run update-netbox-fatcs role
|
|
- name: Update NetBox inventory (orchestrator)
|
|
hosts: all
|
|
gather_facts: false
|
|
vars:
|
|
ansible_python_interpreter: /usr/bin/python3.11
|
|
vars_files:
|
|
- roles/update-netbox-fatcs/vars/main.yml
|
|
tasks:
|
|
- name: Run lookforvm role to detect if host exists in vCenter or Azure
|
|
include_role:
|
|
name: lookforvm
|
|
vars:
|
|
ansible_connection: local
|
|
|
|
- name: Set vmware_datacenter based on lookforvm results
|
|
set_fact:
|
|
vmware_datacenter: >-
|
|
{% if vm_found_azure | default(false) %}azure{% elif vm_found_vcenter | default(false) %}onprem{% else %}onprem{% endif %}
|
|
|
|
- name: Run update-netbox-fatcs role to collect facts and update NetBox
|
|
include_role:
|
|
name: update-netbox-fatcs
|
|
# vmware_datacenter is set above via set_fact; do not re-pass a self-referential
|
|
# template here (it caused recursive templating). The role will inherit the var.
|
|
|