equal
deleted
inserted
replaced
|
1 # Define puppi::run |
|
2 # |
|
3 # This define triggers a puppi deploy run directly during Puppet |
|
4 # execution. It can be used to automate FIRST TIME applications |
|
5 # deployments directly during the first Puppet execution |
|
6 # |
|
7 # == Variables |
|
8 # |
|
9 # [*name*] |
|
10 # The title/name you use has to be the name of an existing puppi::project |
|
11 # procedure define |
|
12 # |
|
13 # == Usage |
|
14 # Basic Usage: |
|
15 # puppi::run { "myapp": } |
|
16 # |
|
17 define puppi::run ( |
|
18 $project = '', |
|
19 $timeout = 300) { |
|
20 |
|
21 require puppi |
|
22 |
|
23 exec { "Run_Puppi_${name}": |
|
24 command => "puppi deploy ${name}; [ $? -le \"1\" ] && touch ${puppi::params::archivedir}/puppirun_${name}", |
|
25 path => '/bin:/sbin:/usr/sbin:/usr/bin', |
|
26 creates => "${puppi::params::archivedir}/puppirun_${name}", |
|
27 timeout => $timeout, |
|
28 # require => File[ tag == 'puppi_deploy' ], |
|
29 } |
|
30 |
|
31 } |