Skip to content

Instantly share code, notes, and snippets.

@turingmachine
Last active December 15, 2015 05:49
Show Gist options
  • Select an option

  • Save turingmachine/5211752 to your computer and use it in GitHub Desktop.

Select an option

Save turingmachine/5211752 to your computer and use it in GitHub Desktop.
class site_varnish::server(
$type
) {
$target = "/etc/varnish/$type.conf"
concat{$target:
owner => root,
group => root,
mode => '0644',
}
Concat::Fragment <<| tag == 'varnish' |>>
}
class site_varnish::node(
$type
) {
@@concat::fragment{"varnish-$type-$fqdn":
target => getvar("::site_varnish::server::$type::target"),
content => template("site_varnish/nodes/$type.erb"),
tag => 'varnish',
}
}
node /varnish-server/ {
class{'::site_varnish::server':
type => 'pres',
}
}
node /pres/ {
class{'::site_varnish::node':
type => 'pres',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment