Skip to content

Commit 8566a90

Browse files
bhati-pradeeppeshayalaa-bishkenmoiniGevorg-Khachatryan-97
authored
Release 1.7.0 - Bug fixes and PC Projects changes (#285)
* feat/inventory_issue#232 (#233) * Add examples for images and static routes(#267) * Add mac address for vm creation (#272) * Update ntnx_vms.py Add the ability to optionally set MAC Address for a network interface * Update vms.py Add optional mac_address definition to _build_spec_networks * fix spec * sanity fix Co-authored-by: Ken Moini <[email protected]> * fix iass example Imprv/issue#250 (#268) * add var to iass example * iaas task to create static routes * fix vars * sanity fix * iaas fixes * Minor changes Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: Pradeepsingh Bhati <[email protected]> * Consider cluster reference as well for getting subnet uuid (#266) * Consider cluster as well for getting subnet uuid * Fix incase of update * Bug/inventory#228 new (#278) Fix for fetching all vms when length > 500 Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1> Co-authored-by: Pradeepsingh Bhati <[email protected]> * Bug/docs readme fixes (#280) * Doc fixes * Cluster name not usage warning * Enable role mappings and new user / user groups creation in ntnx_projects (#281) * Use of projects interna and custom acp creation * Add module utils changes for projects internal * projects internal user and user groups fixes * Minor user group ref fix * condition fix * Project scope in acp fix and create workflow fix * Add projects acp update and idempotency scenarios * Update projects info module to include acps * sanity fix * Add account references in projects * Add vpc related config in projects spec * Update project tests to include vpcs, tunnels and accounts * Minor fixes and test automation for projects internal based scenarios * Sanity fixes * Minor constants name change Co-authored-by: alaa-bish <[email protected]> * Enable PC tests * formatting * Isort fix * Minor subnet fix * Cluster filters using name fix * sanity fixes * Minor read me changes * Handle overlay subnet case while filtering subnets in vms based on cluster (#286) * handle overlay subnet case * Minor fixes and tests addition * Minor tests and sanity fixes * Remove clusters pagination as API doesn't support * Skippin cluster test due to tech issue * Make address groups tests names unique * Minor test fixes * Test fix * Adding free uuids * Minor fixes * Minor fixes for system roles * Add examples and doc update * Minor example update * Minor readme fix * Examples dependency * Release based readme change * 1.7.0 read me update * read me update * changelog changes * changelog changes * minor doc change * projects docs fix Co-authored-by: Andreas Hubert <[email protected]> Co-authored-by: alaa-bish <[email protected]> Co-authored-by: Ken Moini <[email protected]> Co-authored-by: Gevorg Khachatryan <[email protected]>
1 parent b82b58d commit 8566a90

File tree

128 files changed

+2568
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+2568
-278
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## v1.7.0 (30 Sep 2022)
2+
3+
**Feature:**
4+
- ntnx_projects - [Feat] Add capability to configure role mappings with collaboration on/off in ntnx_projects [\#252](https://github.com/nutanix/nutanix.ansible/issues/252)
5+
6+
**Bugs:**
7+
- ntnx_projects - [Bug] Clusters and subnets configured in project are not visible in new projects UI [\#283](https://github.com/nutanix/nutanix.ansible/issues/283)
8+
- ntnx_vms - Subnet Name --> UUID Lookup should be PE Cluster Aware [\#260](https://github.com/nutanix/nutanix.ansible/issues/260)
9+
- nutanix.ncp.ntnx_prism_vm_inventory - [Bug] Inventory does not fetch more than 500 Entities [\#228](https://github.com/nutanix/nutanix.ansible/issues/228)
10+
11+
**Improvements:**
12+
- examples - [Imprv] Add version related notes to examples [\#279](https://github.com/nutanix/nutanix.ansible/issues/279)
13+
- examples - [Imprv] Fix IaaS example [\#250](https://github.com/nutanix/nutanix.ansible/issues/250)
14+
- examples - [Imprv] add examples of Images and Static Routes Module [\#256](https://github.com/nutanix/nutanix.ansible/issues/256)
15+
- ntnx_projects - [Imprv] add vpcs and overlay subnets configure capability to module ntnx_projects [\#289](https://github.com/nutanix/nutanix.ansible/issues/289)
16+
- ntnx_vms - [Imprv] add functionality to set network mac_address to module ntnx_vms [\#201](https://github.com/nutanix/nutanix.ansible/issues/201)
17+
- nutanix.ncp.ntnx_prism_vm_inventory - [Imprv] add functionality constructed to module inventory [\#235](https://github.com/nutanix/nutanix.ansible/issues/235)
18+
19+
20+
**Full Changelog:** [here](https://github.com/nutanix/nutanix.ansible/compare/v1.6.0...v1.7.0)
21+
122
## v1.6.0 (9 Sep 2022)
223

324
**Features**

CHANGELOG.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ Nutanix.Ncp Release Notes
55
.. contents:: Topics
66

77

8+
v1.7.0
9+
======
10+
11+
Minor Changes
12+
-------------
13+
14+
- examples - [Imprv] Add version related notes to examples [\#279](https://github.com/nutanix/nutanix.ansible/issues/279)
15+
- examples - [Imprv] Fix IaaS example [\#250](https://github.com/nutanix/nutanix.ansible/issues/250)
16+
- examples - [Imprv] add examples of Images and Static Routes Module [\#256](https://github.com/nutanix/nutanix.ansible/issues/256)
17+
- ntnx_projects - [Feat] Add capability to configure role mappings with collaboration on/off in ntnx_projects [\#252](https://github.com/nutanix/nutanix.ansible/issues/252)
18+
- ntnx_projects - [Imprv] add vpcs and overlay subnets configure capability to module ntnx_projects [\#289](https://github.com/nutanix/nutanix.ansible/issues/289)
19+
- ntnx_vms - [Imprv] add functionality to set network mac_address to module ntnx_vms [\#201](https://github.com/nutanix/nutanix.ansible/issues/201)
20+
- nutanix.ncp.ntnx_prism_vm_inventory - [Imprv] add functionality constructed to module inventory [\#235](https://github.com/nutanix/nutanix.ansible/issues/235)
21+
22+
Bugfixes
23+
--------
24+
25+
- ntnx_projects - [Bug] Clusters and subnets configured in project are not visible in new projects UI [\#283](https://github.com/nutanix/nutanix.ansible/issues/283)
26+
- ntnx_vms - Subnet Name --> UUID Lookup should be PE Cluster Aware [\#260](https://github.com/nutanix/nutanix.ansible/issues/260)
27+
- nutanix.ncp.ntnx_prism_vm_inventory - [Bug] Inventory does not fetch more than 500 Entities [[\#228](https://github.com/nutanix/nutanix.ansible/issues/228)]
28+
829
v1.6.0
930
======
1031

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Checkout this [blog](https://www.nutanix.dev/2022/08/05/getting-started-with-the
1313
# Version compatibility
1414

1515
## Ansible
16-
This collection has been tested against following versions:
16+
This collection and examples has been tested against following versions :
1717
1. ansible==5.0.1
1818
2. ansible-core==2.12.3
1919

2020
## Python
2121
This collection requires Python 2.7 or greater
2222

23-
## Prism Cenral
23+
## Prism Central
2424
> For the 1.1.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc2022.1.0.2, pc.2021.9.0.5 and pc.2021.8.0.1.
2525
2626
> For the 1.2.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.5.
@@ -31,13 +31,24 @@ This collection requires Python 2.7 or greater
3131
3232
> For the 1.5.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.6, pc.2022.4.0.2 and pc2022.1.0.2.
3333
34+
> For the 1.7.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.6, pc.2022.4 and pc2022.1.0.2.
35+
3436
### Notes:
3537
1. Static routes module (ntnx_static_routes) is supported for PC versions >= pc.2022.1
3638

3739
2. Adding cluster references in projects module (ntnx_projects) is supported for PC versions >= pc.2022.1
3840

3941
3. For Users and User Groups modules (ntnx_users and ntnx_user_groups), adding Identity Provider (IdP) & Organizational Unit (OU) based users/groups are supported for PC versions >= pc.2022.1
4042

43+
#### v1.7.0 additions:
44+
1. Added functionality to add cluster reference while using vlan subnet name in vms to pull subnet info from particular cluster. Checkout vm.yml example for same.
45+
46+
2. Added functionality to configure role mappings, collaboration, new user/user groups, vpcs and accounts in ntnx_projects. Checkout projects_with_role_mapping.yml example for same.
47+
48+
3. Added constructed inventory feature to inventory module to construct custom vars and groups based on existing inventory.
49+
50+
4. Now inventory module can fetch 500+ entities.
51+
4152
Prism Central based examples: https://github.com/nutanix/nutanix.ansible/tree/main/examples/
4253

4354
## Foundation
@@ -93,7 +104,7 @@ For example, the playbook for iaas.yml is as follows:
93104
- nutanix.ncp
94105
module_defaults:
95106
group/nutanix.ncp.ntnx:
96-
nutanix_host: <host_ip>
107+
nutanix_host: <pc_ip>
97108
nutanix_username: <user>
98109
nutanix_password: <pass>
99110
validate_certs: true
@@ -214,7 +225,7 @@ We glady welcome contributions from the community. From updating the documentati
214225
collections:
215226
- nutanix.ncp
216227
vars:
217-
nutanix_host: <host_ip>
228+
nutanix_host: <pc_ip>
218229
nutanix_username: <user>
219230
nutanix_password: <pass>
220231
validate_certs: true

changelogs/changelog.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,24 @@ releases:
261261
name: ntnx_karbon_registries_info
262262
namespace: ''
263263
release_date: '2022-09-09'
264+
1.7.0:
265+
changes:
266+
bugfixes:
267+
- ntnx_projects - [Bug] Clusters and subnets configured in project are not visible
268+
in new projects UI [\#283](https://github.com/nutanix/nutanix.ansible/issues/283)
269+
- ntnx_vms - Subnet Name --> UUID Lookup should be PE Cluster Aware [\#260](https://github.com/nutanix/nutanix.ansible/issues/260)
270+
- nutanix.ncp.ntnx_prism_vm_inventory - [Bug] Inventory does not fetch more
271+
than 500 Entities [[\#228](https://github.com/nutanix/nutanix.ansible/issues/228)]
272+
minor_changes:
273+
- examples - [Imprv] Add version related notes to examples [\#279](https://github.com/nutanix/nutanix.ansible/issues/279)
274+
- examples - [Imprv] Fix IaaS example [\#250](https://github.com/nutanix/nutanix.ansible/issues/250)
275+
- examples - [Imprv] add examples of Images and Static Routes Module [\#256](https://github.com/nutanix/nutanix.ansible/issues/256)
276+
- ntnx_projects - [Feat] Add capability to configure role mappings with collaboration
277+
on/off in ntnx_projects [\#252](https://github.com/nutanix/nutanix.ansible/issues/252)
278+
- ntnx_projects - [Imprv] add vpcs and overlay subnets configure capability
279+
to module ntnx_projects [\#289](https://github.com/nutanix/nutanix.ansible/issues/289)
280+
- ntnx_vms - [Imprv] add functionality to set network mac_address to module
281+
ntnx_vms [\#201](https://github.com/nutanix/nutanix.ansible/issues/201)
282+
- nutanix.ncp.ntnx_prism_vm_inventory - [Imprv] add functionality constructed
283+
to module inventory [\#235](https://github.com/nutanix/nutanix.ansible/issues/235)
284+
release_date: '2022-09-30'

examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Examples Dependency
2+
These examples has been tested against following versions :
3+
1. ansible==5.0.1
4+
2. ansible-core==2.12.3

examples/acp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/acp_info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/address_groups_crud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- nutanix.ncp
66
module_defaults:
77
group/nutanix.ncp.ntnx:
8-
nutanix_host: <host_ip>
8+
nutanix_host: <pc_ip>
99
nutanix_username: <user>
1010
nutanix_password: <pass>
1111
validate_certs: false

examples/clusters_info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/fip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/fip_info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/hosts_info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/iaas/iaas.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false
1313
tasks:
14+
- name: Include vars file
15+
include_vars:
16+
file: vars.yml
1417
- include_role:
1518
name: external_subnet
1619
- include_role:
1720
name: vpc
21+
- include_role:
22+
name: static_route
1823
- include_role:
1924
name: overlay_subnet
2025
- include_role:

examples/iaas/policies_create.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false
1313
tasks:
14+
- name: Include vars file
15+
include_vars:
16+
file: vars.yml
1417
- include_role:
1518
name: pbr

examples/iaas/policies_delete.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- nutanix.ncp
77
module_defaults:
88
group/nutanix.ncp.ntnx:
9-
nutanix_host: <host_ip>
9+
nutanix_host: <pc_ip>
1010
nutanix_username: <user>
1111
nutanix_password: <pass>
1212
validate_certs: false

examples/iaas/roles/external_subnet/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
- name: Inputs for external subnets task
33
include_tasks: external_subnet.yml
44
with_items:
5-
- { name: Ext-Nat, vlan_id: 102, ip: 10.44.3.192, prefix: 27, gip: 10.44.3.193, sip: 10.44.3.198, eip: 10.44.3.207, eNat: True }
5+
- { name: "{{external_subnet.name}}", vlan_id: "{{external_subnet.vlan_id}}", ip: "{{external_subnet.ip}}", prefix: "{{external_subnet.prefix}}", gip: "{{external_subnet.gip}}", sip: "{{external_subnet.sip}}", eip: "{{external_subnet.eip}}", eNat: "{{external_subnet.eNat}}" }

examples/iaas/roles/external_subnet/vars/main.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/iaas/roles/overlay_subnet/tasks/main.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
- name: Inputs for overlay subnets
33
include_tasks: overlay_subnet.yml
44
with_items:
5-
- { name: Prod-SubnetA, vpc_name: Prod, nip: 10.1.1.0, prefix: 24, gip: 10.1.1.1, sip: 10.1.1.2, eip: 10.1.1.5,
6-
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
7-
- { name: Prod-SubnetB, vpc_name: Prod, nip: 10.1.2.0, prefix: 24, gip: 10.1.2.1, sip: 10.1.2.2, eip: 10.1.2.5,
8-
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
9-
- { name: Dev-SubnetA, vpc_name: Dev, nip: 10.1.1.0, prefix: 24, gip: 10.1.1.1, sip: 10.1.1.2, eip: 10.1.1.5,
10-
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
11-
- { name: Dev-SubnetB, vpc_name: Dev, nip: 10.1.2.0, prefix: 24, gip: 10.1.2.1, sip: 10.1.2.2, eip: 10.1.2.5,
12-
domain_name: "calm.nutanix.com", dns_servers: ["8.8.8.8", "8.8.8.4"], domain_search: ["calm.nutanix.com", "eng.nutanix.com"] }
5+
- { name: "{{Prod_SubnetA.name}}", vpc_name: "{{Prod_SubnetA.vpc_name}}",
6+
nip: "{{Prod_SubnetA.nip}}", prefix: "{{Prod_SubnetA.prefix}}",
7+
gip: "{{Prod_SubnetA.gip}}", sip: "{{Prod_SubnetA.sip}}", eip: "{{Prod_SubnetA.eip}}",
8+
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
9+
- { name: "{{Prod_SubnetB.name}}", vpc_name: "{{Prod_SubnetB.vpc_name}}", nip: "{{Prod_SubnetB.nip}}", prefix: "{{Prod_SubnetB.prefix}}", gip: "{{Prod_SubnetB.gip}}", sip: "{{Prod_SubnetB.sip}}", eip: "{{Prod_SubnetB.eip}}",
10+
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
11+
- { name: "{{Dev_SubnetA.name}}", vpc_name: "{{Dev_SubnetA.vpc_name}}", nip: "{{Dev_SubnetA.nip}}", prefix: "{{Dev_SubnetA.prefix}}", gip: "{{Dev_SubnetA.gip}}", sip: "{{Dev_SubnetA.sip}}", eip: "{{Dev_SubnetA.eip}}",
12+
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }
13+
- { name: "{{Dev_SubnetB.name}}", vpc_name: "{{Dev_SubnetB.vpc_name}}", nip: "{{Dev_SubnetB.nip}}", prefix: "{{Dev_SubnetB.prefix}}", gip: "{{Dev_SubnetB.gip}}", sip: "{{Dev_SubnetB.sip}}", eip: "{{Dev_SubnetB.eip}}",
14+
domain_name: "{{domain_name}}", dns_servers: "{{dns_servers}}", domain_search: "{{domain_search}}" }

examples/iaas/roles/pbr/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
- name: Include PBR task
33
include_tasks: pbr.yml
44
with_items:
5-
- { vpc_name: Prod, priority: 101, nip: 10.1.2.0, prefix: 24 }
6-
- { vpc_name: Dev, priority: 101, nip: 10.1.2.0, prefix: 24 }
5+
- { vpc_name: "{{vpc_names[0]}}", priority: 101, nip: 10.1.2.0, prefix: 24 }
6+
- { vpc_name: "{{vpc_names[1]}}", priority: 101, nip: 10.1.2.0, prefix: 24 }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
collections:
2+
- nutanix.ncp
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: Inputs for static routes task
3+
include_tasks: static_route.yml
4+
with_items:
5+
- { vpc_uuid: "{{vpc_uuids[0]}}", subnet_name: "{{external_subnet.name}}", destination: "10.2.2.0/24"}
6+
- { vpc_uuid: "{{vpc_uuids[1]}}", subnet_name: "{{external_subnet.name}}", destination: "10.2.3.0/24"}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- name: Create static route
3+
ntnx_static_routes:
4+
state: present
5+
vpc_uuid: "{{ item.vpc_uuid }}"
6+
static_routes:
7+
- destination: "{{ item.destination }}"
8+
next_hop:
9+
external_subnet_ref:
10+
name: "{{ item.subnet_name }}"
11+
register: static_route
12+
- debug:
13+
msg:
14+
- "uuid: {{ static_route.response.metadata.uuid }}"

examples/iaas/roles/vm/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: Inputs for vm task
33
include_tasks: vm.yml
44
with_items:
5-
- {name: "Prod-Wordpress-App", desc: "Prod-Wordpress-App", is_connected: True, subnet_name: Prod-SubnetA, image_name: "wordpress-appserver", private_ip: ""}
6-
- {name: "Prod-Wordpress-DB", desc: "Prod-Wordpress-DB", is_connected: True, subnet_name: Prod-SubnetB, image_name: "wordpress-db", private_ip: 10.1.2.5}
7-
- {name: "Dev-Wordpress-App", desc: "Dev-Wordpress-App", is_connected: True, subnet_name: Dev-SubnetA, image_name: "wordpress-appserver", private_ip: ""}
8-
- {name: "Dev-Wordpress-DB", desc: "Dev-Wordpress-DB", is_connected: True, subnet_name: Dev-SubnetB, image_name: "wordpress-db", private_ip: 10.1.2.5}
5+
- {name: "Prod-Wordpress-App", desc: "Prod-Wordpress-App", is_connected: True, subnet_name: "{{Prod_SubnetA.name}}", image_name: "wordpress-appserver", private_ip: ""}
6+
- {name: "Prod-Wordpress-DB", desc: "Prod-Wordpress-DB", is_connected: True, subnet_name: "{{Prod_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5}
7+
- {name: "Dev-Wordpress-App", desc: "Dev-Wordpress-App", is_connected: True, subnet_name: "{{Dev_SubnetA.name}}", image_name: "wordpress-appserver", private_ip: ""}
8+
- {name: "Dev-Wordpress-DB", desc: "Dev-Wordpress-DB", is_connected: True, subnet_name: "{{Dev_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5}

examples/iaas/roles/vm/tasks/vm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: "{{ item.name }}"
66
desc: "{{ item.desc }}"
77
cluster:
8-
name: auto_cluster_prod_1a642ea0a5c3
8+
name: "{{ cluster.name }}"
99
networks:
1010
- is_connected: "{{ item.is_connected }}"
1111
subnet:
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2+
- set_fact:
3+
vpc_uuids: []
24
- name: Inputs vpcs task
35
include_tasks: vpc.yml
46
with_items:
5-
- { name: Prod, subnet_name: Ext-Nat}
6-
- { name: Dev, subnet_name: Ext-Nat}
7+
- { name: "{{vpc_names[0]}}", subnet_name: "{{external_subnet.name}}"}
8+
- { name: "{{vpc_names[1]}}", subnet_name: "{{external_subnet.name}}"}

examples/iaas/roles/vpc/tasks/vpc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
- debug:
1010
msg:
1111
- "name: {{ vpc.response.status.name }}"
12-
- "uuid: {{ vpc.vpc_uuid }}"
12+
- "uuid: {{ vpc.vpc_uuid }}"
13+
- set_fact:
14+
vpc_uuids: "{{ vpc_uuids + [ vpc.vpc_uuid ] }}"

0 commit comments

Comments
 (0)