Created
May 27, 2014 12:16
-
-
Save raphink/feb706303ce700992a8c to your computer and use it in GitHub Desktop.
Shared hosts entries with puppetdbquery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define shared_host ( | |
| $ipaddress, | |
| $fqdn, | |
| $hostname, | |
| ) { | |
| host { $fqdn: | |
| ip => $ipaddress, | |
| host_aliases => $hostname, | |
| } | |
| } | |
| $hosts = query_facts('Class["settings"]', ['hostname', 'fqdn', 'ipaddress']) | |
| create_resources('shared_host', $hosts) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment