@@ -9,35 +9,45 @@ WARNING: Version 0.2.0 no longer uses hiera functions. The same behavior should
9
9
## Usage
10
10
11
11
Specify a different default staging path (must be declared before using resource):
12
-
13
- class { 'staging':
14
- path => '/var/staging',
15
- owner => 'puppet',
16
- group => 'puppet',
17
- }
12
+ ``` puppet
13
+ class { 'staging':
14
+ path => '/var/staging',
15
+ owner => 'puppet',
16
+ group => 'puppet',
17
+ }
18
+ ```
18
19
19
20
Staging files from various sources:
21
+ ``` puppet
22
+ staging::file { 'sample':
23
+ source => 'puppet://modules/staging/sample',
24
+ }
20
25
21
- staging::file { 'sample':
22
- source => 'puppet://modules/staging/sample',
23
- }
24
-
25
- staging::file { 'apache-tomcat-6.0.35':
26
- source => 'http://apache.cs.utah.edu/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz',
27
- }
28
-
26
+ staging::file { 'apache-tomcat-6.0.35':
27
+ source => 'http://apache.cs.utah.edu/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz',
28
+ }
29
+ ```
29
30
30
31
Staging and extracting files:
31
-
32
- staging::file { 'sample.tar.gz':
33
- source => 'puppet:///modules/staging/sample.tar.gz'
34
- }
35
-
36
- staging::extract { 'sample.tar.gz':
37
- target => '/tmp/staging',
38
- creates => '/tmp/staging/sample',
39
- require => Staging::File['sample.tar.gz'],
40
- }
32
+ ``` puppet
33
+ staging::file { 'sample.tar.gz':
34
+ source => 'puppet:///modules/staging/sample.tar.gz'
35
+ }
36
+
37
+ staging::extract { 'sample.tar.gz':
38
+ target => '/tmp/staging',
39
+ creates => '/tmp/staging/sample',
40
+ require => Staging::File['sample.tar.gz'],
41
+ }
42
+ ```
43
+
44
+ Deploying a file (combining staging and extract):
45
+ ``` puppet
46
+ staging::deploy { 'sample.tar.gz':
47
+ source => 'puppet:///modules/staging/sample.tar.gz',
48
+ target => '/usr/local',
49
+ }
50
+ ```
41
51
42
52
Staging files currently support the following source:
43
53
0 commit comments