I have the current working setup and using Ansible 2.3:
environment_vars_docmosis_hosts: "{{ groups['role_ccm_docmosis'] | intersect(groups ['stack_' ~ stack]) }}"
Which resolves to two hostnames: hostname1 and hostname2
I am trying to extract the only hostname1 from the above.
When I try using environment_vars_docmosis_hosts.0 or environment_vars_docmosis_hosts[0] from this expression:
_docmosis_pool_config: "{{ (environment_vars_docmosis_hosts[0] | default(['localhost'])) | join(':2100,') }}:2100"
I only get the first character of the hostname
What would be a proper way of accessing the first hostname ?