diff options
author | carey.xu <carey.xuhan@huawei.com> | 2015-09-18 14:55:04 +0800 |
---|---|---|
committer | carey.xu <carey.xuhan@huawei.com> | 2015-09-18 15:23:38 +0800 |
commit | 95343d26c8d2cc9789b87a77748b3e7becd548ca (patch) | |
tree | f2850e996dd61b46829623d088c329f94b6a9c88 /deploy/adapters/ansible/roles/setup-network/tasks | |
parent | 28420aea06c161605ba07449daa38436d0911e20 (diff) |
separate the mgmt vip from public vip, remove HA_VIP
Change-Id: Iaa877b7ce93ba9c12bc9be6f3bd101779f07ae9c
JIRA: COMPASS-51
Diffstat (limited to 'deploy/adapters/ansible/roles/setup-network/tasks')
-rw-r--r-- | deploy/adapters/ansible/roles/setup-network/tasks/main.yml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml index 94816044..8df1ac3a 100644 --- a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml +++ b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml @@ -15,24 +15,24 @@ when: 'item["type"] == "ovs"' - name: setup sys intf - shell: ip link del {{ item["name"] }}; \ - ip link add link {{ item["interface"] }} name {{ item["name"] }} type vlan id {{ item["vlan_tag"] }}; \ - ip link set {{ item["interface"] }} up - when: '"vlan_tag" in item' - with_items: "{{ network_cfg['sys_intf_mappings'] }}" + shell: ip link del {{ item.key }}; \ + ip link add link {{ item.value["interface"] }} name {{ item.key }} type vlan id {{ item.value["vlan_tag"] }}; \ + ip link set {{ item.value["interface"] }} up + when: '"vlan_tag" in item.value and item.value["type"] == "vlan"' + with_dict: "{{ sys_intf_mappings }}" - name: set sys intf ip - shell: ip addr del {{ item["ip"] }}/{{ item["netmask"] }} dev {{ item["alias"] }}; \ - ip addr add {{ item["ip"] }}/{{ item["netmask"] }} dev {{ item["alias"] }}; \ - ip link set {{ item["alias"] }} up - with_items: "{{ host_ip_settings }}" + shell: ip addr del {{ item.value["ip"] }}/{{ item.value["netmask"] }} dev {{ item.value["alias"] }}; \ + ip addr add {{ item.value["ip"] }}/{{ item.value["netmask"] }} dev {{ item.value["alias"] }}; \ + ip link set {{ item.value["alias"] }} up + with_dict: "{{ host_ip_settings }}" - name: set gateway shell: ip route del default; \ - ip route add default via {{ item["gw"] }} dev {{ item["alias"] }} - when: '"gw" in item' - with_items: "{{ host_ip_settings }}" + ip route add default via {{ item.value["gw"] }} dev {{ item.key }} + when: '"gw" in item.value' + with_dict: "{{ host_ip_settings }}" - name: copy net config template: src=my_configs.debian dest=/etc/network/interfaces.d/my_configs.cfg |