Categorize FILE_COMMON_ARGS
Some file_common_args are not common to all file modules. Divide the args into categories for a future refator of this into a separate file_argspec.
This commit is contained in:
parent
5fd9954ccc
commit
b9a00372c2
1 changed files with 14 additions and 7 deletions
|
@ -216,7 +216,8 @@ _literal_eval = literal_eval
|
|||
_ANSIBLE_ARGS = None
|
||||
|
||||
FILE_COMMON_ARGUMENTS = dict(
|
||||
src=dict(),
|
||||
# These are things we want. About setting metadata (mode, ownership, permissions in general) on
|
||||
# created files
|
||||
mode=dict(type='raw'),
|
||||
owner=dict(),
|
||||
group=dict(),
|
||||
|
@ -224,17 +225,23 @@ FILE_COMMON_ARGUMENTS = dict(
|
|||
serole=dict(),
|
||||
selevel=dict(),
|
||||
setype=dict(),
|
||||
follow=dict(type='bool', default=False),
|
||||
# not taken by the file module, but other modules call file so it must ignore them.
|
||||
content=dict(no_log=True),
|
||||
backup=dict(),
|
||||
force=dict(),
|
||||
attributes=dict(aliases=['attr']),
|
||||
|
||||
# The following are not about perms and should not be in a rewritten file_common_args
|
||||
src=dict(), # Maybe dest or path would be appropriate but src is not
|
||||
follow=dict(type='bool', default=False), # Maybe follow is appropriate because it determines whether to follow symlinks for permission purposes too
|
||||
force=dict(type='bool'),
|
||||
|
||||
# not taken by the file module, but other action plugins call the file module so this ignores
|
||||
# them for now. In the future, the caller should take care of removing these from the module
|
||||
# arugments before calling the file module.
|
||||
content=dict(no_log=True), # used by copy
|
||||
backup=dict(), # Used by a few modules to create a remote backup before updating the file
|
||||
remote_src=dict(), # used by assemble
|
||||
regexp=dict(), # used by assemble
|
||||
delimiter=dict(), # used by assemble
|
||||
directory_mode=dict(), # used by copy
|
||||
unsafe_writes=dict(type='bool'), # should be available to any module using atomic_move
|
||||
attributes=dict(aliases=['attr']),
|
||||
)
|
||||
|
||||
PASSWD_ARG_RE = re.compile(r'^[-]{0,2}pass[-]?(word|wd)?')
|
||||
|
|
Loading…
Add table
Reference in a new issue