Commit 1d06f09e authored by nanahira's avatar nanahira

Revert "use dict"

This reverts commit 43651b8f.
parent 43651b8f
...@@ -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.value.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: '{{ connectionsDict }}' with_items: '{{ connections }}'
when: "not noUpdateLinks 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:
......
...@@ -424,7 +424,6 @@ class InventoryBuilder { ...@@ -424,7 +424,6 @@ class InventoryBuilder {
ocpasswdLines: host.ocpasswdLines || [], ocpasswdLines: host.ocpasswdLines || [],
gateways: _.values(this.gateways[host.name]), gateways: _.values(this.gateways[host.name]),
connections, connections,
connectionsDict: _.keyBy(connections, 'name'),
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