On 01.03.2019 17:06, Pandu jh wrote:
One more Requirement Kai,

I need to test the condition If stdout_lines is not defined or the
stdout_lines length is 0, then open_shares_info variable should have the
no_share value.
Could you check below syntax is correct, I am getting an error when I run
it.

  - set_fact:
        open_shares_info: "{{  nfs_open_share.stdout_lines if
nfs_open_share.stdout_lines|length != 0 or nfs_open_share.stdout_lines is
defined else 'no_share' }}"

Why don't you just test it and see if it works.

--
Kai Stian Olstad

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e69aaf64cc096042558ffa8251da6ca3%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to