anpassen von git ignore
This commit is contained in:
30
code/environments/production/manifests/test.pp
Normal file
30
code/environments/production/manifests/test.pp
Normal file
@@ -0,0 +1,30 @@
|
||||
class test {
|
||||
# Schleifen Loop möglichkeit 1
|
||||
$dateinamen = [ 'datei_1.txt', 'datei_2.test' ]
|
||||
|
||||
$dateinamen.each |String $dateiname| {
|
||||
file { "/tmp/${dateiname}":
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => "Dies ist eine Datei ${dateiname}\n"
|
||||
}
|
||||
}
|
||||
# möglichkeit 2
|
||||
$konfigurations_dateien = {
|
||||
'/tmp/my_config' =>
|
||||
"port=3306\nbind-address=127.0.0.1\n",
|
||||
'/tmp/httpd.conf' =>
|
||||
"Listen 80\nServerName localhost\n"
|
||||
}
|
||||
|
||||
$konfigurations_dateien.each|String $pfad, String $inhalt| {
|
||||
file { $pfad:
|
||||
ensure => file,
|
||||
content => $inhalt,
|
||||
mode => '0640',
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user