@@ -18,8 +18,8 @@ best practice.
18
18
# Expectations
19
19
20
20
All new customers working with someone in CS should be directed to follow this
21
- best practice if, and only if, there is an identified need for decoupling as
22
- described above.
21
+ best practice ** if, and only if,** there is an identified need for decoupling
22
+ as described above.
23
23
24
24
This best practice may also be applied to existing users if a need is
25
25
identified. However application of this best practice to an existing user may
@@ -29,7 +29,9 @@ user's workflow(s) should be explored and considered.
29
29
30
30
# Best Practice Details
31
31
32
- ## Users on Puppet Enterprise 2016.4 and later
32
+ ## Preferred Option
33
+
34
+ ### ` mod ` entry + ` install_path ` (Puppet Enterprise 2016.4 and later)
33
35
34
36
The ` Puppetfile ` should contain a ` mod ` entry for the ` hieradata ` repository.
35
37
This entry will appear the same as a Puppet module entry, but will install the
@@ -67,7 +69,7 @@ this is not recommended unless strictly required.
67
69
:datadir :
68
70
` ` `
69
71
70
- ## Users on older versions of Puppet Enterprise
72
+ ### ` mod` entry + hiera.yaml datadir ( Puppet Enterprise older than 2016.4)
71
73
72
74
The `Puppetfile` should contain a `mod` entry for the `hieradata` repository.
73
75
This entry will resemble that of any Puppet module, and the `hieradata`
@@ -101,7 +103,7 @@ your `hiera.yaml` to reflect this:
101
103
:datadir: /etc/puppetlabs/code/environments/%{environment}/modules/hieradata
102
104
` ` `
103
105
104
- # # Deployment Considerations
106
+ # ## Deployment Considerations
105
107
106
108
Choosing to manage your data in the manner described in this best practice will
107
109
require additional attention be paid to the process of deploying changes. Prior
@@ -126,25 +128,30 @@ updated.
126
128
127
129
# # Discouraged Options
128
130
129
- # ## Gary Larizza Blog method In the past, managing hieradata as a separate
130
- " source" in `r10k` has been recommended. Many users are using instructions from
131
- Gary Larizza's (now dated) Puppet Workflow blog to implement this method.
131
+ # ## Hieradata as a separate "source" in `r10k` (Gary Larizza Blog method)
132
+
133
+ In the past, managing hieradata as a separate "source" in `r10k` has been
134
+ recommended. Many users are using instructions from Gary Larizza's (now dated)
135
+ Puppet Workflow blog to implement this method :
132
136
133
137
* http://garylarizza.com/blog/2014/03/07/puppet-workflow-part-3b/
134
138
135
- This approach is now discouraged, and is considered more complicated and fragile
136
- than required. Adding an entry for `hieradata` into the `Puppetfile` is more
137
- reliable, easier to implement, and allows the `Puppetfile` be the canonical
138
- description of the environment.
139
-
140
- # ## `moduledir` method In R10k 1.4.0, it became possible to use the `moduledir`
141
- directive to direct R10k module entries to install modules in a non-standard
142
- relative path. The `moduledir` directive should be placed before before all `mod`
143
- entries in a `Puppetfile` to redirect the installation location. Though it is
144
- not documented, the `moduledir` directive can currently be used to "reset" the
145
- path `mod` entries install into at any point in a `Puppetfile`. In the past this
146
- has been used to achieve a similar effect as the `install_path` argument on the
147
- ` mod` entry as detailed in this best practice.
139
+ **This approach is now discouraged,** and is considered more complicated and
140
+ fragile than required. Adding an entry for `hieradata` into the `Puppetfile`
141
+ is more reliable, easier to implement, and allows the `Puppetfile` be the
142
+ canonical description of the environment.
143
+
144
+ # ## Extra `moduledir` entries in the Puppetfile (`moduledir` method)
145
+
146
+ In r10k 1.4.0, it became possible to use the `moduledir` directive to direct
147
+ r10k module entries to install modules in a non-standard relative path.
148
+
149
+ Normally, the `moduledir` directive is placed before before all `mod` entries in
150
+ a `Puppetfile` to redirect the installation location. However, the `moduledir`
151
+ directive can currently also be used to "reset" the path `mod` entries install
152
+ into at any point in a `Puppetfile`. This technique has been used in the past
153
+ to achieve a similar effect as the `install_path` argument on the `mod`
154
+ entry as detailed in this best practice.
148
155
149
156
` ` ` ruby
150
157
mod 'trlinkin/nsswitch'
0 commit comments