|
|
|
@ -307,6 +307,7 @@ class AnsibleModule(object):
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
|
|
|
|
|
|
|
|
def set_owner_if_different(self, path, owner, changed):
|
|
|
|
def set_owner_if_different(self, path, owner, changed):
|
|
|
|
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
if owner is None:
|
|
|
|
if owner is None:
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
user, group = self.user_and_group(path)
|
|
|
|
user, group = self.user_and_group(path)
|
|
|
|
@ -323,6 +324,7 @@ class AnsibleModule(object):
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
|
|
|
|
|
|
|
|
def set_group_if_different(self, path, group, changed):
|
|
|
|
def set_group_if_different(self, path, group, changed):
|
|
|
|
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
if group is None:
|
|
|
|
if group is None:
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
old_user, old_group = self.user_and_group(path)
|
|
|
|
old_user, old_group = self.user_and_group(path)
|
|
|
|
@ -340,7 +342,6 @@ class AnsibleModule(object):
|
|
|
|
|
|
|
|
|
|
|
|
def set_mode_if_different(self, path, mode, changed):
|
|
|
|
def set_mode_if_different(self, path, mode, changed):
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
path = os.path.expanduser(path)
|
|
|
|
|
|
|
|
|
|
|
|
if mode is None:
|
|
|
|
if mode is None:
|
|
|
|
return changed
|
|
|
|
return changed
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|