Conversation
|
Could you add a description to the PR saying what the problem is you're trying to solve? |
|
For the record, I would approve this change but I had a hand in writing it. Can someone else approve it? Perhaps @MoteHue |
MoteHue
left a comment
There was a problem hiding this comment.
So this will successfully template and encrypt wazuh-secrets.yml the first time.
But I'm seeing the second time I run it, ansible tries and fails to interpret the file:
(kayobe) ubuntu@mattc-skc-aio:~/src/kayobe-config$ kayobe playbook run etc/kayobe/ansible/wazuh-secrets.yml
[WARNING]: * Failed to parse /home/ubuntu/venvs/kayobe/share/kayobe/ansible/inventory/hosts with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. found unknown escape character The error appears to be in
'/home/ubuntu/src/kayobe-config/etc/kayobe/environments/ci-aio/wazuh-secrets.yml': line 10, column 20, but may be elsewhere in the file depending on the exact syntax problem.
[WARNING]: * Failed to parse /home/ubuntu/venvs/kayobe/share/kayobe/ansible/inventory/hosts with ini plugin: We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. found unknown escape character The error appears to be in
'/home/ubuntu/src/kayobe-config/etc/kayobe/environments/ci-aio/wazuh-secrets.yml': line 10, column 20, but may be elsewhere in the file depending on the exact syntax problem.
ERROR! Completely failed to parse inventory source /home/ubuntu/venvs/kayobe/share/kayobe/ansible/inventory/hosts
Kayobe playbook(s) etc/kayobe/ansible/wazuh-secrets.yml exited 1
@Alex-Welsh This may explain the previous formatting of the script. |
ecac530 to
74f582a
Compare
|
I couldn't get any errors when running any of the version of this code, and they seem to do the job, however, what has been added is a forced check to make sure that the Also note that the decryption of the file is necessary for checking whether the file is encrypted or not, could use a command line to determine this, but this would also require further steps and this way, we use the official Ansible vault pluggin. |
No description provided.