I am facing a problem trying to run Vagrant with Ansible. Here is the error that I'm getting when I'm trying to run vagrant up
or vagrant provision
in terminal (git bash) on Windows 7:
ERROR! Unexpected Exception: Non-hexadecimal digit found
to see the full traceback, use -vvv
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
It happens because the Ansible-vault
file .vault_pass
is not hexadecimal (it is a string and it can't be changed). On computers of my coleagues it works normally, but on mine it doesn't.
The problematic string in .vault_pass
file looks like DBAKWeG3KOr3jKjBDbAz
.
I guess that the problem is something with Python, but I'm not sure and I don't know how to fix it.
When I try to add -vvv
this is the resoult:
ERROR! Unexpected Exception: Non-hexadecimal digit found the full traceback was: Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 92, in exit_code = cli.run() File "/usr/lib/python2.7/dist-packages/ansible/cli/playbook.py", line 132, in run inventory = Inventory(loader=loader, variable_manager=variable_manager, host_list=self.options.inventory) File "/usr/lib/python2.7/dist-packages/ansible/inventory/__init__.py", line 85, in __init__ self.parse_inventory(host_list) File "/usr/lib/python2.7/dist-packages/ansible/inventory/__init__.py", line 144, in parse_inventory group.vars = combine_vars(group.vars, self.get_group_variables(group.name)) File "/usr/lib/python2.7/dist-packages/ansible/inventory/__init__.py", line 509, in get_group_variables self._vars_per_group[groupname] = self._get_group_variables(groupname, vault_password=vault_password) File "/usr/lib/python2.7/dist-packages/ansible/inventory/__init__.py", line 527, in _get_group_variables vars = combine_vars(vars, self.get_group_vars(group)) File "/usr/lib/python2.7/dist-packages/ansible/inventory/__init__.py", line 707, in get_group_vars return self._get_hostgroup_vars(host=None, group=group, new_pb_basedir=new_pb_basedir) File "/usr/lib/python2.7/dist-packages/ansible/inventory/__init__.py", line 746, in _get_hostgroup_vars results = combine_vars(results, self._variable_manager.add_group_vars_file(base_path, self._loader)) File "/usr/lib/python2.7/dist-packages/ansible/vars/__init__.py", line 578, in add_group_vars_file (name, data) = self._load_inventory_file(path, loader) File "/usr/lib/python2.7/dist-packages/ansible/vars/__init__.py", line 535, in _load_inventory_file _found, results = self._load_inventory_file(path=p, loader=loader) File "/usr/lib/python2.7/dist-packages/ansible/vars/__init__.py", line 550, in _load_inventory_file data = loader.load_from_file(path) File "/usr/lib/python2.7/dist-packages/ansible/parsing/dataloader.py", line 113, in load_from_file (file_data, show_content) = self._get_file_contents(file_name) File "/usr/lib/python2.7/dist-packages/ansible/parsing/dataloader.py", line 172, in _get_file_contents data = self._vault.decrypt(data) File "/usr/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py", line 169, in decrypt b_data = this_cipher.decrypt(b_data, self.b_password) File "/usr/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py", line 674, in decrypt data = unhexlify(data) TypeError: Non-hexadecimal digit found Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.
-vvv
output? Also, what computers do your colleagues run where this works? Are you all running the same version of Python and Ansible? – halfer-vvv
output when I finish installing Windows (in 1-2 hours) – Vladan Grubo Paunovic-vvv
in description, please look at it. – Vladan Grubo Paunovic.vault_pass
file get created? Is there a Vault tool to encode passwords so they are in hex? – halfer