Move netmask to separate config

This commit is contained in:
Joshua Boniface 2019-12-24 14:15:14 -05:00
parent 1570ccd370
commit a10fc7eb3f
3 changed files with 21 additions and 24 deletions

View File

@ -53,8 +53,9 @@ networks:
- "enp1s0f1" - "enp1s0f1"
mtu: 1500 mtu: 1500
domain: "{{ local_domain }}" domain: "{{ local_domain }}"
subnet: "192.168.100.0/24" netmask: "24"
floating_ip: "192.168.100.10/24" subnet: "192.168.100.0"
floating_ip: "192.168.100.10"
gateway_ip: "192.168.100.1" gateway_ip: "192.168.100.1"
"cluster": "cluster":
device: "vlan1001" device: "vlan1001"
@ -62,13 +63,15 @@ networks:
raw_device: "bondU" raw_device: "bondU"
mtu: 1500 mtu: 1500
domain: "pvc-cluster.local" domain: "pvc-cluster.local"
subnet: "10.0.0.0/24" netmask: "24"
floating_ip: "10.0.0.254/24" subnet: "10.0.0.0"
floating_ip: "10.0.0.254"
"storage": "storage":
device: "vlan1002" device: "vlan1002"
type: "vlan" type: "vlan"
raw_device: "bondU" raw_device: "bondU"
mtu: 1500 mtu: 1500
domain: "pvc-storage.local" domain: "pvc-storage.local"
subnet: "10.0.1.0/24" netmask: "24"
floating_ip: "10.0.1.254/24" subnet: "10.0.1.0"
floating_ip: "10.0.1.254"

View File

@ -54,11 +54,8 @@ pvc_nodes:
node_id: 1 node_id: 1
router_id: "192.168.100.11" router_id: "192.168.100.11"
upstream_ip: "192.168.100.11" upstream_ip: "192.168.100.11"
upstream_cidr: 24
cluster_ip: "10.0.0.1" cluster_ip: "10.0.0.1"
cluster_cidr: 24
storage_ip: "10.0.1.1" storage_ip: "10.0.1.1"
storage_cidr: 24
ipmi_host: "pvchv1-lom.{{ local_domain }}" ipmi_host: "pvchv1-lom.{{ local_domain }}"
ipmi_user: "{{ username_ipmi_host }}" ipmi_user: "{{ username_ipmi_host }}"
ipmi_password: "{{ passwd_ipmi_host }}" ipmi_password: "{{ passwd_ipmi_host }}"
@ -67,11 +64,8 @@ pvc_nodes:
node_id: 2 node_id: 2
router_id: "192.168.100.12" router_id: "192.168.100.12"
upstream_ip: "192.168.100.12" upstream_ip: "192.168.100.12"
upstream_cidr: 24
cluster_ip: "10.0.0.2" cluster_ip: "10.0.0.2"
cluster_cidr: 24
storage_ip: "10.0.1.2" storage_ip: "10.0.1.2"
storage_cidr: 24
ipmi_host: "pvchv2-lom.{{ local_domain }}" ipmi_host: "pvchv2-lom.{{ local_domain }}"
ipmi_user: "{{ username_ipmi_host }}" ipmi_user: "{{ username_ipmi_host }}"
ipmi_password: "{{ passwd_ipmi_host }}" ipmi_password: "{{ passwd_ipmi_host }}"
@ -80,11 +74,8 @@ pvc_nodes:
node_id: 3 node_id: 3
router_id: "192.168.100.13" router_id: "192.168.100.13"
upstream_ip: "192.168.100.13" upstream_ip: "192.168.100.13"
upstream_cidr: 24
cluster_ip: "10.0.0.3" cluster_ip: "10.0.0.3"
cluster_cidr: 24
storage_ip: "10.0.1.3" storage_ip: "10.0.1.3"
storage_cidr: 24
ipmi_host: "pvchv3-lom.{{ local_domain }}" ipmi_host: "pvchv3-lom.{{ local_domain }}"
ipmi_user: "{{ username_ipmi_host }}" ipmi_user: "{{ username_ipmi_host }}"
ipmi_password: "{{ passwd_ipmi_host }}" ipmi_password: "{{ passwd_ipmi_host }}"
@ -94,16 +85,19 @@ pvc_nodes:
pvc_upstream_device: "{{ networks['upstream']['device'] }}" pvc_upstream_device: "{{ networks['upstream']['device'] }}"
pvc_upstream_mtu: "{{ networks['upstream']['mtu'] }}" pvc_upstream_mtu: "{{ networks['upstream']['mtu'] }}"
pvc_upstream_domain: "{{ networks['upstream']['domain'] }}" pvc_upstream_domain: "{{ networks['upstream']['domain'] }}"
pvc_upstream_netmask: "{{ networks['upstream']['netmask'] }}"
pvc_upstream_subnet: "{{ networks['upstream']['subnet'] }}" pvc_upstream_subnet: "{{ networks['upstream']['subnet'] }}"
pvc_upstream_floatingip: "{{ networks['upstream']['floating_ip'] }}" pvc_upstream_floatingip: "{{ networks['upstream']['floating_ip'] }}"
pvc_upstream_gatewayip: "{{ networks['upstream']['gateway_ip'] }}" pvc_upstream_gatewayip: "{{ networks['upstream']['gateway_ip'] }}"
pvc_cluster_device: "{{ networks['cluster']['device'] }}" pvc_cluster_device: "{{ networks['cluster']['device'] }}"
pvc_cluster_mtu: "{{ networks['cluster']['mtu'] }}" pvc_cluster_mtu: "{{ networks['cluster']['mtu'] }}"
pvc_cluster_domain: "{{ networks['cluster']['domain'] }}" pvc_cluster_domain: "{{ networks['cluster']['domain'] }}"
pvc_cluster_netmask: "{{ networks['cluster']['netmask'] }}"
pvc_cluster_subnet: "{{ networks['cluster']['subnet'] }}" pvc_cluster_subnet: "{{ networks['cluster']['subnet'] }}"
pvc_cluster_floatingip: "{{ networks['cluster']['floating_ip'] }}" pvc_cluster_floatingip: "{{ networks['cluster']['floating_ip'] }}"
pvc_storage_device: "{{ networks['storage']['device'] }}" pvc_storage_device: "{{ networks['storage']['device'] }}"
pvc_storage_mtu: "{{ networks['storage']['mtu'] }}" pvc_storage_mtu: "{{ networks['storage']['mtu'] }}"
pvc_storage_domain: "{{ networks['storage']['domain'] }}" pvc_storage_domain: "{{ networks['storage']['domain'] }}"
pvc_storage_netmask: "{{ networks['storage']['netmask'] }}"
pvc_storage_subnet: "{{ networks['storage']['subnet'] }}" pvc_storage_subnet: "{{ networks['storage']['subnet'] }}"
pvc_storage_floatingip: "{{ networks['storage']['floating_ip'] }}" pvc_storage_floatingip: "{{ networks['storage']['floating_ip'] }}"

View File

@ -18,17 +18,17 @@ pvc:
networks: networks:
cluster: cluster:
domain: {{ pvc_cluster_domain }} domain: {{ pvc_cluster_domain }}
network: {{ pvc_cluster_subnet }} network: {{ pvc_cluster_subnet }}/{{ pvc_cluster_netmask }}
floating_ip: {{ pvc_cluster_floatingip }} floating_ip: {{ pvc_cluster_floatingip }}/{{ pvc_cluster_netmask }}
storage: storage:
domain: {{ pvc_storage_domain }} domain: {{ pvc_storage_domain }}
network: {{ pvc_storage_subnet }} network: {{ pvc_storage_subnet }}/{{ pvc_storage_netmask }}
floating_ip: {{ pvc_storage_floatingip }} floating_ip: {{ pvc_storage_floatingip }}/{{ pvc_storage_netmask }}
upstream: upstream:
domain: {{ pvc_upstream_domain }} domain: {{ pvc_upstream_domain }}
network: {{ pvc_upstream_subnet }} network: {{ pvc_upstream_subnet }}
floating_ip: {{ pvc_upstream_floatingip }} floating_ip: {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }}
gateway: {{ pvc_upstream_gatewayip }} gateway: {{ pvc_upstream_gatewayip }}/{{ pvc_upstream_netmask }}
coordinator: coordinator:
dns: dns:
database: database:
@ -73,15 +73,15 @@ pvc:
cluster: cluster:
device: {{ pvc_cluster_device }} device: {{ pvc_cluster_device }}
mtu: {{ pvc_cluster_mtu }} mtu: {{ pvc_cluster_mtu }}
address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ node.cluster_cidr }}{% endfor %} address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ pvc_cluster_netmask }}{% endfor %}
storage: storage:
device: {{ pvc_storage_device }} device: {{ pvc_storage_device }}
mtu: {{ pvc_storage_mtu }} mtu: {{ pvc_storage_mtu }}
address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ node.storage_cidr }}{% endfor %} address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ pvc_storage_netmask }}{% endfor %}
upstream: upstream:
device: {{ pvc_upstream_device }} device: {{ pvc_upstream_device }}
mtu: {{ pvc_upstream_mtu }} mtu: {{ pvc_upstream_mtu }}
address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.upstream_ip }}/{{ node.upstream_cidr }}{% endfor %} address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.upstream_ip }}/{{ pvc_upstream_netmask }}{% endfor %}