X-Git-Url: http://git.onelab.eu/?p=myops.git;a=blobdiff_plain;f=puppet%2Fcron.d%2Fautosign.plcsh;fp=puppet%2Fcron.d%2Fautosign.plcsh;h=fb611791aed9e97a77632cebcdaec297c214969f;hp=0000000000000000000000000000000000000000;hb=1023e81d941cd877ae9d9cf261a5f5231b7a6c2a;hpb=f9ef0ba59143f13b5731aeb03518ff7e4ffd7bb2 diff --git a/puppet/cron.d/autosign.plcsh b/puppet/cron.d/autosign.plcsh new file mode 100755 index 0000000..fb61179 --- /dev/null +++ b/puppet/cron.d/autosign.plcsh @@ -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') +