Hello there
I''ve written a script that generates a skeleton module, i was going to
drop it onto the recipe page, alas i can''t edit that...
#!/bin/bash
moduleDir=`puppetd --configprint modulepath | cut -d '':'' -f 1`
module="$1"
moduleInit="$moduleDir/$module/manifests/init.pp"
mkdir -p $moduleDir/$1/depends
mkdir -p $moduleDir/$1/files
mkdir -p $moduleDir/$1/templates
mkdir -p $moduleDir/$1/manifests
touch $moduleInit
echo "class $module" >> $moduleInit
echo "{" >> $moduleInit
echo -e "\tif (skip_$module != \"true\")" >>
$moduleInit
echo -e "\t{" >> $moduleInit
echo -e "\t}" >> $moduleInit
echo "" >> $moduleInit
echo "}" >> $moduleInit
when used it does:
[root@puppetbeta ~]# ~/bin/create_module test
[root@puppetbeta ~]# cd `puppetd --configprint modulepath | cut -d
'':''
-f 1`
[root@puppetbeta modules]# find ./test/
./test/
./test/depends
./test/files
./test/templates
./test/manifests
./test/manifests/init.pp
[root@puppetbeta modules]# cat ./test/manifests/init.pp
class test
{
if (skip_test != "true")
{
}
}
... obviously there is a general preference for the { to be up one
line, but that''s a minor change :)
I don''t know if it''s worthwhile to have there...
anyways, thought i''d post just in case.
chakkerz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
On Jan 28, 2009, at 7:33 PM, chakkerz wrote:> Hello there > > I''ve written a script that generates a skeleton module, i was going to > drop it onto the recipe page, alas i can''t edit that...You might try integrating it with this: http://github.com/albanpeignier/gepetto/ -- Hanlon''s razor: Never attribute to malice that which can adequately be explained by stupidity. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---