mirror of https://github.com/zulip/zulip.git
puppet: Disable apparmor profile for msmtp.
As the nagios user, we want to read the msmtp configuration from ~nagios, which apparmor's profile does not allow msmtp to do.
This commit is contained in:
parent
3c95ad82c6
commit
1e80b844f4
|
@ -140,6 +140,17 @@ class zulip_ops::profile::nagios {
|
||||||
require => File['/var/lib/nagios'],
|
require => File['/var/lib/nagios'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Disable apparmor for msmtp so it can read the above config file
|
||||||
|
file { '/etc/apparmor.d/disable/usr.bin.msmtp':
|
||||||
|
ensure => link,
|
||||||
|
target => '/etc/apparmor.d/usr.bin.msmtp',
|
||||||
|
notify => Exec['reload apparmor'],
|
||||||
|
}
|
||||||
|
exec {'reload apparmor':
|
||||||
|
command => '/sbin/apparmor_parser -R /etc/apparmor.d/usr.bin.msmtp',
|
||||||
|
refreshonly => true,
|
||||||
|
}
|
||||||
|
|
||||||
exec { 'fix_nagios_permissions':
|
exec { 'fix_nagios_permissions':
|
||||||
command => 'dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios4/rw',
|
command => 'dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios4/rw',
|
||||||
unless => 'bash -c "ls -ld /var/lib/nagios4/rw | grep ^drwx--s--- -q"',
|
unless => 'bash -c "ls -ld /var/lib/nagios4/rw | grep ^drwx--s--- -q"',
|
||||||
|
|
Loading…
Reference in New Issue