I wanted to do a copy IFF the src exists. I thought this would work:
- copy: src=…/…/…/…/shared/secrets.json dest=/srv/clara/shared/secrets.json backup=yes
ignore_errors: yes
This fails with
fatal: [127.0.0.1] => input file not found at /home/rof/clara/shared/secrets.json or /shared/secrets.json
FATAL: all hosts have already failed – aborting
Is this a typo on my part, working as expected, or a bug?
thanks,
Bryan
Is this a typo on my part, working as expected, or a bug?
It’s a bug – though also working as expected – as I never expected anyone to try this
ignore_errors was put there to ignore the return codes in modules returns, not in fatal errors that happen in processing the input, like missing local files. But I can’t see any reason why it shouldn’t work as you say.
Please file a ticket on github and we can make this work as you suggest. The template module should also be similarly modified.
Hi, has this ever been implemented ?
I’m hitting this same problem with the unarchive module, but anything that checks for local files really, should be affected.