-
Notifications
You must be signed in to change notification settings - Fork 16
/
puppetdb.yml
61 lines (61 loc) · 1.8 KB
/
puppetdb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This is the configuration file for the Ansible plugin for PuppetDB inventory.
#
# Author: David Moreau Simard <[email protected]>
#
# == Parameters
# - host: Host on which to connect to for PuppetDB
# - port: PuppetDB jetty port
# - timeout: Timeout for connection
# - ssl_verify: Whether or not to verify SSL certificate
# - ssl_key: Path to SSL client key
# - ssl_cert: Path to SSL client cert
# - cache_file: Where to store the inventory cache
# - cache_duration: How long should cache persist until refreshed automatically
# - group_by: Generate groups based on puppet fact values
#
# == Notes on group_by
# This will generate ansible-compatible groups based on fact values
# For example, if you want to group hosts based on the 'kernelversion' fact,
# set group_by to 'kernelversion'.
# This will generate something like this:
# "3.2": {
# hosts: [ 'server1', 'server2' ]
# },
# "3.13": {
# hosts: [ 'server3', 'server4' ]
# },
# "3.16": {
# hosts: [ 'server5' ]
# }
#
# == Notes on group_by_tags
# This will generate ansible-compatible groups based on tag values
# For example, if you want to group hosts based on the Puppet Class tag you tag
# in your Puppet code "web-development" set group_by to this:
#
# group_by_tag:
# - Class: web-development
# - Class: web-production
#
# This will generate something like this:
# "web-development": {
# hosts: [ 'node01-dev.domain.tld', 'node02-dev.domain.tld' ]
# }
# "web-production": {
# hosts: [ 'node01-production.domain.tld', 'node02-production.domain.tld' ]
# }
#
# Regardless of whether or not group_by is set, the inventory will
# always return a group called 'all' with all the hosts in it.
#
---
host: localhost
port: 8080
timeout: 10
ssl_verify: False
ssl_key:
ssl_cert:
cache_file: '/tmp/ansible-inventory-puppetdb.cache'
cache_duration: 30
group_by:
group_by_tag: