From 9f893c207a6a2bf61472b85a13528aaff43f09ca Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 8 Sep 2020 21:37:13 +0300 Subject: [PATCH] Fix keys() method output On py3 keys() attribute for dictionary does not return list. So extra list filter should be applied to convert output to valid ansible list. Change-Id: I8997738cefffc01ba6940fe7c5abb1ceeebb78c2 --- inventory/group_vars/haproxy/keepalived.yml | 4 ++-- inventory/group_vars/manila_all.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inventory/group_vars/haproxy/keepalived.yml b/inventory/group_vars/haproxy/keepalived.yml index 74aa4c01cc..07cb05bac6 100644 --- a/inventory/group_vars/haproxy/keepalived.yml +++ b/inventory/group_vars/haproxy/keepalived.yml @@ -62,13 +62,13 @@ keepalived_instances: authentication_password: "{{ haproxy_keepalived_authentication_password }}" vips: - "{{ haproxy_keepalived_external_vip_cidr | default('169.254.1.1/24') }} dev {{ haproxy_keepalived_external_interface | default(management_bridge) }}" - track_scripts: "{{ keepalived_scripts.keys() }}" + track_scripts: "{{ keepalived_scripts.keys() | list }}" internal: interface: "{{ haproxy_keepalived_internal_interface | default(management_bridge) }}" state: "{{ (groups['haproxy'].index(inventory_hostname) == 0) | ternary('MASTER', 'BACKUP') }}" virtual_router_id: "{{ haproxy_keepalived_internal_virtual_router_id | default ('11') }}" priority: "{{ (groups['haproxy']|length-groups['haproxy'].index(inventory_hostname))*50 }}" authentication_password: "{{ haproxy_keepalived_authentication_password }}" - track_scripts: "{{ keepalived_scripts.keys() }}" + track_scripts: "{{ keepalived_scripts.keys() | list }}" vips: - "{{ haproxy_keepalived_internal_vip_cidr | default('169.254.2.1/24') }} dev {{ haproxy_keepalived_internal_interface | default(management_bridge) }}" diff --git a/inventory/group_vars/manila_all.yml b/inventory/group_vars/manila_all.yml index 8deb18e2c3..40925da38d 100644 --- a/inventory/group_vars/manila_all.yml +++ b/inventory/group_vars/manila_all.yml @@ -18,7 +18,7 @@ manila_enabled_share_protocols: - NFS - CEPHFS -_manila_default_share_type: "{{ (manila_backends | default({})).keys() }}" +_manila_default_share_type: "{{ (manila_backends | default({})).keys() | list }}" manila_default_share_type: "{{ ((_manila_default_share_type | length) > 0) | ternary(_manila_default_share_type[0], null) }}" # manila_backend_lvm_inuse: True if current host has an lvm backend