Files
ansible-collection/playbooks/networking/old_remove-dns-record.yml
alexpolo1 a3b8959ca9 Initial collection structure
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
2026-06-27 21:48:22 +02:00

40 lines
1.0 KiB
YAML

---
- name: Remove AD Group
hosts: localhost
gather_facts: false
tasks:
- name: Prompt for server hostname
vars_prompt:
- name: server_name
prompt: "Enter the server hostname (e.g., passbolt9poc2):"
private: no
- name: Determine domain from server_name
set_fact:
domain_name: "{{ server_name.split('.')[-2:] + '.' + server_name.split('.')[-1] }}"
- name: Set jump host based on domain
set_fact:
jump_host: >-
{{
'lwinjump01.' + domain_name.split('.')[0]
if domain_name.endswith(('DMZ23.EXAMPLE.COM', 'DMZ.EXAMPLE.COM', 'EXAMPLE-CORP.COM'))
else '127.0.0.1'
}}
- name: Debug variables
debug:
msg:
server_name: "{{ server_name }}"
domain_name: "{{ domain_name }}"
jump_host: "{{ jump_host }}"
- include_role:
name: remove-ad-group
vars:
server_name: "{{ server_name }}"
domain_name: "{{ domain_name }}"
jump_host: "{{ jump_host }}"