Add dir_mode for file.managed

Refs #7860
This commit is contained in:
Mike Place 2013-11-06 21:13:06 -07:00
parent 0d0454a904
commit 302a763ef9
2 changed files with 6 additions and 3 deletions

View File

@ -2115,7 +2115,8 @@ def manage_file(name,
backup,
template=None,
show_diff=True,
contents=None):
contents=None,
dir_mode=None):
'''
Checks the destination against what was retrieved with get_managed and
makes the appropriate modifications (if necessary).
@ -2262,7 +2263,7 @@ def manage_file(name,
if not os.path.isdir(os.path.dirname(name)):
if makedirs:
makedirs(name, user=user, group=group, mode=mode)
makedirs(name, user=user, group=group, mode=dir_mode or mode)
else:
__clean_tmp(sfn)
return _error(ret, 'Parent directory not present')

View File

@ -933,6 +933,7 @@ def managed(name,
mode=None,
template=None,
makedirs=False,
dir_mode=None,
context=None,
replace=True,
defaults=None,
@ -1163,7 +1164,8 @@ def managed(name,
backup,
template,
show_diff,
contents)
contents,
dir_mode)
def directory(name,