Compare commits

...

3 Commits

Author SHA1 Message Date
Tobias Herre a94320cdcc Install instructions 2023-10-04 08:52:14 +02:00
Tobias Herre c601e04efe changed data directory 2023-10-04 08:52:01 +02:00
Tobias Herre 2c8d72430f renamed mfdomain to wmde_libdir 2023-10-02 08:09:38 +02:00
4 changed files with 28 additions and 5 deletions

View File

@ -1,2 +1,25 @@
# wmdeit-cf-files # wmdeit-cf-files
INSTALL
Assuming your CFEngine installation resists under /var/cfengine run
the following commands:
cd /var/cfengine/masterfiles
git clone https://srcsrv.wikimedia.de/WMDE/wmdeit-cf-wmdelib.git wmdelib
Edit the file /var/cfengine/masterfiles/def.json and the the lines
seen below to the inputs ands wars section:
{
"inputs": [
...
"$(wmde\_libdir)/lib.cf",
"$(wmde\_libdir)/vim.cf",
"$(wmde\_libdir)/postfix.cf"
],
"vars":{
...
"wmde\_libdir": "wmdelib"
}
}

View File

@ -173,7 +173,7 @@ files:
"$(apache.main_cfg)" "$(apache.main_cfg)"
create => "true", create => "true",
edit_template => "$(sys.workdir)/inputs/$(def.mfdomain)/templates/httpd.conf.mustache", edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd.conf.mustache",
template_method => "mustache", template_method => "mustache",
handle => "apache_main_cfg_crreated", handle => "apache_main_cfg_crreated",
classes => if_repaired(apache_changed); classes => if_repaired(apache_changed);
@ -222,7 +222,7 @@ vars:
"template_file" "template_file"
string => string =>
"$(sys.workdir)/inputs/$(def.mfdomain)/templates/httpd-vhost.conf.mustache"; "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd-vhost.conf.mustache";
"domain_file" string => "$(apache.cfg_dir)/Vhosts/$(site[domain]).conf"; "domain_file" string => "$(apache.cfg_dir)/Vhosts/$(site[domain]).conf";
"domain_dir" string => "$(apache.www_dir)/$(site[domain])/"; "domain_dir" string => "$(apache.www_dir)/$(site[domain])/";

View File

@ -44,7 +44,7 @@ files:
freebsd:: freebsd::
"/etc/cron.d/certbot" "/etc/cron.d/certbot"
create => "true", create => "true",
copy_from => local_cp("$(sys.workdir)/inputs/$(def.mfdomain)/templates/certbot-cron.mustache"); copy_from => local_cp("$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/certbot-cron.mustache");
# content => '# # content => '#
# Managed by CFEngine # Managed by CFEngine
@ -75,7 +75,7 @@ vars:
"--webroot -w $(webroot)"); "--webroot -w $(webroot)");
files: files:
"$(sys.workdir)/data/certbot/$(site[domain])-cert-created" "$(sys.workdir)/data/agent/certbot/$(site[domain])-cert-created"
create => "true", create => "true",
content => "$(args)", content => "$(args)",
classes => if_repaired(certbot_repaired); classes => if_repaired(certbot_repaired);

2
vim.cf
View File

@ -37,7 +37,7 @@ packages:
files: files:
"$(vimrc)" "$(vimrc)"
create => "true", create => "true",
copy_from => local_dcp("$(sys.workdir)/inputs/$(def.mfdomain)/templates/vimrc.mustache"); copy_from => local_dcp("$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/vimrc.mustache");
reports: reports: