summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <bcoca@ansible.com>2015-12-10 09:51:04 -0500
committerBrian Coca <bcoca@ansible.com>2015-12-10 09:51:04 -0500
commitd4916bd4764371f2a47715c0ae08df550477b0f3 (patch)
treef77f6fc2e326ce8bf8f9232ffbb077da151aba4e
parent0b5555b62cd8d91fb4fa434217671f3acaebbf5a (diff)
parent8ccfdb874e8db922996d67237d11bdd38f354f9c (diff)
downloadansible-modules-core-d4916bd4764371f2a47715c0ae08df550477b0f3.tar.gz
Merge pull request #2659 from mscherer/remove_useless_unsafe_shell
Remove a unneeded use of use_unsafe_shell
-rw-r--r--system/hostname.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/hostname.py b/system/hostname.py
index 2d14b089..1b577367 100644
--- a/system/hostname.py
+++ b/system/hostname.py
@@ -260,8 +260,8 @@ class SystemdStrategy(GenericStrategy):
(rc, out, err))
def get_permanent_hostname(self):
- cmd = 'hostnamectl --static status'
- rc, out, err = self.module.run_command(cmd, use_unsafe_shell=True)
+ cmd = ['hostnamectl', '--static', 'status']
+ rc, out, err = self.module.run_command(cmd)
if rc != 0:
self.module.fail_json(msg="Command failed rc=%d, out=%s, err=%s" %
(rc, out, err))