- print_block files['services'], 'service', s, %w(nrpe runfrom remotecheck
- depends
- hosts hostgroups excludehosts excludehostgroups)
+ exclude_keys = %w(nrpe runfrom remotecheck
+ depends
+ hosts hostgroups excludehosts excludehostgroups)
+ if servers[host]['no-servicegroups']
+ exclude_keys << 'servicegroups'
+ end
+ print_block files['services'], 'service', s, exclude_keys