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

proxy support for apt::ppa #143

Closed
wants to merge 1 commit into from

Conversation

PierreGambarotto
Copy link

If the node is behind a proxy, the apt class has two parameters to describe the proxy configuration (proxy_host and proxy_port).

Due to a bug in add-apt-repository, the settings is ignored, and you must define the environment variable https_proxy. See launchpad bug for more details.

The code I propose modifies the environment of the exec resource if the apt class is defined with a proxy_host value different from the default (false).

@hunner
Copy link

hunner commented Jul 11, 2013

I'm curious... would updating Acquire::http::proxy et al in /etc/apt/apt.conf as per https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/516032/comments/19 not be a more correct workaround?

@hunner
Copy link

hunner commented Jul 11, 2013

Oh duh, never mind; that doesn't work and is why you submitted this PR.

@hunner hunner mentioned this pull request Jul 11, 2013
@hunner hunner closed this in #144 Jul 12, 2013
@slamont
Copy link

slamont commented Jul 15, 2013

I'm getting an error that I think maybe related to this code
Error: Parameter environment failed on Exec[add-apt-repository-ppa:formorer/icinga]: Invalid environment setting ''

Used like this:
apt::ppa { 'ppa:formorer/icinga': }

@slamont
Copy link

slamont commented Jul 15, 2013

When removing this commit I got another error:
Error: Could not find dependency File[/etc/apt/sources.list.d] for Exec[add-apt-repository-ppa:formorer/icinga]

@PierreGambarotto
Copy link
Author

You're right. The correct empty value for environment is the empty array [], and not the empty string "". I propose a pull request immediatly.

For your other problem, the dependancy File[/etc/apt/sources.list.d] is realized by the class apt itself.
So you have to include the apt class.

include apt
# or
class{apt:
}

@PierreGambarotto
Copy link
Author

@slamont

Please test with #145

@slamont
Copy link

slamont commented Jul 16, 2013

#145 Worked for me

Your other suggestion worked as expected (include apt).
I'm currently working on a fork of rendhalver/puppet-icinga and it seems that I'll have a little more work to do than expected ;)

@hunner
Copy link

hunner commented Jul 31, 2013

Thanks for catching this @PierreGambarotto ! Sorry for the trouble.

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

Successfully merging this pull request may close these issues.

4 participants