mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
Fixing some small bugs related to integration tests (v2)
This commit is contained in:
parent
816b20af0b
commit
4bc7703db3
12 changed files with 81 additions and 39 deletions
|
@ -588,8 +588,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