I see another user has support for JSON files but what about just simple text files? We have encrypted configuration files for our deployments and they fail yaml parsing because they are not yaml files.
Traceback (most recent call last):
File "/usr/bin/ansible-vault-rekey", line 11, in
load_entry_point('ansible-vault-rekey==1.0.1', 'console_scripts', 'ansible-vault-rekey')()
File "/usr/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/usr/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(args, **kwargs)
File "/usr/lib/python3.8/site-packages/ansible_vault_rekey-1.0.1-py3.8.egg/ansible_vault_rekey/cli.py", line 99, in main
rekey.decrypt_file(f['file'], password_file, newpath)
File "/usr/lib/python3.8/site-packages/ansible_vault_rekey-1.0.1-py3.8.egg/ansible_vault_rekey/ansible_vault_rekey.py", line 138, in decrypt_file
r = vault.load(f.read())
File "/usr/lib/python3.8/site-packages/ansible_vault-1.2.0-py3.8.egg/ansible_vault/api.py", line 62, in load
File "/usr/lib/python3.8/site-packages/yaml/init.py", line 162, in safe_load
return load(stream, SafeLoader)
File "/usr/lib/python3.8/site-packages/yaml/init.py", line 114, in load
return loader.get_single_data()
File "/usr/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3.8/site-packages/yaml/composer.py", line 39, in get_single_node
if not self.check_event(StreamEndEvent):
File "/usr/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3.8/site-packages/yaml/parser.py", line 171, in parse_document_start
raise ParserError(None, None,
yaml.parser.ParserError: expected '', but found ''
in "", line 3, column 1:
$ldap_url = REDACTED
I see another user has support for JSON files but what about just simple text files? We have encrypted configuration files for our deployments and they fail yaml parsing because they are not yaml files.
Traceback (most recent call last): File "/usr/bin/ansible-vault-rekey", line 11, in
load_entry_point('ansible-vault-rekey==1.0.1', 'console_scripts', 'ansible-vault-rekey')()
File "/usr/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/usr/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(args, **kwargs)
File "/usr/lib/python3.8/site-packages/ansible_vault_rekey-1.0.1-py3.8.egg/ansible_vault_rekey/cli.py", line 99, in main
rekey.decrypt_file(f['file'], password_file, newpath)
File "/usr/lib/python3.8/site-packages/ansible_vault_rekey-1.0.1-py3.8.egg/ansible_vault_rekey/ansible_vault_rekey.py", line 138, in decrypt_file
r = vault.load(f.read())
File "/usr/lib/python3.8/site-packages/ansible_vault-1.2.0-py3.8.egg/ansible_vault/api.py", line 62, in load
File "/usr/lib/python3.8/site-packages/yaml/init.py", line 162, in safe_load
return load(stream, SafeLoader)
File "/usr/lib/python3.8/site-packages/yaml/init.py", line 114, in load
return loader.get_single_data()
File "/usr/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3.8/site-packages/yaml/composer.py", line 39, in get_single_node
if not self.check_event(StreamEndEvent):
File "/usr/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3.8/site-packages/yaml/parser.py", line 171, in parse_document_start
raise ParserError(None, None,
yaml.parser.ParserError: expected '', but found ''
in "", line 3, column 1:
$ldap_url = REDACTED