-
Notifications
You must be signed in to change notification settings - Fork 137
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
Converge fails when http_proxy and/or https_proxy is/are specified to the vagrant driver #7
Comments
Don't know i'm afraid. I have used test-kitchen extensively with chef and puppet and a little with ansible but not used http proxies. |
I tracked down this issue. The environment variables for
which gets turned into something like this by test-kitchen:
which results in a bash syntax error. The super hacky fix is to simply put a bash command ahead of the Now, with that in mind, I don't think the http_proxy settings will actually be used during the installation of ansible since the return string consists of many lines and it appears that test-kitchen's And thanks for creating kitchen-ansible -- it's really nice to have an quick way to use Test Kitchen as I begin experimenting with Ansible coming from a Chef background. |
I know this issue. had same issue in kitchen-puppet. The driver preprend the http_proxy and https_proxy values to an env command and then call the install script. This is tough to get working when the install scripts get big. |
if things get too tricky to solve another way, we could always try prepending with |
Yes. in kitchen-puppet i found it easier to add the http_proxy and https_proxy parameters to the provisioner part of kitchen.yaml and then put them in the commands individually in the install parts of the code. I think this approach will work for ansible just have not had time to do it. -) |
@neillturner It looks like this is the diff where you added http_proxy support to kitchen-puppet. Fair to say this is a good template for what needs to happen in kitchen-ansible? |
yes it is. I added http_proxy support to kitchen-puppet as i needed it on a contract i was doing using puppet and aws. I will see if i get time this week and next contract will involve ansible so i may well get time to do it. |
this is now support in kitchen-ansible 0.0.25 |
👍 confirmed working with kitchen-ansible 0.0.25 from rubygems.org. Thanks! |
There seems to have been a regression, I'm seeing the same issue as originally reported. My setup is:
extract:
|
I don't support putting http_proxy and/or https_proxy in the driver stanza of the .kitchen.yml |
In the driver, @neillturner, as I need to set an HTTP proxy during the Docker build. I'm happy to create a PR, do you have any advice on how to approach this issue? |
try specifying the platform as it won't do the if statements ansible_platform: centos ie one of debian', 'ubuntu' 'redhat', 'centos', 'fedora' 'amazon' 'suse', 'opensuse', 'sles' |
added an extra initial blank line to the beginning of the install scripts and this allows the driver env variable to work at least for the install command. |
When http_proxy and/or https_proxy is/are specified in the driver stanza of the .kitchen.yml, I get the following error:
The proxies are valid (I've scrubbed the names for the purposes of this bug report), and work regularly with other kitchen providers (like chef for example).
Full run output:
.kitchen.yml contents:
The text was updated successfully, but these errors were encountered: