-
Notifications
You must be signed in to change notification settings - Fork 392
Ansible container not seeing vault encrypted vars in vars_files #954
Comments
@s-sokolko do you have minimal POC in form of repo ? Documentation might be outdated, but looking at https://docs.ansible.com/ansible-container/container_yml/reference.html#supported-directives
I do not see in your example above definition for |
@Voronenko thank you for the quick reply! `fatal: [dante]: FAILED! => {"failed": true, "msg": "'proxy_users' is undefined"} PLAY RECAP ********************************************************************* ERROR Error applying role! engine=<container.docker.engine.Engine object at 0x7f76f0622090> exit_code=2 playbook=[{'hosts': u'dante', 'roles': ['dante-container'], 'vars': {}}] As I looked through the code of ansible-containers cli it seemed to me that vault_files are not used when I run ansible-container build. |
If you would create minimal POC in form of repo, I can debug. Take a look how it was done in this issue: #944 |
@Voronenko here is the repo https://github.com/s-sokolko/dante-container |
Thanks! |
@Voronenko is there any progress on the issue? Maybe I can help with some extra information? |
I have it in backlog, but need to find opportunity window between my commercial work schedule. |
The docs specifically state that ansible-container only decrypts files with the |
That's offtopic, but I prefer hashicorp "application" roles approach to prepare images that get prepared upon run - that makes it a little more robust. |
ISSUE TYPE
container.yml
OS / ENVIRONMENT
SUMMARY
I've come across the situation when ansible won't include my vars_files if they are encrypted via vault even if I specify vault_password_file. In the example below everything works fine if vars.yml is not encrypted. But as soon as I encrypt vars.yml I get the error (see below). Maybe I should use some other technique to inject vault encrypted variales into my container build process?
STEPS TO REPRODUCE
EXPECTED RESULTS
Sucessfull build
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: