1
0
Fork 0

Show some various file stuff

This commit is contained in:
Andrew Tomaka 2013-12-02 16:51:56 -05:00
parent d535b2fd60
commit 1dac8d0e57
3 changed files with 20 additions and 0 deletions

1
files/test2.txt Normal file
View file

@ -0,0 +1 @@
We can create a file from another

18
manifests/2-file-type.pp Normal file
View 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
View file

@ -0,0 +1 @@
You said: <%= @something %>