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:
[r...@puppetbeta ~]# ~/bin/create_module test
[r...@puppetbeta ~]# cd `puppetd --configprint modulepath | cut -d ':'
-f 1`
[r...@puppetbeta modules]# find ./test/
./test/
./test/depends
./test/files
./test/templates
./test/manifests
./test/manifests/init.pp
[r...@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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---