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 has Undef Value #1194

Open
goeldicom opened this issue Sep 2, 2024 · 1 comment
Open

$_proxy has Undef Value #1194

goeldicom opened this issue Sep 2, 2024 · 1 comment

Comments

@goeldicom
Copy link

Describe the Bug

When $_proxy has no value, this error may appear:

Error while evaluating a Resource Statement
Evaluation Error: Operator '[]' is not applicable to an Undef Value. 
(file: /etc/puppetlabs/code/environments/production/modules/apt/manifests/ppa.pp, line: 68, column: 8)

Expected Behavior

$_proxy should be defined, perhaps this way:

$_proxy = $::apt::_proxy ? {
  undef  => { 'host' => '', 'port' => '', 'https' => false },
  default => $::apt::_proxy,
}

Environment

  • Version [7.7.1}
  • Platform [Ubuntu 20.04]

Additional Context

This should be done by the module, not in node manifests.

@kenyon
Copy link

kenyon commented Sep 2, 2024

Is that the right module version and error message? Line 68 of v7.7.1 (quite an old version) is this, which doesn't make sense with that error message:

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

No branches or pull requests

2 participants