source: trunk/puppet/manifests/common/common.pp @ 401

Last change on this file since 401 was 181, checked in by sebas, 15 years ago

agrege peon para probar el escritorio + una funcion para crear enlace symbolico

File size: 664 bytes
RevLine 
[164]1define line($file, $line, $ensure = 'present') {
2   case $ensure {
3      default : { err ( "unknown ensure value ${ensure}" ) }
4      present: {
5         exec { "/bin/echo '${line}' >> '${file}'":
6            unless => "/bin/grep -qFx '${line}' '${file}'"
7         }
8      }
9      absent: {
10         exec { "/usr/bin/perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'":
11            onlyif => "/bin/grep -qFx '${line}' '${file}'"
12         }
13      }
14   }
15}
16
[181]17    define create::symblink ( $target, $linkname ) {
18    exec { "createsymblink":
19        command => "ln -s $target $linkname",
20        path => "/bin",
21        creates => "$linkname",
22         }
23    }
24
25
Note: See TracBrowser for help on using the repository browser.