bundle to create vimabdmi-sql.conf, set cfg dir to 700

This commit is contained in:
Tobias Herre 2023-10-11 23:58:45 +02:00
parent 07723fa44a
commit 3270974a5f
1 changed files with 25 additions and 5 deletions

View File

@ -32,10 +32,6 @@ vars:
};
methods:
"any" usebundle => wmde_install_packages(@(pkgs),"dovecot");
"any" usebundle => wmde_service("$(service_name)","dovecot_kept","dovecot_repaired"),
@ -48,11 +44,18 @@ methods:
services:
files:
"$(cfg_dir)/."
create => "true",
perms => mog("755","root","root"),
depends_on => {"dovecot_pkgs_installed"},
handle => "dovecot_cfg_dir_created";
"$(dovecot_conf)"
classes => if_repaired(dovecot_repaired),
create => "true",
perms => mog("644","root","root"),
template_method => "mustache",
depends_on => {"dovecot_pkgs_installed"},
depends_on => {"dovecot_pkgs_installed","dovecot_cfg_dir_created"},
handle => "dovecot_cfg_created",
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/dovecot/dovecot.conf.mustache";
@ -81,3 +84,20 @@ reports:
"DOVECOT repaired";
}
bundle agent dovecot_vimbadmin_sql(cfg)
{
vars:
"cfg_file" string => "$(sys.workdir)/data/agent/dovecot/vimbadmin-sql.comf";
files:
"$(cfg_file)"
classes => if_repaired(dovecot_repaired),
create => "true",
template_method => "mustache",
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/dovecot/vimbadmin-sql.conf.mustache";
}