Dear all, how to check the result of a lineinfile task?
I got one that outputs the following:
> "backup": "",
> "changed": true,
> "diff": [
> {
> "after": "",
> "after_header": "/path/to/file (content)",
> "before": "",
> "before_header": "/path/to/file (content)"
> },
> {
> "after_header": "/path/to/file (file attributes)",
> "before_header": "/path/to/file (file attributes)"
> }
> ],
> "msg": "line added"
I see the line has been added, but there is no rc or similar. I could
test for '(changed==true and msg=="line added") or (changed==false)',
but that seems rather clunky. Any better ideas?
Johannes
--
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/575084A6.4090602%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
