Puppet: System Administration Automated

Interactive Puppet usage


I just committed another change to ralsh. I was trying to fix Puppet's support for Solaris Zones and I found that I wanted to easily remove and create zones from the command line. So, I made it easy to do so:

luke@sol10b(0) $ sudo ralsh zone configtesting ensure=absent
notice: /ralsh/Zone[configtesting]/ensure: removed
zone { 'configtesting':
    ensure => 'absent'
}
luke@sol10b(0) $

As you can guess, here I'm specifying parameters to apply to a resource specified on the command-line. Zones are a bit heavy-weight, but we can do simple things, too:

luke@culain(0) $ cat /tmp/testing
cat: /tmp/testing: No such file or directory
luke@culain(1) $ bin/ralsh file /tmp/testing ensure=present content="this is some content\nokay?\n" mode=755
notice: /ralsh/File[/tmp/testing]/ensure: changed file contents from {md5}d94605faa66f109a8b4ab772002f31f8 to {md5}d94605faa66f109a8b4ab772002f31f8
file { '/tmp/testing':
    type => 'file',
    owner => '100',
    group => '1000',
    checksum => '{md5}d94605faa66f109a8b4ab772002f31f8',
    ensure => 'file',
    content => 'this is some content\nokay?\n',
    mode => '493'
}
luke@culain(0) $ les /tmp/testing
-rwxr-xr-x 1 luke luke 29 Jun 13 17:40 /tmp/testing
luke@culain(0) $

We're still clearly a ways from having a real Puppet shell, but now at least you don't have to remember how commands work for reading or writing, and you can even start using ralsh from external programs (although it'd make more sense to use the puppet executable for anything other than a single command).

add to del.icio.us Add to Blinkslist add to furl Digg it add to ma.gnolia Stumble It! add to simpy seed the vine TailRank post to facebook

Wed, 13 Jun 2007 | Tags: , , , ,


Name:


E-mail:


URL:


Comment: