Skip to content

Commit 31a711e

Browse files
authored
Merge pull request #236 from puppetlabs/yaml-docs
Update puppet-lint documentation to reflect legacy_facts yaml check feature
2 parents c35705b + d86e8c9 commit 31a711e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ To instruct Lint to automatically fix any issues that it detects, use the `--fix
4141
puppet-lint --fix /modules
4242
```
4343

44+
Note: The auto-fix functionality is available for Puppet manifest files only.
45+
4446
### Modify which checks to run
4547

4648
Puppet Lint options allow you to modify which checks to run. You can disable any of the checks temporarily or permanently, or you can limit testing to specific checks.
@@ -245,6 +247,23 @@ See `puppet-lint --help` for a full list of command line options and checks.
245247

246248
For a complete list of checks, and how to resolve errors on each check, see the Puppet Lint [checks](http://puppet-lint.com/checks/) page.
247249

250+
### YAML Checks
251+
252+
Puppet Lint can check Hiera YAML files for legacy facts.
253+
254+
For example, the following YAML would trigger warnings:
255+
256+
```yaml
257+
hierarchy:
258+
- name: "Legacy Facts Example"
259+
paths:
260+
- "os/%{facts.hostname}.yaml"
261+
- "/var/www/%{::hostname}.yaml"
262+
- "%{::bios_vendor}.yaml"
263+
```
264+
265+
Refer to the [Puppet Core Facts documentation](https://www.puppet.com/docs/puppet/8/core_facts.html) for a complete list of available core facts.
266+
248267
### Spacing, Indentation, and Whitespace
249268

250269
* Must use two-space soft tabs.

0 commit comments

Comments
 (0)