Re: [ansible-devel] Issuew when doing a When conditional with win_copy

2019-09-18 Thread TD
That worked, Thanks for the help Matt. Much appreciated On Wednesday, September 18, 2019 at 1:18:43 PM UTC-4, Matt Martz wrote: > > `results.stdout` is not a literal variable name. Instead what you are > likely looking for is: > > when: results.stdout|trim == 'True' > > or since you use `set_fa

Re: [ansible-devel] Issuew when doing a When conditional with win_copy

2019-09-18 Thread Matt Martz
`results.stdout` is not a literal variable name. Instead what you are likely looking for is: when: results.stdout|trim == 'True' or since you use `set_fact` in between, it could also be: when: output|trim == 'True' On Wed, Sep 18, 2019 at 12:07 PM TD wrote: > Matt, I now see it is attempting

Re: [ansible-devel] Issuew when doing a When conditional with win_copy

2019-09-18 Thread TD
Matt, I now see it is attempting it but I get and erroron win_copy:{ "msg": "The conditional check 'ansible_facts['results.stdout'] == \"True\"' failed. The error was: error while evaluating conditional (ansible_facts['results.stdout'] == \"True\"): 'dict object' has no attribute 'results.st

Re: [ansible-devel] Issuew when doing a When conditional with win_copy

2019-09-18 Thread Matt Martz
Your `when` statement, needs to be indented to the same level as `win_copy`, not the same level as `dest`. Also it needs to be the lowercased `when` On Wed, Sep 18, 2019 at 11:04 AM Tom Donnly wrote: > Hello all, > I am trying to do a conditional based on the output of a win_shell. > When I

[ansible-devel] Issuew when doing a When conditional with win_copy

2019-09-18 Thread Tom Donnly
Hello all, I am trying to do a conditional based on the output of a win_shell. When I run this it's as if it doesn't see the conditional and copies to to all inventory not just what is coming back as True. Any ideas? --- - hosts: all tasks: - name: Run multi-lined shell commands wi