mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
Merge branch 'v2_final' into devel_switch_v2
This commit is contained in:
commit
fe41f109a9
22 changed files with 255 additions and 121 deletions
|
@ -589,8 +589,8 @@ class AnsibleModule(object):
|
|||
return True
|
||||
rc = selinux.lsetfilecon(self._to_filesystem_str(path),
|
||||
str(':'.join(new_context)))
|
||||
except OSError:
|
||||
self.fail_json(path=path, msg='invalid selinux context', new_context=new_context, cur_context=cur_context, input_was=context)
|
||||
except OSError, e:
|
||||
self.fail_json(path=path, msg='invalid selinux context: %s' % str(e), new_context=new_context, cur_context=cur_context, input_was=context)
|
||||
if rc != 0:
|
||||
self.fail_json(path=path, msg='set selinux context failed')
|
||||
changed = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue