Commit b84ab7d
authored
Allow digging into fields of facts when they are a hash on old puppets (#656)
If a facts_to_tags tag looks like a hash path (eg: 'networking.domain'),
dig that path into the hash and use the inner value for the tag.
For backwards compatibility, if the name looks like a hash path
but there's a fact that's an exact string match (eg: there's a fact named
'networking.domain') then that will be used for the tag.
Note that on Puppet 6.0 and later `getvar` already behaves like this,
so this only makes it work on old Puppets.1 parent 9985be0 commit b84ab7d
2 files changed
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2177 | 2177 | | |
2178 | 2178 | | |
2179 | 2179 | | |
2180 | | - | |
| 2180 | + | |
2181 | 2181 | | |
2182 | 2182 | | |
2183 | 2183 | | |
2184 | 2184 | | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
2188 | 2195 | | |
2189 | 2196 | | |
2190 | 2197 | | |
2191 | | - | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
2192 | 2202 | | |
2193 | 2203 | | |
2194 | 2204 | | |
| |||
0 commit comments