module-nginx/manifests/config.pp
2011-06-06 17:25:04 -05:00

49 lines
No EOL
1 KiB
Puppet

class nginx::config inherits nginx::params {
File {
owner => 'root',
group => 'root',
mode => '0644',
}
file { "${nginx::params::nx_conf_dir}":
ensure => directory,
}
file { "${nginx::params::nx_conf_dir}/conf.d":
ensure => directory,
}
file { "${nginx::config::nx_run_dir}":
ensure => directory,
}
file { "${nginx::config::nx_client_body_temp_path}":
ensure => directory,
owner => $nginx::params::nx_daemon_user,
}
file {"${nginx::config::nx_proxy_temp_path}":
ensure => directory,
owner => $nginx::params::nx_daemon_user,
}
file { '/etc/nginx/sites-enabled/default':
ensure => absent,
}
file { "${nginx::params::nx_conf_dir}/nginx.conf":
ensure => file,
content => template('nginx/conf.d/nginx.conf.erb'),
}
file { "${nginx::params::nx_conf_dir}/conf.d/proxy.conf":
ensure => file,
content => template('nginx/conf.d/proxy.conf.erb'),
}
file { "${nginx::config::nx_temp_dir}/nginx.d":
ensure => directory,
purge => true,
recurse => true,
}
}