Sparrowdo core dsl

Sparrowdo core-dsl is end user interface to easily start automation. Let me show a few examples:

# create / remove user:

user-create 'zookeeper';
user-delete 'zookeeper'

# create / remove group:

group-create 'birds';
group-delete 'birds';

# install packages:

package-install ('nano', 'tree', 'mc');

# install CPAN packages:

cpan-package-install ('CGI', 'Config::Tiny', 'HTTP::Tiny')

# manage services:

service-start 'nginx';
service-enable 'nginx';
service-restart 'nginx';

# create / delete directories:

directory-create '/var/data/feathered', %( 
   recursive => 1, 
   owner => 'zookeeper' 
directory-delete '/var/data/feathered';

# create files and templates:

file '/var/data/feathered/sparrow-greeting.txt', %( 
   mode    => '644', 
   owner   => 'zookeeper',
   content => 'hello! my name is Brave Sparrow'   
# Template-Toolkit templates are supported:
$ cat templates/sparrow-greeting.tmpl
my name is %name%
I can speak %langauge%
template-create '/var/data/feathered/sparrow-greeting.txt', %( 
    source => ( slurp 'examples/templates/sparrow-greeting.tmpl' ), 
    owner => 'zookeeper', 
    group => 'birds', 
    mode => '644', 
    variables => %( 
        name => 'Brave Sparrow', 
        language => 'English' 

To know more on core-dsl follow sparrowdo documentaion pages –


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s