summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/setup-network
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-22 16:59:08 +0800
committerliyuenan <liyuenan@huawei.com>2016-12-26 17:54:43 +0800
commit6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (patch)
treea78a15b915741bb3ef7ddd4a61a801dd9f46d577 /deploy/adapters/ansible/roles/setup-network
parenta9041dbf7b68f56169e82de3c37601b7e86867b0 (diff)
Update ansible version
JIRA: COMPASS-511 Change-Id: Id0e83c65a08c9f9036b5d3a597b905e8a7bde6e8 Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/setup-network')
-rw-r--r--deploy/adapters/ansible/roles/setup-network/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/setup-network/templates/network.cfg8
2 files changed, 6 insertions, 6 deletions
diff --git a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
index e1fdf925..2649ea79 100644
--- a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
@@ -65,14 +65,14 @@
shell: >
python /opt/setup_networks/check_network.py \
"{{ inventory_hostname }}" \
- "{{ ip_settings }}"
+ "{{ ip_settings | to_json }}"
tags:
- network_check
retries: 3
delay: 2
- name: add to boot scripts
- service: name=net_init enabled=yes
+ shell: update-rc.d net_init defaults
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/setup-network/templates/network.cfg b/deploy/adapters/ansible/roles/setup-network/templates/network.cfg
index 75ba90cb..cf271ad6 100644
--- a/deploy/adapters/ansible/roles/setup-network/templates/network.cfg
+++ b/deploy/adapters/ansible/roles/setup-network/templates/network.cfg
@@ -1,5 +1,5 @@
-bond_mappings: {{ network_cfg["bond_mappings"] }}
-ip_settings: {{ ip_settings[inventory_hostname] }}
-sys_intf_mappings: {{ sys_intf_mappings }}
-provider_net_mappings: {{ network_cfg["provider_net_mappings"] }}
+bond_mappings: {{ network_cfg["bond_mappings"] | to_json }}
+ip_settings: {{ ip_settings[inventory_hostname] | to_json }}
+sys_intf_mappings: {{ sys_intf_mappings | to_json }}
+provider_net_mappings: {{ network_cfg["provider_net_mappings"] | to_json }}