Update hiera.md
Improvement to non-hiera usage example. * Fixed potention dependendy-cicle issue with example.
This commit is contained in:
parent
e710cccd4c
commit
69aa88000f
1 changed files with 15 additions and 5 deletions
|
@ -30,20 +30,30 @@ Maybe for some reason, Hiera isn't being used in your organization. Or, you like
|
|||
Assume the same code block as before:
|
||||
|
||||
```ruby
|
||||
class { 'nginx':
|
||||
gzip => false,
|
||||
class { 'nginx' :
|
||||
manage_repo => false,
|
||||
confd_purge => true,
|
||||
vhost_purge => true,
|
||||
}
|
||||
```
|
||||
|
||||
Should become...
|
||||
|
||||
```ruby
|
||||
include nginx
|
||||
class { 'nginx::config':
|
||||
gzip => false,
|
||||
Anchor['nginx::begin']
|
||||
->
|
||||
class { 'nginx::config' :
|
||||
confd_purge => true,
|
||||
vhost_purge => true,
|
||||
}
|
||||
|
||||
class { 'nginx' :
|
||||
manage_repo => false,
|
||||
}
|
||||
```
|
||||
|
||||
The order in which this commands are parsed is important, since nginx looks for nginx::config via a defined(nginx::config) statement, which as of puppet 3.x is still parse-order dependent.
|
||||
|
||||
# Why again are you doing this?
|
||||
|
||||
Well, the fact of the matter, the old Package/Config/Service pattern has served us well, but times are a-changin. Many users are starting to manage their packages and service seperately outside of the traditional pattern (Docker, anyone?). This means that in order to stay true to the goals of Configuration Management, it is becoming necessary to make less assumptions about how an organizations graph is composed, and allow the end-user additional flexibility. This is requring a re-think about how to best consume this module.
|
||||
|
|
Loading…
Reference in a new issue