Since lineinfile has a create= option, would it make sense to have a mode= option as well? Otherwise we end up relying on the user's umask...
Yves Dorfsman wrote:
Since lineinfile has a create= option, would it make sense to have a mode=
option as well? Otherwise we end up relying on the user's umask...
I'd be fine with lineinfile using the common file arguments.
Daniel
Would it be changing those attributes for existing files as well, or only when newly created ? Because I don't see the point of integrating the file module usecase also into lineinfile.
Two actions in this case do no harm IMO.
yeah, you're out of date with how this works
We can easily use that common code on any module that supports a file,
and we should here.
Any module that produces exactly one file should support all of the
file options.
yeah, you're out of date with how this works
Don't be cruel !
We can easily use that common code on any module that supports a file,
and we should here.Any module that produces exactly one file should support all of the
file options.
Right, but would it also adapt the file when nothing was created ? I can see it to be confusing when it does, but also when it doesn't. What should people expect ?
PS I added the create= option, so I am to blame for not doing it right the first time
Sorry
With options like owner= or mode=, it should always specify that the
options passed from the file code are set if there is a file there.
IMO if mode= is specified, it should set the mode, regardless of the file being created or already existing.