Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #------------------------------------------------------------
- # Now we need to build up arrays of source to be synced, this
- # depends on the set of files the nginx instance serves
- # @todo Combine hia & hnav, that is, there will still be
- # separate config files, but only a single parameter
- # for the nginx module
- #------------------------------------------------------------
- if($serve_hia == true) {
- $hia_etc_source = 'puppet:///modules/nginx/hnav'
- } else {
- $hia_etc_source = ''
- }
- if($serve_hnav == true) {
- $hnav_etc_source = 'puppet:///modules/nginx/hia'
- } else {
- $hnav_etc_source = ''
- }
- if($serve_firmware == true) {
- $firmware_etc_source = 'puppet:///modules/nginx/firmware'
- } else {
- $firmware_etc_source = ''
- }
- # Build up final list of sources to sync
- $etc_source = split("$hia_etc_source $hnav_etc_source $firmware_etc_source", '\s+')
- #--------------------------------------------------------
- # /etc files that configure nginx for particular services
- #--------------------------------------------------------
- file { '/etc/nginx/conf.d':
- path => '/etc/nginx/conf.d',
- ensure => directory,
- require => File['/etc/nginx/nginx.conf'],
- source => $etc_source,
- sourceselect => all,
- recurse => true,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement