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 737ffa5 + 20bbbfb commit f44435eCopy full SHA for f44435e
puppet.py
@@ -1,5 +1,13 @@
1
from fabric.api import *
2
3
+@task
4
+def loadhosts(*classnames):
5
+ """Load hosts that include given Puppet class(es)"""
6
+ classnames = ','.join(classnames)
7
+ with hide('running', 'stdout'):
8
+ with settings(host_string=env.gateway, gateway=None):
9
+ env.hosts = run('govuk_node_list -C %s' % classnames).splitlines()
10
+
11
def puppet(*args):
12
sudo('govuk_puppet %s' % ' '.join(args))
13
0 commit comments