On 26.01.17 16:45 Cev Ing wrote:
> Maybe I am wrong and stat works, but what does not work is copy.
> The error is, that copy has no read permission to read /etc/shadow
> in a local action, although I use become.
>
Without the actual error (and your playbook) it is hard to guess...
Johannes
--
Am Donnerstag, 26. Januar 2017 16:37:55 UTC+1 schrieb Johannes Kastl:
>
> On 26.01.17 16:30 Cev Ing wrote:
>
> > Using stat in a local action with become does not seem to work.
>
> Why not, what error are you getting?
>
Maybe I am wrong and stat works, but what does not work is copy. The
On 26.01.17 16:30 Cev Ing wrote:
> Using stat in a local action with become does not seem to work.
Why not, what error are you getting?
> delegate_to: 127.0.0.1
I am not sure, but I thing I remember there is a difference between
"delegate_to: 127.0.0.1" and "delegate_to: localhost". If
Am Donnerstag, 26. Januar 2017 12:34:08 UTC+1 schrieb Johannes Kastl:
>
>
> Cleanest solution would be to use two stat commands with "register:
> file_A" and compare those variables (I guess file_A.stat.mtime might
> work).
>
Using stat in a local action with become does not seem to work.
On 26.01.17 12:24 Cev Ing wrote:
> I need to execute a play, which uses file A to generate file B, if B does
> not exist or if B exists and is older than A.
>
> How can I compare file dates in the when condition?
Cleanest solution would be to use two stat commands with "register:
file_A" and
I need to execute a play, which uses file A to generate file B, if B does
not exist or if B exists and is older than A.
How can I compare file dates in the when condition?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from