Add spec file for basic puppet configuration on client & server
[myops.git] / puppet / cron.d / autosign.plcsh
diff --git a/puppet/cron.d/autosign.plcsh b/puppet/cron.d/autosign.plcsh
new file mode 100755 (executable)
index 0000000..fb61179
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/env plcsh
+# create /etc/puppet/autosign.conf 
+# list of nodes from which puppetmaster should automatically sign
+
+import os
+
+nodes = GetNodes({'peer_id' : None})
+f = open('/etc/puppet/autosign.conf.pre', 'w')
+for n in nodes:
+       print >>f, n['hostname']
+
+f.close()
+os.rename('/etc/puppet/autosign.conf.pre', '/etc/puppet/autosign.conf')
+