bundlewrap/bundles/icinga2/items.py

38 lines
873 B
Python

assert node.has_bundle('postgresql')
assert node.has_bundle('sshmon')
from os.path import join
directories = {
'/etc/icingaweb2': {
'group': 'icingaweb2',
'mode': '0775',
'needs': {
'pkg_apt:icingaweb2',
},
},
}
files = {
'/usr/local/share/icinga/plugins/check_rbl': {
'mode': '0755',
},
'/usr/local/share/icinga/plugins/check_by_sshmon': {
'mode': '0755',
},
'/etc/sshmon.priv': {
'content': repo.vault.decrypt_file(join('sshmon', 'sshmon.key.vault')),
'owner': 'nagios',
'group': 'nagios',
'mode': '0400',
'needs': {
'pkg_apt:icinga2-ido-pgsql',
},
},
'/etc/icingaweb2/setup.token': {
'content': node.metadata['icingaweb2']['setup-token'],
'mode': '0660',
'group': 'icingaweb2',
},
}