From 21c86b0e971b54dd4316983e1aea7234960ee7ad Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 23 Jun 2023 08:12:05 +0200 Subject: [PATCH] ansible template --- seed/apache/dictionaries/20_web.xml | 6 +- seed/apache/templates/risotto.conf | 12 +- seed/apache/templates/ssl.conf | 6 +- .../dictionaries/00_debian-bullseye.xml | 2 +- .../templates/local.negative | 4 +- .../dictionaries/11_debian-base.xml | 2 +- .../dictionaries/17_debian-base.xml | 2 +- .../templates/update-ca-certificates.service | 2 +- seed/base-fedora-38/applicationservice.yml | 6 + .../dictionaries/11_fedora-version.xml | 13 + .../image/postinstall/base_fedora_version.sh | 7 + .../manual/image/preinstall/base_fedora_38.sh | 1 + .../image/preinstall/base_fedora_version.sh | 1 + seed/base-fedora-38/templates/login | 17 + .../dictionaries/11_fedora-base.xml | 1 + .../dictionaries/17_fedora-base.xml | 2 +- seed/base-machine/dictionaries/12_base.xml | 5 + seed/base-machine/funcs/funcs.py | 4 + seed/base/dictionaries/00_base.xml | 1 + seed/base/funcs/base.py | 11 +- seed/dns-local/dictionaries/13_dns-local.xml | 4 +- seed/dns-local/templates/dns-local.yml | 45 +- seed/dovecot/dictionaries/26_dovecot.xml | 41 +- seed/dovecot/templates/10-master.conf | 2 +- seed/dovecot/templates/10-ssl.conf | 22 +- seed/dovecot/templates/12-managesieve.conf | 23 - seed/dovecot/templates/config-v1.1.xml | 20 +- seed/dovecot/templates/dovecot-ldap.conf.ext | 14 +- .../dovecot/templates/dovecot-oauth2.conf.ext | 10 +- seed/dovecot/templates/external_imap.crt | 2 - seed/dovecot/templates/external_imap.key | 1 - seed/dovecot/templates/imap.yml | 22 +- seed/dovecot/templates/ldapsource.cf | 16 +- seed/dovecot/templates/main.cf | 26 +- seed/dovecot/templates/postfix_sni.pem | 3 - seed/dovecot/templates/relay_passwd | 2 +- seed/dovecot/templates/risotto_backup | 6 +- seed/dovecot/templates/sni | 8 +- seed/forgejo/applicationservice.yml | 2 +- seed/forgejo/dictionaries/31_forgejo.xml | 6 +- seed/forgejo/templates/app.ini | 49 +- seed/forgejo/templates/forgejo.service | 22 +- seed/forgejo/templates/forgejo.yml | 22 +- seed/grafana/DEBUG.md | 2 + seed/grafana/applicationservice.yml | 9 + seed/grafana/dictionaries/31_grafana.xml | 67 + .../manual/image/postinstall/grafana.sh | 11 + .../manual/image/preinstall/grafana.sh | 1 + seed/grafana/templates/grafana-server | 30 + seed/grafana/templates/grafana-server.service | 5 + seed/grafana/templates/grafana.ini | 1262 +++++++++++++++++ seed/grafana/templates/tmpfile-grafana.conf | 2 + .../dictionaries/21_machined.xml | 54 +- .../extras/machined/00_machined.xml | 15 +- seed/host-systemd-machined/funcs/machined.py | 13 + .../templates/70-container.netdev | 2 +- .../templates/70-container.network | 4 +- .../templates/90-risotto.conf | 2 +- .../templates/RPM-GPG-KEY-fedora-38-x86_64 | 29 + .../templates/dhcp.network | 24 +- .../templates/directory-script | 16 + .../templates/network-script | 32 +- seed/host-systemd-machined/templates/nspawn | 49 +- .../templates/risotto-images.service | 4 +- .../templates/risottofirewall.service | 80 +- .../templates/systemd-nspawn@.conf | 1 + .../templates/tls-script | 56 +- .../templates/vector.toml | 69 + seed/journald/applicationservice.yml | 3 + seed/journald/dictionaries/20_journald.xml | 26 + .../manual/image/preinstall/journald.sh | 1 + seed/journald/templates/journal-upload.conf | 25 + .../templates/systemd-journal-upload.service | 2 + seed/journald_remote/applicationservice.yml | 3 + .../dictionaries/21_journald.xml | 11 + .../extras/accounts/00_accounts.xml | 21 + seed/journald_remote/funcs/journald_remote.py | 20 + .../manual/image/preinstall/journald.sh | 1 + .../templates/journal-remote.conf | 26 + .../templates/systemd-journal-remote.service | 3 + .../dictionaries/21_ldap-client.xml | 26 +- seed/ldap-client/funcs/openldap_client.py | 24 +- .../ldap-client/templates/ldap-client.service | 2 +- seed/ldap-client/templates/ldap.conf | 14 +- seed/lemonldap/DEBUG.md | 4 + .../dictionaries/70_lemonldap_ng.xml | 19 +- seed/lemonldap/extras/oauth2/00_oauth2.xml | 1 + seed/lemonldap/templates/handler-nginx.conf | 10 +- .../lemonldap/templates/interne_well_known.pl | 6 +- .../templates/lemonldap-ng-fastcgi-server | 2 +- seed/lemonldap/templates/lemonldap.yml | 6 +- seed/lemonldap/templates/lmConf-1.json | 168 ++- seed/lemonldap/templates/portal-nginx.conf | 30 +- seed/lemonldap/templates/wget.pl | 4 +- seed/loki/applicationservice.yml | 5 + seed/loki/dictionaries/20_loki.xml | 16 + seed/loki/manual/image/postinstall/loki.sh | 17 + seed/loki/templates/loki-local-config.yaml | 55 + seed/loki/templates/loki.service | 14 + seed/loki/templates/sysuser-loki.conf | 2 + seed/loki/templates/tmpfile-loki.conf | 1 + seed/mailman/dictionaries/31_mailman.xml | 18 +- seed/mailman/templates/config-nginx.conf | 18 +- seed/mailman/templates/gunicorn_config.py | 221 --- seed/mailman/templates/mailman-web.py | 38 +- seed/mailman/templates/mailman.cfg | 14 +- seed/mailman/templates/mailman.yml | 24 +- seed/mailman/templates/mailman3-web.service | 6 +- seed/mailman/templates/mailman3.service | 13 +- seed/mailman/templates/postorius.service | 6 +- .../dictionaries/20_mariadb.xml | 23 +- .../templates/mariadbclient.service | 2 +- seed/mariadb/dictionaries/20_mariadb.xml | 10 +- seed/mariadb/extras/accounts/00_accounts.xml | 2 + seed/mariadb/templates/mariadb.service | 2 +- seed/mariadb/templates/mariadb.sql | 24 +- seed/mariadb/templates/mariadb.yml | 4 +- seed/mariadb/templates/risotto_backup | 7 +- seed/nextcloud/dictionaries/31_nextcloud.xml | 12 +- seed/nextcloud/templates/nextcloud-config.php | 61 +- seed/nextcloud/templates/nextcloud.init | 24 +- seed/nginx-common/dictionaries/21_nginx.xml | 12 +- seed/nginx-common/templates/default | 30 +- .../nginx-common/templates/default-nginx.conf | 2 +- seed/nginx-common/templates/nginx-common.yml | 18 +- .../nginx-common/templates/nginx-options.conf | 25 +- seed/nginx-common/templates/nginx.conf.Fedora | 30 +- .../templates/tmpfiles.nginx.conf | 2 +- seed/nginx-https/templates/nginx.key | 1 - .../dictionaries/25_nginx.xml | 12 +- .../patches/revprox-nginx.conf.patch | 14 + .../templates/ca_External.crt | 1 - seed/nginx-reverse-proxy/templates/nginx.key | 1 - .../templates/nginx.service | 30 +- .../templates/reverse-proxy.yml | 22 +- .../templates/revprox-nginx.conf | 120 +- .../dictionaries/22_nginx_static.xml | 4 +- .../templates/tmpfiles.nginx_static.conf | 2 +- seed/nsd-local/applicationservice.yml | 6 + seed/nsd-local/dictionaries/21_nsd-local.xml | 33 + seed/nsd-local/extras/nsd/01_nsd-local.xml | 25 + seed/nsd/dictionaries/20_nsd.xml | 61 +- seed/nsd/extras/nsd/00_nsd.xml | 21 +- seed/nsd/funcs/funcs.py | 61 +- seed/nsd/templates/nsd.reverse | 44 +- seed/nsd/templates/nsd.signed | 4 +- seed/nsd/templates/nsd.yml | 22 +- seed/nsd/templates/nsd.zone | 30 +- seed/nsd/templates/risotto.conf | 31 +- .../dictionaries/30_oauth2_client.xml | 6 +- .../templates/oauth2-client.service | 2 +- seed/odoo/DEBUG.md | 4 +- seed/odoo/dictionaries/40_odoo.xml | 14 +- seed/odoo/templates/config-nginx.conf | 6 +- seed/odoo/templates/config_odoo.py | 64 +- seed/odoo/templates/hosts | 2 +- seed/odoo/templates/odoo.conf | 10 +- seed/odoo/templates/odoo.service | 10 +- seed/openldap/applicationservice.yml | 2 +- .../dictionaries/21_openldap-server.xml | 171 ++- seed/openldap/funcs/ldap.py | 50 + seed/openldap/templates/DB_CONFIG | 23 +- seed/openldap/templates/admin_ldap.pwd | 2 +- seed/openldap/templates/config.ldif | 20 +- seed/openldap/templates/config_acl.ldif | 90 +- seed/openldap/templates/ldap.conf | 44 + seed/openldap/templates/openldap.yml | 94 +- seed/openldap/templates/replication.conf | 1 - seed/openldap/templates/slapd.service | 12 +- .../templates/tmpfile-openldap-server.conf | 2 +- seed/openldap/templates/users.ldif | 178 +-- seed/openldap/templates/users_mod.ldif | 108 +- seed/peertube/dictionaries/30_peertube.xml | 10 +- seed/peertube/templates/nginx.peertube.conf | 12 +- .../templates/nginx.peertube.conf.d.conf | 2 +- seed/peertube/templates/peertube.service | 6 +- seed/peertube/templates/production.yaml | 33 +- seed/php-fpm/dictionaries/20_phpfpm.xml | 4 +- seed/php-fpm/templates/tmpfile-phpfpm.conf | 2 +- seed/php-fpm/templates/www.conf | 20 +- seed/php/DEBUG.md | 2 + seed/php/dictionaries/20_php.xml | 2 +- seed/php/templates/php.ini | 44 +- seed/piwigo/dictionaries/31_piwigo.xml | 32 +- seed/piwigo/templates/config.inc.php | 20 +- seed/piwigo/templates/database.inc.php | 22 +- seed/piwigo/templates/piwigo.nginx.conf | 16 +- seed/piwigo/templates/piwigo.sh | 22 +- seed/piwigo/templates/tmpfile-piwigo.conf | 10 +- seed/pki-tls/dictionaries/20_tls.xml | 2 +- seed/pki-tls/templates/0certificate.conf | 77 +- .../postfix-relay/dictionaries/30_postfix.xml | 36 +- .../templates/12-managesieve.conf | 23 - seed/postfix-relay/templates/KeyTable | 6 +- seed/postfix-relay/templates/SigningTable | 6 +- seed/postfix-relay/templates/TrustedHosts | 6 +- seed/postfix-relay/templates/lmtp | 18 +- seed/postfix-relay/templates/main.cf | 24 +- seed/postfix-relay/templates/opendkim.key | 2 +- seed/postfix-relay/templates/opendmarc.conf | 2 +- seed/postfix-relay/templates/postfix.service | 12 +- seed/postfix-relay/templates/sni | 8 +- seed/postfix-relay/templates/sni.pem | 4 - .../dictionaries/23_postgresql.xml | 14 +- .../templates/postgresql.pass | 2 +- .../templates/postgresql.pass2 | 2 +- .../templates/postgresqlclient.service | 12 +- .../postgresql/dictionaries/22_postgresql.xml | 11 +- .../extras/accounts/00_accounts.xml | 3 +- seed/postgresql/templates/config.yml | 0 seed/postgresql/templates/pg_hba.conf | 14 +- seed/postgresql/templates/postgresql.conf | 32 +- seed/postgresql/templates/postgresql.service | 48 +- seed/postgresql/templates/postgresql.sql | 28 +- seed/postgresql/templates/postgresql.yml | 4 +- seed/postgresql/templates/risotto_backup | 12 + seed/prometheus/DEBUG.md | 3 + seed/prometheus/applicationservice.yml | 6 + .../prometheus/dictionaries/20_prometheus.xml | 26 + .../manual/image/preinstall/prometheus.sh | 2 + seed/prometheus/templates/prometheus | 5 + seed/prometheus/templates/prometheus.service | 7 + seed/prometheus/templates/prometheus.yml | 37 + .../templates/sysuser-prometheus.conf | 2 + .../templates/tmpfile-prometheus.conf | 1 + .../dictionaries/16_machined.xml | 16 +- .../templates/no_risotto_backup | 1 + .../dictionaries/20_smtp_client.xml | 18 +- seed/relay-mail-client/funcs/relay_mail.py | 12 + .../dictionaries/21_revprox_client.xml | 2 +- .../templates/reverse-proxy.yml | 2 +- seed/roundcube/dictionaries/31_roundcube.xml | 10 +- seed/roundcube/funcs/roundcube.py | 1 - seed/roundcube/templates/config.inc.php | 41 +- seed/roundcube/templates/domain.inc.php | 18 +- seed/roundcube/templates/roundcube.service | 2 +- seed/roundcube/templates/roundcubemail.conf | 4 +- .../dictionaries/40_speedtest-rs.xml | 4 +- seed/speedtest-rs/templates/config.env | 6 +- seed/systemd/applicationservice.yml | 1 + seed/systemd/dictionaries/15_systemd.xml | 81 +- seed/systemd/templates/30-swap.conf | 4 +- seed/systemd/templates/40-tmp.conf | 4 +- seed/systemd/templates/50-var.conf | 4 +- seed/systemd/templates/60-srv.conf | 4 +- seed/systemd/templates/include.mount | 6 +- seed/systemd/templates/link | 6 +- seed/systemd/templates/network | 33 +- seed/systemd/templates/root.pwd | 2 +- seed/systemd/templates/srv.mount | 6 +- .../templates/systemd-firstboot.service | 2 +- ...efs@dev-disk-by\\x2dpartlabel-srv.service" | 8 +- ...fs@dev-disk-by\\x2dpartlabel-swap.service" | 9 +- ...dev-disk-by\\x2dpartlabel-var-tmp.service" | 8 +- ...efs@dev-disk-by\\x2dpartlabel-var.service" | 8 +- ...emd-makefs@dev-disk-byx2dpartlabel.service | 14 +- seed/systemd/templates/var-tmp.mount | 6 +- seed/systemd/templates/var.mount | 6 +- seed/tls/applicationservice.yml | 2 +- seed/tls/dictionaries/26_tls.xml | 6 +- seed/tls/manual/image/postinstall/autosign.py | 22 +- seed/tls/templates/certificates.yml | 29 +- seed/tls/templates/configuration.yml | 6 +- seed/unbound/dictionaries/20_unbound.xml | 8 +- seed/unbound/templates/risotto.conf | 36 +- seed/unbound/templates/unbound.conf | 10 +- .../dictionaries/40_vaultwarden.xml | 6 +- seed/vaultwarden/templates/vaultwarden.yml | 16 +- .../templates/vaultwarden_config.env | 24 +- seed/vector/DEBUG.md | 1 + seed/vector/applicationservice.yml | 6 + seed/vector/dictionaries/20_vector.xml | 28 + .../vector/manual/image/postinstall/vector.sh | 16 + seed/vector/manual/image/preinstall/vector.sh | 1 + seed/vector/templates/sysuser-vector.conf | 4 + seed/vector/templates/tmpfile-vector.conf | 1 + seed/vector/templates/vector.toml | 112 ++ seed/vector/templates/vector_journalctl | 3 + seed/znc/dictionaries/40_znc.xml | 8 +- seed/znc/templates/znc.conf | 33 +- seed/znc/templates/znc_passwords | 6 +- 281 files changed, 4341 insertions(+), 2136 deletions(-) create mode 100644 seed/base-fedora-38/applicationservice.yml create mode 100644 seed/base-fedora-38/dictionaries/11_fedora-version.xml create mode 100644 seed/base-fedora-38/manual/image/postinstall/base_fedora_version.sh create mode 100644 seed/base-fedora-38/manual/image/preinstall/base_fedora_38.sh create mode 100644 seed/base-fedora-38/manual/image/preinstall/base_fedora_version.sh create mode 100644 seed/base-fedora-38/templates/login delete mode 100644 seed/dovecot/templates/12-managesieve.conf delete mode 100644 seed/dovecot/templates/external_imap.crt delete mode 100644 seed/dovecot/templates/external_imap.key delete mode 100644 seed/dovecot/templates/postfix_sni.pem create mode 100644 seed/grafana/DEBUG.md create mode 100644 seed/grafana/applicationservice.yml create mode 100644 seed/grafana/dictionaries/31_grafana.xml create mode 100644 seed/grafana/manual/image/postinstall/grafana.sh create mode 100644 seed/grafana/manual/image/preinstall/grafana.sh create mode 100644 seed/grafana/templates/grafana-server create mode 100644 seed/grafana/templates/grafana-server.service create mode 100644 seed/grafana/templates/grafana.ini create mode 100644 seed/grafana/templates/tmpfile-grafana.conf create mode 100644 seed/host-systemd-machined/templates/RPM-GPG-KEY-fedora-38-x86_64 create mode 100644 seed/host-systemd-machined/templates/directory-script create mode 100644 seed/host-systemd-machined/templates/vector.toml create mode 100644 seed/journald/applicationservice.yml create mode 100644 seed/journald/dictionaries/20_journald.xml create mode 100644 seed/journald/manual/image/preinstall/journald.sh create mode 100644 seed/journald/templates/journal-upload.conf create mode 100644 seed/journald/templates/systemd-journal-upload.service create mode 100644 seed/journald_remote/applicationservice.yml create mode 100644 seed/journald_remote/dictionaries/21_journald.xml create mode 100644 seed/journald_remote/extras/accounts/00_accounts.xml create mode 100644 seed/journald_remote/funcs/journald_remote.py create mode 100644 seed/journald_remote/manual/image/preinstall/journald.sh create mode 100644 seed/journald_remote/templates/journal-remote.conf create mode 100644 seed/journald_remote/templates/systemd-journal-remote.service create mode 100644 seed/loki/applicationservice.yml create mode 100644 seed/loki/dictionaries/20_loki.xml create mode 100644 seed/loki/manual/image/postinstall/loki.sh create mode 100644 seed/loki/templates/loki-local-config.yaml create mode 100644 seed/loki/templates/loki.service create mode 100644 seed/loki/templates/sysuser-loki.conf create mode 100644 seed/loki/templates/tmpfile-loki.conf delete mode 100644 seed/mailman/templates/gunicorn_config.py delete mode 100644 seed/nginx-https/templates/nginx.key create mode 100644 seed/nginx-reverse-proxy/patches/revprox-nginx.conf.patch delete mode 100644 seed/nginx-reverse-proxy/templates/ca_External.crt delete mode 100644 seed/nginx-reverse-proxy/templates/nginx.key create mode 100644 seed/nsd-local/applicationservice.yml create mode 100644 seed/nsd-local/dictionaries/21_nsd-local.xml create mode 100644 seed/nsd-local/extras/nsd/01_nsd-local.xml create mode 100644 seed/openldap/templates/ldap.conf delete mode 100644 seed/openldap/templates/replication.conf delete mode 100644 seed/postfix-relay/templates/12-managesieve.conf delete mode 100644 seed/postfix-relay/templates/sni.pem delete mode 100644 seed/postgresql/templates/config.yml create mode 100644 seed/postgresql/templates/risotto_backup create mode 100644 seed/prometheus/DEBUG.md create mode 100644 seed/prometheus/applicationservice.yml create mode 100644 seed/prometheus/dictionaries/20_prometheus.xml create mode 100644 seed/prometheus/manual/image/preinstall/prometheus.sh create mode 100644 seed/prometheus/templates/prometheus create mode 100644 seed/prometheus/templates/prometheus.service create mode 100644 seed/prometheus/templates/prometheus.yml create mode 100644 seed/prometheus/templates/sysuser-prometheus.conf create mode 100644 seed/prometheus/templates/tmpfile-prometheus.conf create mode 100644 seed/provider-systemd-machined/templates/no_risotto_backup create mode 100644 seed/relay-mail-client/funcs/relay_mail.py create mode 100644 seed/vector/DEBUG.md create mode 100644 seed/vector/applicationservice.yml create mode 100644 seed/vector/dictionaries/20_vector.xml create mode 100644 seed/vector/manual/image/postinstall/vector.sh create mode 100644 seed/vector/manual/image/preinstall/vector.sh create mode 100644 seed/vector/templates/sysuser-vector.conf create mode 100644 seed/vector/templates/tmpfile-vector.conf create mode 100644 seed/vector/templates/vector.toml create mode 100644 seed/vector/templates/vector_journalctl diff --git a/seed/apache/dictionaries/20_web.xml b/seed/apache/dictionaries/20_web.xml index afd56df..f995d8b 100644 --- a/seed/apache/dictionaries/20_web.xml +++ b/seed/apache/dictionaries/20_web.xml @@ -2,9 +2,9 @@ - /etc/httpd/conf/httpd.conf - /etc/httpd/conf.d/risotto.conf - /etc/httpd/conf.d/ssl.conf + /etc/httpd/conf/httpd.conf + /etc/httpd/conf.d/risotto.conf + /etc/httpd/conf.d/ssl.conf /sysusers.d/httpd.conf /tmpfiles.d/0httpd.conf diff --git a/seed/apache/templates/risotto.conf b/seed/apache/templates/risotto.conf index 3ee7beb..d1aba91 100644 --- a/seed/apache/templates/risotto.conf +++ b/seed/apache/templates/risotto.conf @@ -1,15 +1,15 @@ # Timeout -Timeout %%apache_timeout +Timeout {{ general.apache.apache_timeout }} # Keepalive -%if %%apache_keepalive +{% if general.apache.apache_keepalive %} KeepAlive On -%else +{% else %} KeepAlive Off -%end if +{% endif %} MaxKeepAliveRequests 50 -KeepAliveTimeout %%apache_timeout +KeepAliveTimeout {{ general.apache.apache_timeout }} # RemoteIp RemoteIPHeader X-Forwarded-For -RemoteIPInternalProxy %%revprox_client_server_ip +RemoteIPInternalProxy {{ general.revprox.revprox_client_server_ip }} diff --git a/seed/apache/templates/ssl.conf b/seed/apache/templates/ssl.conf index d2ee87c..3d825ee 100644 --- a/seed/apache/templates/ssl.conf +++ b/seed/apache/templates/ssl.conf @@ -100,7 +100,7 @@ SSLProxyCipherSuite PROFILE=SYSTEM # require an ECC certificate which can also be configured in # parallel. # GNUNUX SSLCertificateFile /etc/pki/tls/certs/localhost.crt -SSLCertificateFile %%tls_cert_directory/revprox.crt +SSLCertificateFile {{ general.tls_cert_directory }}/revprox.crt # Server Private Key: # If the key is not combined with the certificate, use this @@ -109,7 +109,7 @@ SSLCertificateFile %%tls_cert_directory/revprox.crt # both in parallel (to also allow the use of DSA ciphers, etc.) # ECC keys, when in use, can also be configured in parallel # GNUNUX SSLCertificateKeyFile /etc/pki/tls/private/localhost.key -SSLCertificateKeyFile %%tls_key_directory/revprox.key +SSLCertificateKeyFile {{ general.tls_key_directory }}/revprox.key # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the @@ -126,7 +126,7 @@ SSLCertificateKeyFile %%tls_key_directory/revprox.key # huge file containing all of them (file must be PEM encoded) #SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt #>GNUNUX -SSLCACertificateFile %%tls_ca_directory/InternalReverseProxy.crt +SSLCACertificateFile {{ general.tls_ca_directory }}/InternalReverseProxy.crt # - /etc/dnssec-trust-anchors.d/local.negative + /etc/dnssec-trust-anchors.d/local.negative diff --git a/seed/base-debian-bullseye/templates/local.negative b/seed/base-debian-bullseye/templates/local.negative index f571c67..5057710 100644 --- a/seed/base-debian-bullseye/templates/local.negative +++ b/seed/base-debian-bullseye/templates/local.negative @@ -1,2 +1,2 @@ -%set %%domain=%%domain_name_eth0.split('.', 1)[1] -%%domain +{% set domain = domain_name_eth0.split('.', 1)[1] %} +{{ domain }} diff --git a/seed/base-debian/dictionaries/11_debian-base.xml b/seed/base-debian/dictionaries/11_debian-base.xml index 90a8ecf..d664df6 100644 --- a/seed/base-debian/dictionaries/11_debian-base.xml +++ b/seed/base-debian/dictionaries/11_debian-base.xml @@ -2,7 +2,7 @@ - + diff --git a/seed/base-debian/dictionaries/17_debian-base.xml b/seed/base-debian/dictionaries/17_debian-base.xml index d3a0e36..b1754b8 100644 --- a/seed/base-debian/dictionaries/17_debian-base.xml +++ b/seed/base-debian/dictionaries/17_debian-base.xml @@ -1,7 +1,7 @@ - + + - + all diff --git a/seed/dovecot/templates/10-master.conf b/seed/dovecot/templates/10-master.conf index 848ecf3..178041a 100644 --- a/seed/dovecot/templates/10-master.conf +++ b/seed/dovecot/templates/10-master.conf @@ -73,7 +73,7 @@ service lmtp { #} #>GNUNUX inet_listener lmtp { - address = %%ip_eth0 + address = {{ general.smtp.smtp_client_ip }} port = 8024 } #GNUNUX -ssl_cert = - service_count = 1 - - # Number of processes to always keep waiting for more connections. - process_min_avail = 0 - - # If you set service_count=0, you probably need to grow this. - vsz_limit = 64M -} diff --git a/seed/dovecot/templates/config-v1.1.xml b/seed/dovecot/templates/config-v1.1.xml index 305ee0e..f45092d 100644 --- a/seed/dovecot/templates/config-v1.1.xml +++ b/seed/dovecot/templates/config-v1.1.xml @@ -1,23 +1,23 @@ # GNUNUX: from https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat --> -%set %%domain = %%rougail_variable -%set %%leader = %%mail_domains[%%mail_domains.index(%%domain)] -%set %%imap_domain = %%leader.imap_domainname -%set %%submission_domain = %%leader.submission_domainname +{%set domain = rougail_variable %} +{%set leader = general.mail.domain.mail_domains[mail_domains.index(domain)] %} +{%set imap_domain = leader.imap_domainname %} +{%set submission_domain = leader.submission_domainname %} - - %%domain - Services %%domain - %%domain + + {{ domain }} + Services {{ domain }} + {{ domain }} - %%imap_domain + {{ imap_domain }} 993 SSL %EMAILADDRESS% password-cleartext - %%submission_domain + {{ submission_domain }} 587 STARTTLS %EMAILADDRESS% diff --git a/seed/dovecot/templates/dovecot-ldap.conf.ext b/seed/dovecot/templates/dovecot-ldap.conf.ext index 0d497c9..c6c2589 100644 --- a/seed/dovecot/templates/dovecot-ldap.conf.ext +++ b/seed/dovecot/templates/dovecot-ldap.conf.ext @@ -24,7 +24,7 @@ # setting isn't supported by all LDAP libraries. #uris = #>GNUNUX -uris = ldaps://%%ldap_server_address +uris = ldaps://{{ general.ldap.server.ldap_server_address }} #GNUNUX -dn = %%ldapclient_user -dnpass = %%ldapclient_user_password +dn = {{ general.ldap.client.ldapclient_user }} +dnpass = {{ general.ldap.client.ldapclient_user_password }} #GNUNUX -tls_cert_file = %%tls_cert_directory/ldap_client.crt -tls_key_file = %%tls_key_directory/ldap_client.key -tls_ca_cert_file = %%tls_ca_directory/LDAP.crt +tls_cert_file = {{ general.tls_cert_directory }}/ldap_client.crt +tls_key_file = {{ general.tls_key_directory }}/ldap_client.key +tls_ca_cert_file = {{ general.tls_ca_directory }}/LDAP.crt tls_require_cert = hard #>GNUNUX @@ -107,7 +107,7 @@ auth_bind = yes # LDAP base. %variables can be used here. # For example: dc=mail, dc=example, dc=org # GNUNUX base = -base = %%ldapclient_search_dn +base = {{ general.ldap.client.ldapclient_search_dn }} # Dereference: never, searching, finding, always #deref = never diff --git a/seed/dovecot/templates/dovecot-oauth2.conf.ext b/seed/dovecot/templates/dovecot-oauth2.conf.ext index a445d53..5fcdd48 100644 --- a/seed/dovecot/templates/dovecot-oauth2.conf.ext +++ b/seed/dovecot/templates/dovecot-oauth2.conf.ext @@ -4,7 +4,7 @@ ## url for verifying token validity. Token is appended to the URL # tokeninfo_url = http://endpoint/oauth/tokeninfo?access_token= #>GNUNUX -tokeninfo_url = https://%%oauth2_client_server_domainname/oauth2/userinfo/?access_token= +tokeninfo_url = https://{{ general.oauth2_client.oauth2_client_server_domainname }}/oauth2/userinfo/?access_token= #GNUNUX -introspection_url = https://%%oauth2_client_server_domainname/oauth2/introspect/ +introspection_url = https://{{ general.oauth2_client.oauth2_client_server_domainname }}/oauth2/introspect/ introspection_mode = post force_introspection = no #GNUNUX -openid_configuration_url = https://%%oauth2_client_server_domainname/.well-known/openid-configuration +openid_configuration_url = https://{{ general.oauth2_client.oauth2_client_server_domainname }}/.well-known/openid-configuration #GNUNUX -client_id = %%oauth2_client_id -client_secret = %%oauth2_client_secret +client_id = {{ general.oauth2_client.oauth2_client_id }} +client_secret = {{ general.oauth2_client.oauth2_client_secret }} #GNUNUX -relayhost = %%smtp_relay_address +relayhost = {{ general.smtp.smtp_relay_address }} smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd smtp_sasl_security_options = noanonymous @@ -742,15 +742,15 @@ readme_directory = /usr/share/doc/postfix/README_FILES # in PEM format. Intermediate certificates should be included in general, # the server certificate first, then the issuing CA(s) (bottom-up order). # -smtpd_tls_cert_file = %%tls_cert_directory/postfix.crt +smtpd_tls_cert_file = {{ general.tls_cert_directory }}/postfix.crt # The full pathname of a file with the Postfix SMTP server RSA private key # in PEM format. The private key must be accessible without a pass-phrase, # i.e. it must not be encrypted. # -smtpd_tls_key_file = %%tls_key_directory/postfix.key +smtpd_tls_key_file = {{ general.tls_key_directory }}/postfix.key -smtpd_tls_CApath = %%tls_ca_directory +smtpd_tls_CApath = {{ general.tls_ca_directory }} #>GNUNUX tls_server_sni_maps = hash:/etc/postfix/sni # - + /sysusers.d/0forgejo.conf /tmpfiles.d/0forgejo.conf - /etc/forgejo/app.ini - /tests/forgejo.yml + /etc/forgejo/app.ini + /tests/forgejo.yml diff --git a/seed/forgejo/templates/app.ini b/seed/forgejo/templates/app.ini index acd9426..0cc7e43 100644 --- a/seed/forgejo/templates/app.ini +++ b/seed/forgejo/templates/app.ini @@ -1,7 +1,4 @@ #RISOTTO: https://codeberg.org/forgejo/forgejo/raw/branch/forgejo/custom/conf/app.example.ini -%compiler-settings -commentStartToken = ; -%end compiler-settings ; This file lists the default values used by Gitea ;; Copy required sections to your own app.ini (default is custom/conf/app.ini) ;; and modify as needed. @@ -50,7 +47,7 @@ commentStartToken = ; ;; App name that shows in every page title ;>GNUNUX ;APP_NAME = ; Gitea: Git with a cup of tea -APP_NAME = %%forgejo_title +APP_NAME = {{ general.forgejo.forgejo_title }} ;GNUNUX -DOMAIN = %%revprox_client_external_domainnames[0] +DOMAIN = {{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }} ;GNUNUX -ROOT_URL = https://%%revprox_client_external_domainnames[0]%%revprox_client_external_domainnames[0]revprox_client_location +ROOT_URL = https://{{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }}{{ general.revprox.revprox_client.revprox_client_external_domainnames[0]['revprox_client_location'] }} ;GNUNUX -LOCAL_ROOT_URL = https://%%domain_name_eth0:3000/ +LOCAL_ROOT_URL = https://{{ general.network.interface_0.domain_name_eth0 }}:3000/ ;GNUNUX -SSH_DOMAIN = %%revprox_client_external_domainnames[0] +SSH_DOMAIN = {{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }} ;GNUNUX -SSH_PORT = %%incoming_ports[0] +SSH_PORT = {{ general.network.incoming_ports[0] }} ;GNUNUX -SSH_LISTEN_PORT = %%incoming_ports[0] +SSH_LISTEN_PORT = {{ general.network.incoming_ports[0] }} ;GNUNUX -CERT_FILE = %%tls_cert_directory/revprox.crt -KEY_FILE = %%tls_key_directory/revprox.key +CERT_FILE = {{ general.tls_cert_directory }}/revprox.crt +KEY_FILE = {{ general.tls_key_directory }}/revprox.key ;GNUNUX ;LFS_JWT_SECRET = -LFS_JWT_SECRET = %%forgejo_lfs_jwt_secret +LFS_JWT_SECRET = {{ general.forgejo.forgejo_lfs_jwt_secret }} ;GNUNUX DB_TYPE = postgres -HOST = %%pg_client_server_domainname:5432 -NAME = %%pg_client_database -USER = %%pg_client_username -PASSWD = %%pg_client_password +HOST = {{ general.postgresql.pg_client_server_domainname }}:5432 +NAME = {{ general.postgresql.pg_client_database }} +USER = {{ general.postgresql.pg_client_username }} +PASSWD = {{ general.postgresql.pg_client_password }} SCHEMA = SSL_MODE = verify-full CHARSET = utf8 @@ -492,7 +489,7 @@ INSTALL_LOCK = true ;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore. ;>GNUNUX ;SECRET_KEY = -SECRET_KEY = %%forgejo_secret_key +SECRET_KEY = {{ general.forgejo.forgejo_secret_key }} ;GNUNUX ;INTERNAL_TOKEN= -INTERNAL_TOKEN = %%forgejo_internal_token +INTERNAL_TOKEN = {{ general.forgejo.forgejo_internal_token }} ;GNUNUX -SMTP_ADDR = %%smtp_relay_address +SMTP_ADDR = {{ smtp_relay_address }} ;` format ;FROM = ;>GNUNUX -FROM = %%forgejo_mail_sender +FROM = {{ general.forgejo.forgejo_mail_sender }} ;` to send an empty address. @@ -1802,13 +1799,13 @@ FROM = %%forgejo_mail_sender ;; Mailer user name and password, if required by provider. ;USER = ;>GNUNUX -USER = %%smtp_relay_user@%%ip_eth0 +USER = {{ general.smtp.smtp_relay_user }}@{{ general.smtp.smtp_client_ip }} ;GNUNUX -PASSWD = %%smtp_relay_password +PASSWD = {{ general.smtp.smtp_relay_password }} ;GNUNUX -HOST = network=tcp,addr=%%redis_client_server_domainname:6379,username=%%redis_client_username,password=%%redis_client_password,db=0,pool_size=100,idle_timeout=180 +HOST = network=tcp,addr={{ general.redis.redis_client_server_domainname }}:6379,username={{ general.redis.redis_client_username }},password={{ general.redis.redis_client_password }},db={{ general.redis.redis_client_index }},pool_size=100,idle_timeout=180 ;GNUNUX -PROVIDER_CONFIG = network=tcp,addr=%%redis_client_server_domainname:6379,password=%%redis_client_password,db=0,pool_size=100,idle_timeout=180 +PROVIDER_CONFIG = network=tcp,addr={{ general.redis.redis_client_server_domainname }}:6379,password={{ general.redis.redis_client_password }},db={{ general.redis.redis_client_index }},pool_size=100,idle_timeout=180 ; + + + + + /etc/grafana/grafana.ini + /etc/sysconfig/grafana-server + /tmpfiles.d/0grafana.conf + + + + + + + + + / + + + + 3000 + + + grafana + + + + + True + + + Grafana + + + Visualisation de données + + + Administration + + + silique_note.png + + + RS256 + + + + + + grafana + + + + + + domain_name_eth0 + admin + admin + cleartext + hide_secret + True + admin_password + + + + diff --git a/seed/grafana/manual/image/postinstall/grafana.sh b/seed/grafana/manual/image/postinstall/grafana.sh new file mode 100644 index 0000000..f78a34b --- /dev/null +++ b/seed/grafana/manual/image/postinstall/grafana.sh @@ -0,0 +1,11 @@ +mkdir -p $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/usr/lib/grafana/plugins +#echo """#!/bin/bash -xe +#grafana-cli plugins install grafana-image-renderer +#mkdir -p /usr/lib/grafana +#mv /var/lib/grafana/plugins/ /usr/lib/grafana/ +#""" > $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/install.sh +#chmod 755 $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/install.sh +#mv $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/etc/resolv.conf /tmp +#echo "nameserver 9.9.9.9" > $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/etc/resolv.conf +#chroot $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP /install.sh +#mv -f /tmp/resolv.conf $IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/etc/resolv.conf diff --git a/seed/grafana/manual/image/preinstall/grafana.sh b/seed/grafana/manual/image/preinstall/grafana.sh new file mode 100644 index 0000000..6e6c00f --- /dev/null +++ b/seed/grafana/manual/image/preinstall/grafana.sh @@ -0,0 +1 @@ +PKG="$PKG grafana" diff --git a/seed/grafana/templates/grafana-server b/seed/grafana/templates/grafana-server new file mode 100644 index 0000000..3aa9e10 --- /dev/null +++ b/seed/grafana/templates/grafana-server @@ -0,0 +1,30 @@ +GRAFANA_USER=grafana + +GRAFANA_GROUP=grafana + +#>GNUNUX +#GRAFANA_HOME=/usr/share/grafana +GRAFANA_HOME=/srv/grafana/home +#GNUNUX +#DATA_DIR=/var/lib/grafana +DATA_DIR=/srv/grafana/var +#GNUNUX +plugins = /usr/lib/grafana/plugins +#GNUNUX +protocol = https +#GNUNUX +{% set location = general.revprox.revprox_client.revprox_client_external_domainnames[0].revprox_client_location %} +{% if location.endswith('/') %} +{% set location = location[:-1] %} +{% endif %} +root_url = https://{{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }}{{ location }} +#GNUNUX +cert_file = {{ tls_cert_directory }}/revprox.crt +cert_key = {{ tls_key_directory }}/revprox.key; +#GNUNUX +type = postgres +host = {{ general.postgresql.pg_client_server_domainname }}:5432 +name = {{ general.postgresql.pg_client_database }} +user = {{ general.postgresql.pg_client_username }} +password = {{ general.postgresql.pg_client_password }} +ssl_mode = verify-full +ca_cert_path = {{ general.tls_ca_directory }}/PostgreSQL.crt +client_key_path = {{ general.tls_key_directory }}/postgresql.key +client_cert_path = {{ general.tls_cert_directory }}/postgresql.crt +#GNUNUX +reporting_enabled = false +#GNUNUX +disable_initial_admin_creation = false +admin_user = admin +admin_password = {{ general.grafana.admin_password }} +#,