Use && in between the shell commands in the exects so that if any of the commands inside fail, the entire exec resource will fail.

With ; in between each shell command, the command chain would continue on even if one of the commands returned a non-0 exit status. Because this would make Puppet think the entire exec resource succeeded, Puppet would continue on configuring the rest of the resources in icinga2::server and all of its subclasses. With && in between each subcommand, the execs will fail if any of the subcommands fail and Puppet will skip the rest of the module's resources, not leaving things in a bad state.