mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-04 05:04:22 -07:00
Remove the --nspawn-extra-args cli option
Providing extra arguments to pass to systemd-nspawn is still possible through the `nspawn_connection` of the `ansible.cfg` file.
This commit is contained in:
parent
1fc7211181
commit
b8125ac1a6
2 changed files with 1 additions and 5 deletions
|
@ -355,8 +355,6 @@ class CLI(with_metaclass(ABCMeta, object)):
|
||||||
help="specify extra arguments to pass to scp only (e.g. -l)")
|
help="specify extra arguments to pass to scp only (e.g. -l)")
|
||||||
connect_group.add_option('--ssh-extra-args', default='', dest='ssh_extra_args',
|
connect_group.add_option('--ssh-extra-args', default='', dest='ssh_extra_args',
|
||||||
help="specify extra arguments to pass to ssh only (e.g. -R)")
|
help="specify extra arguments to pass to ssh only (e.g. -R)")
|
||||||
connect_group.add_option('--nspawn-extra-args', default='', dest='nspawn_extra_args',
|
|
||||||
help="specify extra arguments to pass to systemd-nspawn only (e.g. --bind)")
|
|
||||||
|
|
||||||
parser.add_option_group(connect_group)
|
parser.add_option_group(connect_group)
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ class Connection(ConnectionBase):
|
||||||
*args, **kwargs)
|
*args, **kwargs)
|
||||||
|
|
||||||
display.vvv("NSPAWN ARGS %s" % self._play_context.nspawn_args)
|
display.vvv("NSPAWN ARGS %s" % self._play_context.nspawn_args)
|
||||||
display.vvv("NSPAWN EXTRA ARGS %s" % self._play_context.nspawn_extra_args)
|
|
||||||
|
|
||||||
self.chroot = self._play_context.remote_addr
|
self.chroot = self._play_context.remote_addr
|
||||||
|
|
||||||
|
@ -69,8 +68,7 @@ class Connection(ConnectionBase):
|
||||||
else '/bin/sh')
|
else '/bin/sh')
|
||||||
|
|
||||||
nspawn_args = shlex.split(self._play_context.nspawn_args)
|
nspawn_args = shlex.split(self._play_context.nspawn_args)
|
||||||
nspawn_extra_args = shlex.split(self._play_context.nspawn_extra_args)
|
local_cmd = [self.nspawn_cmd, '-D', self.chroot ] + nspawn_args + [
|
||||||
local_cmd = [self.nspawn_cmd, '-D', self.chroot ] + nspawn_args + nspawn_extra_args + [
|
|
||||||
'--', executable, '-c', cmd]
|
'--', executable, '-c', cmd]
|
||||||
|
|
||||||
display.vvv("EXEC %s" % (local_cmd), host=self.chroot)
|
display.vvv("EXEC %s" % (local_cmd), host=self.chroot)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue