mode: preserve
can be misleading/misunderstood, deprecate it and offer mode: preserve_src
and mode: preserve_dest
#71503
Labels
affects_2.11
feature
This issue/PR relates to a feature request.
files
Files category
module
This issue/PR relates to a module.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
SUMMARY
IMHO,
mode: preserve
is misleading and can be misunderstood. That is because the name by itself does not clearly specify which mode is to be preserved, the source or the destination. In my case, my intuition led me to believe that the mode on the destination is preserved. It would be more explicit/clear if it were namedmode: preserve_src
.I know that the documentation says that it preserves the source mode. The issue is more about the first impression of what the name preserve suggests and that this can be misleading without having read the documentation (which if we're all honest not everyone immediately does). Especially, with the recent addition to ansible-lint to issue a warning about missing
mode
:With that, one is tempted to use
mode: preserve
, possibly assuming that it would preserve the mode of the destination.(Personally, I don't even get why someone would preserve the mode of the source. Especially when I'm changing a config file that is originally deployed with the distributions package manager, shouldn't I always want to preserve the destination mode?)
ISSUE TYPE
COMPONENT NAME
mode
argumentThe text was updated successfully, but these errors were encountered: