Rename Windows ec2 instance for #235 (#236)

pushed the EE's, merging
This commit is contained in:
Matthew Fernandez
2025-04-29 13:05:13 -06:00
committed by GitHub
parent 0b1904e727
commit 3400e73675
5 changed files with 13 additions and 5 deletions

View File

@@ -283,7 +283,7 @@ controller_workflows:
- identifier: Deploy Windows GUI Blueprint
unified_job_template: Cloud / AWS / Create VM
extra_data:
create_vm_vm_name: aws_dc
create_vm_vm_name: aws-dc
vm_blueprint: windows_full
success_nodes:
- Update Inventory

View File

@@ -3,9 +3,10 @@ version: 3
images:
base_image:
name: registry.redhat.io/ansible-automation-platform-25/ee-minimal-rhel9:latest
dependencies:
galaxy: requirements-25.yml
system:
- python3.11-devel [platform:rpm]
python:
- pywinrm>=0.4.3
python_interpreter:

View File

@@ -27,6 +27,8 @@ collections:
- name: redhat.rhel_system_roles
version: ">=1.23.0"
# windows demos
- name: microsoft.ad
version: "1.9"
- name: ansible.windows
version: ">=2.3.0"
- name: chocolatey.chocolatey

View File

@@ -20,6 +20,8 @@ collections:
- name: redhat.rhel_system_roles
version: ">=1.23.0"
# windows
- name: microsoft.ad
version: "1.9"
- name: ansible.windows
version: ">=2.3.0"
- name: chocolatey.chocolatey

View File

@@ -12,14 +12,17 @@
- name: Update the hostname
ansible.windows.win_hostname:
name: "{{ inventory_hostname.split('.')[0] }}"
register: r_rename_hostname
- name: Reboot to apply new hostname
# noqa no-handler
when: r_rename_hostname is changed
ansible.windows.win_reboot:
reboot_timeout: 3600
- name: Create new domain in a new forest on the target host
register: r_create_domain
ansible.windows.win_domain:
microsoft.ad.domain:
dns_domain_name: ansible.local
safe_mode_password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"
@@ -30,7 +33,7 @@
file: tasks/domain_services_check.yml
- name: Create some groups
community.windows.win_domain_group:
microsoft.ad.group:
name: "{{ item.name }}"
scope: global
loop:
@@ -41,7 +44,7 @@
delay: 10
- name: Create some users
community.windows.win_domain_user:
microsoft.ad.user:
name: "{{ item.name }}"
groups: "{{ item.groups }}"
password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"