Testing out the old jinja removed here https://github.com/openstack/openstack-ansible/commit/518fb381c49a04e2b8af4a7e623e698482033efc I get the expected output:
known_container_hosts: > {% set _var = [] -%} {% for item in groups['all_containers'] -%} {% if hostvars[item]['physical_host'] | default(false) != item -%} {% if _var.append(hostvars[item]['physical_host']) -%} {% endif -%} {% endif -%} {% endfor -%} {{ _var | unique }}
ubuntu@deploy-devcloud:playbooks$ ansible localhost -m debug -a msg="{{ known_container_hosts }}" localhost | SUCCESS => { "msg": [ "lsn-mc1008", "lsn-mc1007", "lsn-mc1006" ] }
Testing out the old jinja removed here https:/ /github. com/openstack/ openstack- ansible/ commit/ 518fb381c49a04e 2b8af4a7e623e69 8482033efc I get the expected output:
known_container _hosts: > 'all_containers '] -%} item][' physical_ host'] | default(false) != item -%} hostvars[ item][' physical_ host']) -%}
{% set _var = [] -%}
{% for item in groups[
{% if hostvars[
{% if _var.append(
{% endif -%}
{% endif -%}
{% endfor -%}
{{ _var | unique }}
ubuntu@ deploy- devcloud: playbooks$ ansible localhost -m debug -a msg="{{ known_container _hosts }}"
"lsn-mc1008" ,
"lsn-mc1007" ,
"lsn-mc1006"
localhost | SUCCESS => {
"msg": [
]
}