Use attribute for sort
Using sort against dicts won't work in py3 (and may not work as expected in py2), since dictionaries can not be compared unless we pass an attribute value. Change-Id: Ib11f78d639ea7d520896482253e7a12eb862d598
This commit is contained in:
parent
4c8c76e4e1
commit
7794e23cc0
|
@ -142,7 +142,7 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
with_indexed_items: "{{ lxc_container_networks_combined.values() | list | sort }}"
|
||||
with_indexed_items: "{{ (lxc_container_networks_combined.values() | list) | sort(attribute='interface') }}"
|
||||
register: network_config
|
||||
delegate_to: "{{ physical_host }}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue