Re: [ansible-project] rescue block does not print message despite being invoked

2020-03-13 Thread Vladimir Botka
On Thu, 12 Mar 2020 19:12:56 -0700 (PDT) Shifa Shaikh wrote: > - name: Print custom conditional debug message > fail: > msg: >- > {{ > command_result.rc == 0 | > ternary( > "This IP is already On-Boarded.", >

Re: [ansible-project] rescue block does not print message despite being invoked

2020-03-13 Thread Dick Visser
On Fri, 13 Mar 2020 at 04:19, Shifa Shaikh wrote: Missing parentheses where? > Right above the answer > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

Re: [ansible-project] rescue block does not print message despite being invoked

2020-03-12 Thread Shifa Shaikh
Missing parentheses where? My code is very similar to a working sample here: fail: msg: >- {{ command_result.stdout is search('775') | ternary( "This REQ is already Deployed. , "Database is

Re: [ansible-project] rescue block does not print message despite being invoked

2020-03-12 Thread James Cassell
On Thu, Mar 12, 2020, at 10:12 PM, Shifa Shaikh wrote: > Hi, > > I have a playbook with a task that greps for a string in a file. If the > string is found the block should fail which is the case. However, in > the fail module it fails to print the message. > > Here is my playbook: > >

[ansible-project] rescue block does not print message despite being invoked

2020-03-12 Thread Shifa Shaikh
Hi, I have a playbook with a task that greps for a string in a file. If the string is found the block should fail which is the case. However, in the fail module it fails to print the message. Here is my playbook: Here is my playbook: --- - name: "Play 1" hosts: localhost tasks: -