dev/provisioning/modules/puppi/files/mcollective/puppi.ddl
changeset 28 b0b56e0f8c7f
equal deleted inserted replaced
27:a2342f26c9de 28:b0b56e0f8c7f
       
     1 metadata    :name        => "SimpleRPC Agent For PUPPI Commands",
       
     2             :description => "Agent to query PUPPI commands via MCollective", 
       
     3             :author      => "Al @ Lab42",
       
     4             :license     => "Apache License 2.0",
       
     5             :version     => "0.3",
       
     6             :url         => "http://www.example42.com/",
       
     7             :timeout     => 600
       
     8 
       
     9 [ "check" , "log" , "info" ].each do |myact| 
       
    10     action myact, :description => "Run puppi myact" do
       
    11         display :always
       
    12 
       
    13         input :project,
       
    14               :prompt      => "Project",
       
    15               :description => "PUPPI project",
       
    16               :type        => :string,
       
    17               :validation  => '^[a-zA-Z\-\.=_\d]+$',
       
    18               :optional    => true,
       
    19               :maxlength   => 50
       
    20 
       
    21         input :puppioptions,
       
    22               :prompt      => "Puppi options",
       
    23               :description => "PUPPI options",
       
    24               :type        => :string,
       
    25               :validation  => '^[a-zA-Z\-\.=_\d]+$',
       
    26               :optional    => true,
       
    27               :maxlength   => 50
       
    28 
       
    29         output :data,
       
    30               :description => "Output from the Puppi run",
       
    31               :display_as  => "Output"
       
    32 
       
    33         output :exitcode,
       
    34               :description  => "Exit Code from the Puppi run",
       
    35               :display_as => "Exit Code"
       
    36     end
       
    37 end
       
    38 
       
    39 [ "deploy" , "rollback" , "init" , "configure" ].each do |myact|
       
    40     action myact, :description => "Run puppi myact" do
       
    41         display :always
       
    42 
       
    43         input :project,
       
    44               :prompt      => "Project",
       
    45               :description => "PUPPI project",
       
    46               :type        => :string,
       
    47               :validation  => '^[a-zA-Z\-\.=_\d]+$',
       
    48               :optional    => false,
       
    49               :maxlength   => 50
       
    50 
       
    51         input :puppioptions,
       
    52               :prompt      => "Puppi options",
       
    53               :description => "PUPPI options",
       
    54               :type        => :string,
       
    55               :validation  => '^[a-zA-Z\-\.=_\d]+$',
       
    56               :optional    => true,
       
    57               :maxlength   => 50
       
    58 
       
    59         output :data,
       
    60               :description => "Output from the Puppi run",
       
    61               :display_as  => "Output"
       
    62 
       
    63         output :exitcode,
       
    64               :description  => "Exit Code from the Puppi run",
       
    65               :display_as => "Exit Code"
       
    66     end
       
    67 end
       
    68