Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Adding a CA to the Ansible python env #2772

Open
gaspode opened this issue Feb 26, 2025 · 1 comment
Open

Question: Adding a CA to the Ansible python env #2772

gaspode opened this issue Feb 26, 2025 · 1 comment
Labels

Comments

@gaspode
Copy link

gaspode commented Feb 26, 2025

Question

I'm using the docker version of Semaphore. We have an SSL-scanning firewall which means we have to add the CA certificate to all hosts. I mounted the host's /etc/ssl/certs directory to the same location in the docker container and this means Semaphore is now able to pull the repository without an SSL error.

However, when I try running a playbook, it throws an SSL error trying to connect to AWS. I need some way of adding a CA cert to the bundle in the venv that certifi uses. Alternatively, I need some way of specifying additional python packages that should be installed into the venv (as I can then create a package that adds the cert)

Any suggestions?

Related to

No response

@gaspode
Copy link
Author

gaspode commented Feb 27, 2025

Used hacky bodge for now. The host has the required certs so mounted /etc/ssl/certs:/etc/ssl/certs and changed the entrypoint to :

cp /etc/ssl/certs/ca-certificates.crt /opt/semaphore/apps/ansible/11.1.0/venv/lib/python3.11/site-packages/certifi/cacert.pem && exec /sbin/tini -- /usr/local/bin/server-wrapper

It's nasty and I feel dirty but it'll do for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant