diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 98e88bc4cd..c1eaaaa722 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -327,12 +327,15 @@ class Facts(object): data = get_file_content('/proc/cmdline') if data: self.facts['cmdline'] = {} - for piece in shlex.split(data): - item = piece.split('=', 1) - if len(item) == 1: - self.facts['cmdline'][item[0]] = True - else: - self.facts['cmdline'][item[0]] = item[1] + try: + for piece in shlex.split(data): + item = piece.split('=', 1) + if len(item) == 1: + self.facts['cmdline'][item[0]] = True + else: + self.facts['cmdline'][item[0]] = item[1] + except ValueError, e: + pass def get_public_ssh_host_keys(self): dsa_filename = '/etc/ssh/ssh_host_dsa_key.pub'