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
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
---
|
|
- hosts: all
|
|
connection: local
|
|
become: false
|
|
gather_facts: false
|
|
vars:
|
|
- vcenter_host: vcsa01.EXAMPLE-CORP.COM
|
|
pre_tasks:
|
|
- name: Import vxrail credentials
|
|
ansible.builtin.include_vars:
|
|
file: roles/vxrail-provision/vars/credentials.yml
|
|
|
|
tasks:
|
|
- name: Remove vmware tag from host
|
|
community.vmware.vmware_tag_manager:
|
|
hostname: "{{ vcenter_host }}"
|
|
username: "{{ vmware_user }}"
|
|
password: "{{ vmware_pass }}"
|
|
tag_names:
|
|
- RPO24-Linux-03
|
|
object_name: "{{ inventory_hostname }}"
|
|
object_type: VirtualMachine
|
|
state: remove
|
|
validate_certs: false
|
|
|
|
- name: Add vmware tag to host
|
|
community.vmware.vmware_tag_manager:
|
|
hostname: "{{ vcenter_host }}"
|
|
username: "{{ vmware_user }}"
|
|
password: "{{ vmware_pass }}"
|
|
tag_names:
|
|
- RPO24-Linux-05
|
|
object_name: "{{ inventory_hostname }}"
|
|
object_type: VirtualMachine
|
|
state: add
|
|
validate_certs: false
|
|
|