1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

added 'existing' back

fixes #22785
This commit is contained in:
Brian Coca 2017-03-20 10:56:35 -04:00 committed by Brian Coca
parent 1c38cba7ca
commit 07d9366ed8

View file

@ -1142,6 +1142,8 @@ class AnsibleModule(object):
b_path = os.path.expanduser(os.path.expandvars(b_path))
path = to_text(b_path, errors='surrogate_then_strict')
existing = self.get_file_attributes(b_path)
if existing.get('attr_flags','') != attributes:
attrcmd = self.get_bin_path('chattr')
if attrcmd: