diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/config-controller')
7 files changed, 42 insertions, 17 deletions
diff --git a/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml b/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml index 728dc559..cc14347a 100644 --- a/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml +++ b/deploy/adapters/ansible/roles/config-controller/tasks/RedHat.yml @@ -8,30 +8,30 @@ ############################################################################## --- # yamllint disable rule:line-length -- name: generate vxlan vlan ifcfg-if script +- name: generate tenant vlan ifcfg-if script template: - src: ifcfg-if.vxlan - dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}} + src: ifcfg-if.tenant + dest: /etc/sysconfig/network-scripts/ifcfg-{{contr_sys_mappings["tenant"]["interface"]}}.{{contr_sys_mappings["tenant"]["vlan_tag"]}} - name: generate storage vlan ifcfg-if script template: src: ifcfg-if.storage - dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}} + dest: /etc/sysconfig/network-scripts/ifcfg-{{contr_sys_mappings["storage"]["interface"]}}.{{contr_sys_mappings["storage"]["vlan_tag"]}} -- name: add br-vlan to interface script +- name: add br-external to interface script lineinfile: - dest: /etc/sysconfig/network-scripts/ifcfg-{{ network_cfg["provider_net_mappings"][0]["interface"] }} - line: "BRIDGE=br-vlan" + dest: /etc/sysconfig/network-scripts/ifcfg-{{contr_sys_mappings["external"]["interface"]}} + line: "BRIDGE=br-external" - name: add br-storage to interface script lineinfile: - dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}} + dest: /etc/sysconfig/network-scripts/ifcfg-{{contr_sys_mappings["storage"]["interface"]}}.{{contr_sys_mappings["storage"]["vlan_tag"]}} line: "BRIDGE=br-storage" -- name: add br-vxlan to interface script +- name: add br-tenant to interface script lineinfile: - dest: /etc/sysconfig/network-scripts/ifcfg-{{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}} - line: "BRIDGE=br-vxlan" + dest: /etc/sysconfig/network-scripts/ifcfg-{{contr_sys_mappings["tenant"]["interface"]}}.{{contr_sys_mappings["tenant"]["vlan_tag"]}} + line: "BRIDGE=br-tenant" # yamllint enable rule:line-length - name: remove eth0 ip addresss @@ -56,9 +56,9 @@ src: ifcfg-br-mgmt dest: /etc/sysconfig/network-scripts/ -- name: generate ifcfg-br-vlan script +- name: generate ifcfg-br-external script template: - src: ifcfg-br-vlan + src: ifcfg-br-external dest: /etc/sysconfig/network-scripts/ - name: generate ifcfg-br-storag script @@ -66,9 +66,9 @@ src: ifcfg-br-storage dest: /etc/sysconfig/network-scripts/ -- name: generate ifcfg-br-vxlan script +- name: generate ifcfg-br-tenant script template: - src: ifcfg-br-vxlan + src: ifcfg-br-tenant dest: /etc/sysconfig/network-scripts/ - name: restart the network diff --git a/deploy/adapters/ansible/roles/config-controller/tasks/main.yml b/deploy/adapters/ansible/roles/config-controller/tasks/main.yml index 674c80cc..9f390307 100644 --- a/deploy/adapters/ansible/roles/config-controller/tasks/main.yml +++ b/deploy/adapters/ansible/roles/config-controller/tasks/main.yml @@ -12,3 +12,7 @@ - include: "{{ ansible_os_family }}.yml" when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7' + +- name: set fact for local mirror + set_fact: + local_mirror: "{{ ansible_distribution }}" diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external new file mode 100644 index 00000000..adf29127 --- /dev/null +++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-external @@ -0,0 +1,11 @@ +DEVICE=br-external +TYPE=Bridge +IPADDR={{ ip_settings[inventory_hostname]["external"]["ip"] }} +PREFIX=24 +BOOTPROTO=none +ONBOOT=yes +DELAY=0 +DEFROUTE="yes" +GATEWAY={{ ip_settings[inventory_hostname]["external"]["gw"] }} +DNS1=8.8.8.8 +DNS2=8.8.4.4 diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt index 7f1931c8..2e958cc7 100644 --- a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt +++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-mgmt @@ -1,6 +1,6 @@ DEVICE=br-mgmt TYPE=Bridge -IPADDR={{host_info[inventory_hostname].MGMT_IP}} +IPADDR={{ip_settings[inventory_hostname]["mgmt"]["ip"]}} PREFIX=24 BOOTPROTO=none ONBOOT=yes diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-tenant b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-tenant new file mode 100644 index 00000000..1f8344e6 --- /dev/null +++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-br-tenant @@ -0,0 +1,6 @@ +DEVICE=br-tenant +TYPE=Bridge +BOOTPROTO=none +DEFROUTE="no" +ONBOOT=yes +DELAY=0 diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage index 96afb1bd..b71a80cf 100644 --- a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage +++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.storage @@ -1,4 +1,4 @@ -DEVICE={{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}} +DEVICE={{contr_sys_mappings["storage"]["interface"]}}.{{contr_sys_mappings["storage"]["vlan_tag"]}} BOOTPROTO=none ONBOOT=yes VLAN=yes diff --git a/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant new file mode 100644 index 00000000..bc9f2a57 --- /dev/null +++ b/deploy/adapters/ansible/roles/config-controller/templates/ifcfg-if.tenant @@ -0,0 +1,4 @@ +DEVICE={{contr_sys_mappings["tenant"]["interface"]}}.{{contr_sys_mappings["tenant"]["vlan_tag"]}} +BOOTPROTO=none +ONBOOT=yes +VLAN=yes |