1 Commits

Author SHA1 Message Date
Chris Edillon
93e9128345 Add availability zone mapping for VPC subnet
Occasionally the amazon.aws.ec2_vpc_subnet module would randomly choose
an availability zone where not all instance types are availble, causing
the cloud stack workflow to fail.  This PR adds a mapping of common AZs
to the regions available in the survey attached ot the Create VPC job
template, and only creates a subnet from the list of AZs.
2025-02-18 10:17:10 -05:00
8 changed files with 8 additions and 51 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -101,21 +101,6 @@
retries: 10 retries: 10
delay: 30 delay: 30
- name: Get available charts from gitlab operator repo
register: gitlab_chart_versions
ansible.builtin.uri:
url: https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/raw/master/CHART_VERSIONS?ref_type=heads
method: GET
return_content: true
- name: Debug gitlab_chart_versions
ansible.builtin.debug:
var: gitlab_chart_versions.content | from_yaml
- name: Get latest chart from available_chart_versions
ansible.builtin.set_fact:
gitlab_chart_version: "{{ (gitlab_chart_versions.content | split())[0] }}"
- name: Grab url for Gitlab spec - name: Grab url for Gitlab spec
ansible.builtin.set_fact: ansible.builtin.set_fact:
cluster_domain: "apps{{ lookup('ansible.builtin.env', 'K8S_AUTH_HOST') | regex_search('\\.[^:]*') }}" cluster_domain: "apps{{ lookup('ansible.builtin.env', 'K8S_AUTH_HOST') | regex_search('\\.[^:]*') }}"
@@ -148,20 +133,3 @@
route.openshift.io/termination: "edge" route.openshift.io/termination: "edge"
certmanager-issuer: certmanager-issuer:
email: "{{ cert_email | default('nobody@nowhere.nosite') }}" email: "{{ cert_email | default('nobody@nowhere.nosite') }}"
- name: Print out warning and initial details about deployment
vars:
msg: |
If not immediately successful be aware that the Gitlab instance can take
a couple minutes to come up, so be patient.
URL for Gitlab instance:
https://gitlab.{{ cluster_domain }}
The initial login user is 'root', and the password can be found by logging
into the OpenShift cluster portal, and on the left hand side of the administrator
portal, under workloads, select Secrets and look for 'gitlab-gitlab-initial-root-password'
ansible.builtin.debug:
msg: "{{ msg.split('\n') }}"
...

View File

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

View File

@@ -5,12 +5,6 @@
report_server: aws_win1 report_server: aws_win1
tasks: tasks:
- name: Assert that host is in webservers group
ansible.builtin.assert:
that: "'{{ report_server }}' in groups.os_windows"
msg: "Please run the 'Deploy Cloud Stack in AWS' Workflow Job Template first"
- name: Patch windows server - name: Patch windows server
ansible.builtin.include_role: ansible.builtin.include_role:
name: demo.patching.patch_windows name: demo.patching.patch_windows

View File

@@ -40,6 +40,7 @@ controller_templates:
inventory: "Demo Inventory" inventory: "Demo Inventory"
project: "Ansible Product Demos" project: "Ansible Product Demos"
playbook: "windows/patching.yml" playbook: "windows/patching.yml"
execution_environment: Default execution environment
notification_templates_started: Telemetry notification_templates_started: Telemetry
notification_templates_success: Telemetry notification_templates_success: Telemetry
notification_templates_error: Telemetry notification_templates_error: Telemetry
@@ -85,6 +86,7 @@ controller_templates:
inventory: "Demo Inventory" inventory: "Demo Inventory"
project: "Ansible Product Demos" project: "Ansible Product Demos"
playbook: "windows/rollback.yml" playbook: "windows/rollback.yml"
execution_environment: Default execution environment
notification_templates_started: Telemetry notification_templates_started: Telemetry
notification_templates_success: Telemetry notification_templates_success: Telemetry
notification_templates_error: Telemetry notification_templates_error: Telemetry
@@ -109,6 +111,7 @@ controller_templates:
inventory: "Demo Inventory" inventory: "Demo Inventory"
project: "Ansible Product Demos" project: "Ansible Product Demos"
playbook: "windows/connect.yml" playbook: "windows/connect.yml"
execution_environment: Default execution environment
notification_templates_started: Telemetry notification_templates_started: Telemetry
notification_templates_success: Telemetry notification_templates_success: Telemetry
notification_templates_error: Telemetry notification_templates_error: Telemetry