Skip to content

Instantly share code, notes, and snippets.

@jeroenr
Created March 16, 2012 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroenr/2049233 to your computer and use it in GitHub Desktop.
Save jeroenr/2049233 to your computer and use it in GitHub Desktop.
Using puppet templates example
## Use template from module 'elmar'
class repo-nonfree {
file { "/etc/apt/sources.list.d/non-free.list":
ensure => present,
content => $operatingsystem ? {
"ubuntu" => template("elmar/apt/sources.list.d/ubuntu-partner.list.erb"),
"debian" => template("elmar/apt/sources.list.d/non-free.list.erb"),
default => template("elmar/apt/sources.list.d/non-free.list.erb"),
},
notify => Exec["aptgetupdate"],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment