Skip to content

Instantly share code, notes, and snippets.

@larstobi
Created November 16, 2011 15:46
Show Gist options
  • Select an option

  • Save larstobi/1370415 to your computer and use it in GitHub Desktop.

Select an option

Save larstobi/1370415 to your computer and use it in GitHub Desktop.
node "mymachine" {
include main
class {
"main::extra":
myparam => "variable";
}
}
class main {
file {
"/etc/sysconfig/myfile":
ensure => present,
content => template("myfile.erb");
}
}
class main::extra {
file_line {
"option1":
path => "/etc/sysconfig/myfile",
line => "OPTION+=\"--option=${myparam}\"",
"option2":
path => "/etc/sysconfig/myfile",
line => "OTHER=\"${myparam}\"",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment