ansible-modules-hashivault icon indicating copy to clipboard operation
ansible-modules-hashivault copied to clipboard

Add support for UNIX Socket in VAULT_ADDR and test cases

Open alexander-bauer opened this issue 5 years ago • 1 comments

This pull request seeks to resolve #319 , which raises that HVAC does not directly support UNIX sockets, but has a clean workaround, by using requests_unixsocket to open a Session on the socket ahead of constructing the HVAC Client. This pull request implements that change in fcac9cc3ec6b88b1b148aac6c3704757d591b686.

All other commits are in support of the testing environment (to which I had to add Vault Agent, in order to support the test case) and the test case itself.

Please note, the new test requires requests_unixsocket to be available on the execution host, but that import is not made unless a VAULT_ADDR with unix in the scheme is supplied.

alexander-bauer avatar Dec 13 '20 17:12 alexander-bauer

The tests are now failing in the CI environment, not too surprisingly, because requests_unixsocket is missing. I'm hesitant to add it to the main requirements, seeing as it's an optional dependency. Can anyone advise as to the correct remediation?

alexander-bauer avatar Dec 13 '20 18:12 alexander-bauer