Skip to content
This repository was archived by the owner on Sep 7, 2023. It is now read-only.

Commit 2c21ac2

Browse files
authored
Merge pull request #32 from op-ct/patch-2
Minor format and content fixes
2 parents 862ef5e + c2e5560 commit 2c21ac2

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

separate-hieradata-repository.md

+28-21
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ best practice.
1818
# Expectations
1919

2020
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.
2323

2424
This best practice may also be applied to existing users if a need is
2525
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.
2929

3030
# Best Practice Details
3131

32-
## Users on Puppet Enterprise 2016.4 and later
32+
## Preferred Option
33+
34+
### `mod` entry + `install_path` (Puppet Enterprise 2016.4 and later)
3335

3436
The `Puppetfile` should contain a `mod` entry for the `hieradata` repository.
3537
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.
6769
:datadir:
6870
```
6971
70-
## Users on older versions of Puppet Enterprise
72+
### `mod` entry + hiera.yaml datadir (Puppet Enterprise older than 2016.4)
7173

7274
The `Puppetfile` should contain a `mod` entry for the `hieradata` repository.
7375
This entry will resemble that of any Puppet module, and the `hieradata`
@@ -101,7 +103,7 @@ your `hiera.yaml` to reflect this:
101103
:datadir: /etc/puppetlabs/code/environments/%{environment}/modules/hieradata
102104
```
103105

104-
## Deployment Considerations
106+
### Deployment Considerations
105107

106108
Choosing to manage your data in the manner described in this best practice will
107109
require additional attention be paid to the process of deploying changes. Prior
@@ -126,25 +128,30 @@ updated.
126128

127129
## Discouraged Options
128130

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:
132136

133137
* http://garylarizza.com/blog/2014/03/07/puppet-workflow-part-3b/
134138

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.
148155

149156
```ruby
150157
mod 'trlinkin/nsswitch'

0 commit comments

Comments
 (0)