compass-adapters/cobbler/snippets/preseed_chef-validator.pem
xiaodongwang ae44332c69 update snippet to support preseed
Change-Id: I8442758ffaf3a55ec4773bf820bc4cdefb2e6452
2014-05-19 10:47:36 -07:00

16 lines
437 B
Plaintext

#if $getVar('chef_validation_file', '') == ""
#set chef_validation_file = '/etc/chef-server/chef-validator.pem'
#end if
#set $firstline = True
#set $f = $open($chef_validation_file)
#for $line in $f
#set $line = $line.rstrip('\n')
#if $firstline
echo "$line" > /target/etc/chef/validation.pem; \
#else
echo "$line" >> /target/etc/chef/validation.pem; \
#end if
#set $firstline = False
#end for
#silent $f.close()