Re: [ansible-project] How to emulate Make semantics?

2017-01-26 Thread Johannes Kastl
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 --

Re: [ansible-project] How to emulate Make semantics?

2017-01-26 Thread Cev Ing
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

Re: [ansible-project] How to emulate Make semantics?

2017-01-26 Thread 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? > 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

Re: [ansible-project] How to emulate Make semantics?

2017-01-26 Thread Cev Ing
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.

Re: [ansible-project] How to emulate Make semantics?

2017-01-26 Thread Johannes Kastl
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

[ansible-project] How to emulate Make semantics?

2017-01-26 Thread Cev Ing
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