FIX external net create 03/26903/2
authorliyuenan <liyuenan@huawei.com>
Thu, 12 Jan 2017 03:28:13 +0000 (11:28 +0800)
committerYuenan Li <liyuenan@huawei.com>
Thu, 12 Jan 2017 03:54:38 +0000 (03:54 +0000)
JIRA: -

The dictionary public_net_info in network.yml had changed to pass the
yamllint:
  public_net_info:
    enable: True
change to:
  public_net_info:
    enable: "True"
Because of that, the public_net_info.enable in group_var/all had changed.
  'public_net_info': {..., 'enable': True, ...}
change to:
  'public_net_info': {..., 'enable': 'True', ...}
So the conditionals in roles/ext-network/tasks/main.yml should be changed,
otherwise the ext-net can not be created.

Change-Id: I7b4aeb1d0edec0ad77252849704bdf3055adfa5a
Signed-off-by: liyuenan <liyuenan@huawei.com>
deploy/adapters/ansible/roles/ext-network/tasks/main.yml

index 0fc3ee3..d212dd9 100644 (file)
@@ -29,7 +29,7 @@
         --provider:network_type {{ public_net_info.type }} \
         --provider:physical_network {{ public_net_info.provider_network }} \
         --router:external "True"
-  when: public_net_info.enable == True
+  when: public_net_info.enable == "True"
         and inventory_hostname == groups['controller'][0]
 
 - name: create external subnet
@@ -42,5 +42,5 @@
         --allocation-pool \
         start={{ public_net_info.floating_ip_start }},end={{ public_net_info.floating_ip_end }} \
         {{ public_net_info.network }} {{ public_net_info.floating_ip_cidr }}
-  when: public_net_info.enable == True
+  when: public_net_info.enable == "True"
         and inventory_hostname == groups['controller'][0]