Commit 7b34b71c authored by nanahira's avatar nanahira

Revert "use item.value"

This reverts commit c40c3fd6.
parent c40c3fd6
...@@ -96,17 +96,17 @@ ...@@ -96,17 +96,17 @@
- mci{{inventory_hostname_short}} - mci{{inventory_hostname_short}}
# 为了提高测试时候的性能,不改动wg的时候注释掉这段 # 为了提高测试时候的性能,不改动wg的时候注释掉这段
- name: 'clean up null connections first' - name: 'clean up null connections first'
include_tasks: 'protocols/{{item.value.protocol}}/configure.yaml' include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
vars: vars:
conn: '{{item.value}}' conn: '{{item}}'
with_dict: '{{ connections }}' with_items: '{{ connections }}'
when: "not noUpdateLinks and item.protocol is defined and item.protocol == 'null' and not item.value.noUpdate" when: "not noUpdateLinks and item.protocol is defined and item.protocol == 'null' and not item.noUpdate"
- name: 'loop through list from a variable' - name: 'loop through list from a variable'
include_tasks: 'protocols/{{item.value.protocol}}/configure.yaml' include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
vars: vars:
conn: '{{item.value}}' conn: '{{item}}'
with_dict: '{{ connections }}' with_items: '{{ connections }}'
when: "not noUpdateLinks and item.value.protocol is defined and item.value.protocol != 'null' and not item.value.noUpdate" when: "not noUpdateLinks and item.protocol is defined and item.protocol != 'null' and not item.noUpdate"
# end # end
- name: services conf - name: services conf
copy: copy:
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
- name: 'update oc things' - name: 'update oc things'
include_tasks: 'protocols/{{item.protocol}}/configure.yaml' include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
vars: vars:
conn: '{{item.value}}' conn: '{{item}}'
with_dict: '{{ connections }}' with_items: '{{ connections }}'
when: "not noUpdateLinks and item.value.protocol == 'oc' and not item.value.noUpdate" when: "not noUpdateLinks and item.protocol == 'oc' and not item.noUpdate"
- name: start services - name: start services
docker_compose: docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services' project_src: '{{ansible_user_dir}}/nextgen-network/services'
......
...@@ -423,7 +423,7 @@ class InventoryBuilder { ...@@ -423,7 +423,7 @@ class InventoryBuilder {
ocMetric: host.ocMetric || null, ocMetric: host.ocMetric || null,
ocpasswdLines: host.ocpasswdLines || [], ocpasswdLines: host.ocpasswdLines || [],
gateways: _.values(this.gateways[host.name]), gateways: _.values(this.gateways[host.name]),
connections: _.keyBy(connections, 'name'), connections,
lanInterfaces, lanInterfaces,
localSubnets, localSubnets,
masqInterfaces, masqInterfaces,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment