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

Hiera documentation bug #556

Closed
jowrjowr opened this issue Jan 28, 2015 · 6 comments
Closed

Hiera documentation bug #556

jowrjowr opened this issue Jan 28, 2015 · 6 comments
Labels
needs-feedback Further information is requested

Comments

@jowrjowr
Copy link

The workaround described here https://github.com/jfryman/puppet-nginx/blob/master/docs/hiera.md in regards to specifying nginx::config options without using hiera does not work.

Including nginx will construct the nginx::config class, which then errors out when you later construct it because nginx::config will be duplicated.

My preferred solution is this:

class { 'nginx::config': }-> class { 'nginx': }

This enforces the proper ordering, and eased a bit of frustration I was having.

@jfryman
Copy link
Contributor

jfryman commented Jan 29, 2015

Thanks @jowrjowr. What would you change to make this actionable for new users? Docs need updating, or is this better a code change in your opinion?

@jowrjowr
Copy link
Author

I think it needs to be made explicit that if you specify a nginx::config,
you have to fully populate it because the module won't merge in other
defaults.

It would be really nice if folks weren't pushed so strongly into hiera. Why
not just construct nginx::config as a normal class, and allow parameters to
be overrided as needed?

On Thu, Jan 29, 2015 at 9:13 AM, James Fryman [email protected]
wrote:

Thanks @jowrjowr https://github.com/jowrjowr. What would you change to
make this actionable for new users? Docs need updating, or is this better a
code change in your opinion?


Reply to this email directly or view it on GitHub
#556 (comment)
.

@jfryman
Copy link
Contributor

jfryman commented Jan 30, 2015

It would be really nice if folks weren't pushed so strongly into hiera. Why
not just construct nginx::config as a normal class, and allow parameters to
be overrided as needed?

It's not a push. I'm really trying to find a nice medium between those that do use hiera, and those that do not. We're sitting on two worlds here... and it seems to be difficult to truly find that.

The ideal is that what I do specify in the documents does work, and you do not have to fully populate nginx::config. That just means there is more work to be done.

@devopsdevon
Copy link

For anyone that stumbles across this issue and needs a temporary work around, here is a fully functional example of instantiating nginx::config manually using version 0.2.2 of the nginx module.

As far as I can tell, this example sets all of the same defaults that would normally get set (skipping over anything set to undef by default):

  include ::nginx::params
  class { '::nginx::config':
    client_body_temp_path          => $::nginx::params::client_body_temp_path,
    conf_dir                       => $::nginx::params::conf_dir,
    daemon_user                    => $::nginx::params::daemon_user,
    global_owner                   => $::nginx::params::global_owner,
    global_group                   => $::nginx::params::global_group,
    global_mode                    => $::nginx::params::global_mode,
    http_access_log                => $::nginx::params::http_access_log,
    log_dir                        => $::nginx::params::logdir,
    nginx_error_log                => $::nginx::params::nginx_error_log,
    pid                            => $::nginx::params::pid,
    proxy_temp_path                => $::nginx::params::proxy_temp_path,
    sites_available_owner          => $::nginx::params::sites_available_owner,
    sites_available_group          => $::nginx::params::sites_available_group,
    sites_available_mode           => $::nginx::params::sites_available_mode,
    super_user                     => $::nginx::params::super_user,
    temp_dir                       => $::nginx::params::temp_dir,
  } -> class { '::nginx': }

demophoon pushed a commit to demophoon/puppet-environment that referenced this issue Jul 20, 2015
@3flex
Copy link
Contributor

3flex commented Aug 12, 2015

@jowrjowr does this documentation update help? #669

@3flex 3flex added the needs-feedback Further information is requested label Aug 12, 2015
@wyardley
Copy link
Collaborator

We are going to be reworking this, and probably flattening things out. So, I'm going to close this ticket for now, feel free to follow #950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants