Quote the repository string when appending it to the command line in the apt_repository module.
This commit is contained in:
parent
3e9bcd351d
commit
d95eddceb1
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ def main():
|
||||||
repo = module.params['repo']
|
repo = module.params['repo']
|
||||||
state = module.params['state']
|
state = module.params['state']
|
||||||
|
|
||||||
rc, out, err = _run('%s %s --remove' % (add_apt_repository, repo))
|
rc, out, err = _run('%s "%s" --remove' % (add_apt_repository, repo))
|
||||||
existed = 'Error' not in out
|
existed = 'Error' not in out
|
||||||
|
|
||||||
if state == 'absent':
|
if state == 'absent':
|
||||||
|
@ -70,7 +70,7 @@ def main():
|
||||||
else:
|
else:
|
||||||
module.exit_json(changed=True, repo=repo, state=state)
|
module.exit_json(changed=True, repo=repo, state=state)
|
||||||
|
|
||||||
cmd = '%s %s' % (add_apt_repository, repo)
|
cmd = '%s "%s"' % (add_apt_repository, repo)
|
||||||
|
|
||||||
if platform.dist()[0] == 'debian' or float(platform.dist()[1]) >= 11.10:
|
if platform.dist()[0] == 'debian' or float(platform.dist()[1]) >= 11.10:
|
||||||
cmd = cmd + ' -y'
|
cmd = cmd + ' -y'
|
||||||
|
|
Loading…
Reference in a new issue