Copy default net env yaml while not on bm
This commit adds the copy of the default network-environment.yml file in case the deployment is not a of undercloud_type "baremetal". Change-Id: I1f516a335ce0690f219a66623dbfc96fb35f6961
This commit is contained in:
parent
21b642bc3c
commit
e056b98887
|
@ -1,6 +1,32 @@
|
|||
---
|
||||
working_dir: /home/stack
|
||||
|
||||
network_isolation: true
|
||||
|
||||
network_environment_file: network-environment.yaml.j2
|
||||
|
||||
external_network_cidr: 192.168.23.0/24
|
||||
undercloud_external_network_cidr: 10.0.0.1/24
|
||||
undercloud_network_cidr: 192.168.24.0/24
|
||||
|
||||
overcloud_public_vip: 10.0.0.5
|
||||
ssl_overcloud: false
|
||||
|
||||
network_environment_args:
|
||||
ExternalNetCidr: "{{ undercloud_external_network_cidr }}"
|
||||
ExternalAllocationPools: >
|
||||
[{'start': '{{ undercloud_external_network_cidr|nthhost(4) }}',
|
||||
'end': '{{ undercloud_external_network_cidr|nthhost(250) }}'}]
|
||||
NeutronExternalNetworkBridge: ""
|
||||
ControlPlaneSubnetCidr: "{{ undercloud_network_cidr|ipaddr('prefix') }}"
|
||||
ControlPlaneDefaultRoute: "{{ undercloud_network_cidr|nthhost(1) }}"
|
||||
EC2MetadataIp: "{{ undercloud_network_cidr|nthhost(1) }}"
|
||||
DnsServers: [ '{{ external_network_cidr|nthhost(1) }}' ]
|
||||
|
||||
public_virtual_fixed_ips:
|
||||
PublicVirtualFixedIPs: >
|
||||
[{'ip_address':'{{ overcloud_public_vip }}'}]
|
||||
|
||||
undercloud_type: virtual
|
||||
baremetal_instackenv: "{{ working_dir }}/instackenv.json"
|
||||
baremetal_network_environment: "{{ working_dir }}/network-isolation.yml"
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
---
|
||||
- name: Add PublicVirtualFixedIPs Argument to network environment file
|
||||
set_fact:
|
||||
network_environment_args: >-
|
||||
{{ network_environment_args | combine(public_virtual_fixed_ips) }}
|
||||
when: ssl_overcloud|bool and undercloud_type != "baremetal"
|
||||
|
||||
- name: Create network environment file for network isolation
|
||||
template:
|
||||
src: "{{ network_environment_file }}"
|
||||
dest: "{{ working_dir }}/network-environment.yaml"
|
||||
mode: 0644
|
||||
when: network_isolation|bool and undercloud_type != "baremetal"
|
||||
|
||||
- when: undercloud_type == "baremetal"
|
||||
block:
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{#
|
||||
This takes advantage of the fact that valid JSON is also
|
||||
valid YAML. The default to_nice_yaml filter doesn't quote strings,
|
||||
which can cause unexpected implicit type conversion when the
|
||||
resulting YAML is consumed, whereas with JSON all strings are quoted.
|
||||
#}
|
||||
{% set parameter_defaults = {'parameter_defaults': network_environment_args} %}
|
||||
{{ parameter_defaults|to_nice_json }}
|
Loading…
Reference in New Issue