Show some various file stuff
This commit is contained in:
parent
d535b2fd60
commit
1dac8d0e57
3 changed files with 20 additions and 0 deletions
1
files/test2.txt
Normal file
1
files/test2.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
We can create a file from another
|
18
manifests/2-file-type.pp
Normal file
18
manifests/2-file-type.pp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# create file simple file
|
||||||
|
file { '/tmp/test1.txt':
|
||||||
|
ensure => present,
|
||||||
|
content => 'Hello',
|
||||||
|
}
|
||||||
|
|
||||||
|
# create file from existing file
|
||||||
|
file { '/tmp/test2.txt':
|
||||||
|
ensure => present,
|
||||||
|
source => '/vagrant/files/test2.txt',
|
||||||
|
}
|
||||||
|
|
||||||
|
# create file from template
|
||||||
|
$something = "Hello"
|
||||||
|
file { '/tmp/test3.txt':
|
||||||
|
ensure => present,
|
||||||
|
content => template('/vagrant/templates/test3.txt.erb'),
|
||||||
|
}
|
1
templates/test3.txt.erb
Normal file
1
templates/test3.txt.erb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
You said: <%= @something %>
|
Loading…
Reference in a new issue