mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
ip_netns - invoke run_command passing list (#3822)
* ip_netns - invoke run_command passing list * added changelog fragment
This commit is contained in:
parent
c587d21ba0
commit
ba9578f12a
2 changed files with 3 additions and 1 deletions
|
@ -76,7 +76,7 @@ class Namespace(object):
|
|||
|
||||
def exists(self):
|
||||
'''Check if the namespace already exists'''
|
||||
rc, out, err = self.module.run_command('ip netns list')
|
||||
rc, out, err = self.module.run_command(['ip', 'netns', 'list'])
|
||||
if rc != 0:
|
||||
self.module.fail_json(msg=to_text(err))
|
||||
return self.name in out
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue