Thank you so much for exhaustive explanation.
Best regards,
Michal
On Monday, February 5, 2018 at 10:07:06 PM UTC+1, Henning Rohde wrote:
>
> As the output of some shell-command is not per se delimited to one single
> value, registering it creates a list.
>
> Thus, using "{{ some_list }}" get's you square-brackets around the list of
> values - although in your case, it's a list with just one single value.
>
> Besides omitting the parameter, you could for instance join the list to a
> string: "{{ drive_for_lvm | join '' }}", see
> https://docs.ansible.com/ansible/playbooks_filters.html#id7
> ... or you could limit the list to its first element, either with "{{
> drive_for_lvm[0] }}" or "{{ drive_for_lvm | first }}", see again the
> filters or
> https://docs.ansible.com/ansible/playbooks_variables.html#accessing-complex-variable-data
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/918efad6-0112-4934-9069-fa9754c5a6ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.