IcingaService: Do not attach config to custom variables for apply for rule

This commit is contained in:
raviks789 2025-05-16 15:15:17 +02:00
parent dfd9764e12
commit d34f2bf7c4
No known key found for this signature in database

View File

@ -343,24 +343,6 @@ class IcingaService extends IcingaObject implements ExportInterface
}
}
/**
* @return string
*/
protected function renderCustomVars()
{
$vars = '';
if (
$this->isApplyRule()
&& !$this->hasBeenAssignedToHostTemplate()
&& $this->get('apply_for') !== null
&& $this->isApplyRuleforDictionary(substr($this->get('apply_for'), strlen('host.vars.')))
) {
$vars .= "\n vars += config\n";
}
return $vars . parent::renderCustomVars();
}
/**
* @return string
*/