Skip to content

Commit

Permalink
Merge pull request #27 from cisco-open/fix-non-cluster-deployment
Browse files Browse the repository at this point in the history
fix non-cluster vmanage deployment on Azure
  • Loading branch information
przsus authored Oct 25, 2024
2 parents d9105fe + ab163cb commit 4338533
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions roles/azure_controllers/tasks/azure_vmanage_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
Subnet: "{{ subnet_item.name }}"
type: "{{ subnet_item.type }}"
loop:
- "{{ transport_subnet }}"
- "{{ mgmt_subnet }}"
- "{{ transport_subnet }}"
loop_control:
loop_var: subnet_item
register: public_ip_addresses
Expand Down Expand Up @@ -127,16 +127,15 @@
- name: "Set NICs IDs to be consumed by VM creation"
ansible.builtin.set_fact:
nics_ids_list: "{{ nics_ids_list + [nic_item.id] }}"
loop:
- "{{ az_mgmt_nic }}"
- "{{ az_transport_nic }}"
- "{{ az_cluster_nic }}"
loop: >
{{
[az_mgmt_nic, az_transport_nic]
+ ([az_cluster_nic] if az_cluster_nic is defined else [])
}}
loop_control:
loop_var: nic_item
label: "{{ nic_item.id | default(omit) }}"
when:
- nic_item is defined
- nic_item.id is defined
when: nic_item.id is defined

- name: "Set vmanage facts"
ansible.builtin.set_fact:
Expand Down Expand Up @@ -225,7 +224,7 @@
admin_password: "{{ admin_password }}"
mgmt_public_ip: "{{ vmanage_mgmt_public_ip }}"
transport_public_ip: "{{ vmanage_transport_public_ip }}"
cluster_private_ip: "{{ vmanage_cluster_private_ip }}"
cluster_private_ip: "{{ vmanage_cluster_private_ip | default(omit) }}"
persona: "{{ vmanage_persona }}"
changed_when: true
notify: Show deployment_facts
Expand Down

0 comments on commit 4338533

Please sign in to comment.