mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Add noseclabel support to libvirt_lxc plugin.
This commit is contained in:
parent
adc9a25a06
commit
ba1bcdfc17
4 changed files with 21 additions and 1 deletions
|
@ -88,7 +88,12 @@ class Connection(ConnectionBase):
|
|||
return the process's exit code immediately.
|
||||
'''
|
||||
executable = C.DEFAULT_EXECUTABLE.split()[0] if C.DEFAULT_EXECUTABLE else '/bin/sh'
|
||||
local_cmd = [self.virsh, '-q', '-c', 'lxc:///', 'lxc-enter-namespace', self.lxc, '--', executable , '-c', cmd]
|
||||
local_cmd = [self.virsh, '-q', '-c', 'lxc:///', 'lxc-enter-namespace']
|
||||
|
||||
if C.DEFAULT_LIBVIRT_LXC_NOSECLABEL:
|
||||
local_cmd += ['--noseclabel']
|
||||
|
||||
local_cmd += [self.lxc, '--', executable, '-c', cmd]
|
||||
|
||||
display.vvv("EXEC %s" % (local_cmd,), host=self.lxc)
|
||||
local_cmd = [to_bytes(i, errors='strict') for i in local_cmd]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue