Skip to content

Instantly share code, notes, and snippets.

@Freeaqingme
Created June 23, 2013 18:03
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 Freeaqingme/5845927 to your computer and use it in GitHub Desktop.
Save Freeaqingme/5845927 to your computer and use it in GitHub Desktop.
class cluster::internal-services::role::icinga (
) {
class { '::icinga':
puppi => true,
enable_idoutils => true,
enable_icingaweb => true,
enable_debian_repo_legacy => false,
manage_repos => true,
template_settings_templates => 'cluster/internal-services/role/icinga/icinga/settings/templates.cfg.erb'
}
user { 'icingagui':
name => 'icingagui',
system => false, # Mod_Ruid doesn't like system users
groups => [ 'nagios' ],
managehome => false,
shell => '/bin/false',
comment => 'Managed by Puppet',
}
file { [ '/usr/share/icinga/htdocs',
'/usr/lib/cgi-bin/icinga',
'/etc/icinga/stylesheets',
'/usr/share/icinga-web',
'/var/cache/icinga-web',
'/var/log/icinga-web' ]:
owner => 'icingagui',
group => 'icingagui',
recurse => true,
backup => false,
require => User[ 'icingagui' ],
notify => Service[ 'apache' ]
}
file { '/var/cache/icinga':
owner => 'icingagui',
group => 'www-data',
recurse => true,
backup => false,
require => User[ 'icingagui' ],
notify => Service[ 'apache' ]
}
file { [ '/var/cache/nagios3',
'/var/lib/icinga/rw/icinga.cmd' ]:
owner => 'nagios',
group => 'icingagui',
recurse => true,
backup => false,
require => User[ 'icingagui' ],
notify => Service[ 'apache' ]
}
File <| title == '/var/lib/icinga/rw' |> {
owner => 'nagios',
group => 'icingagui',
recurse => false,
backup => false,
require => User[ 'icingagui' ],
notify => Service[ 'apache' ]
}
realize( File['/var/lib/icinga/rw'] )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment