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

Configure passenger through hiera. #568

Closed
ctavan opened this issue Feb 10, 2015 · 3 comments
Closed

Configure passenger through hiera. #568

ctavan opened this issue Feb 10, 2015 · 3 comments

Comments

@ctavan
Copy link

ctavan commented Feb 10, 2015

I've tried to configure the pre-built passenger packages through hiera but I seem to be missing something.

The following puppet config works for me as expected:

  class { 'nginx':
    package_source  => 'passenger',
  }

I tried to transform this into the puppet part:

include nginx

and the hiera part:

---
nginx::package:
  package_source: 'passenger'

However the puppet-nginx module doesn't respect the hiera config. Am I using the wrong keys in hiera?

EDIT: I have modified my initial comment. Initially I was wondering about nginx::config::http_cfg_append as well, but this works fine. So my final question is only concerned about the package_source.

@3flex
Copy link
Contributor

3flex commented Apr 13, 2015

Use this in hiera:

---
nginx:
  package_source: 'passenger'

The reason is a resource-like declaration is being used to declare nginx::package in init.pp. That overrides whatever you set in hiera for nginx::package. Instead, set package_source on nginx class as in my example.

@3flex
Copy link
Contributor

3flex commented Apr 13, 2015

There's info here about the automatic parameter lookup rules: https://docs.puppetlabs.com/hiera/1/puppet.html#automatic-parameter-lookup

@ctavan
Copy link
Author

ctavan commented Apr 14, 2015

@3flex thanks for your answer. Unfortunately your suggestion didn't work for me either. However following the documentation I managed to figure out the correct hiera config:

---
nginx::package_source: 'passenger'

That works for me with puppet 3.7.4 and hiera 1.3.4 and jfryman-nginx v0.2.6.

@ctavan ctavan closed this as completed Apr 14, 2015
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