Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9314c4f + ac8e48f commit 40b5820Copy full SHA for 40b5820
puppet.py
@@ -36,3 +36,11 @@ def check_disabled():
36
def dryrun(*args):
37
"""Run puppet agent but make no changes to the system"""
38
puppet('--noop', *args)
39
+
40
+@task
41
+@hosts('puppetmaster-1.management')
42
+def lookup_hieradata(key):
43
+ puppet_directory = '/usr/share/puppet/production/current'
44
+ config_file = '{0}/hiera.yml'.format(puppet_directory)
45
+ variables = '::environment=production ::lsbdistcodename=precise ::settings::manifestdir={0}/manifests'.format(puppet_directory)
46
+ run('hiera --config {0} {1} {2}'.format(config_file, key, variables))
0 commit comments