From 580bd7fc5d4b078f8dec2fd440e5989b5f963f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 23 Jun 2018 14:02:48 +0200 Subject: Add json file --- modules/role/manifests/etherpad.pp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'modules/role/manifests') diff --git a/modules/role/manifests/etherpad.pp b/modules/role/manifests/etherpad.pp index a43f146..109da96 100644 --- a/modules/role/manifests/etherpad.pp +++ b/modules/role/manifests/etherpad.pp @@ -1,6 +1,20 @@ class role::etherpad ( ) { $password_seed = lookup("base_installation::puppet_pass_seed") + $web_host = lookup("base_installation::real_hostname") + $web_listen = "0.0.0.0" + $web_port = 18000 + $pg_db = "etherpad-lite" + $pg_user = "etherpad-lite" + $pg_password = generate_password(24, $password_seed, "postgres_etherpad") + + $ldap_server = lookup("base_installation::ldap_server") + $ldap_base = lookup("base_installation::ldap_base") + $ldap_dn = lookup("base_installation::ldap_dn") + $ldap_account_pattern = "(&(memberOf=cn=users,cn=etherpad,ou=services,dc=immae,dc=eu)(uid={{username}}))" + $ldap_group_pattern = "(memberOf=cn=groups,cn=etherpad,ou=services,dc=immae,dc=eu)" + $ldap_password = generate_password(24, $password_seed, "ldap") + include "base_installation" @@ -16,6 +30,13 @@ class role::etherpad ( -> patch::file { "/usr/share/etherpad-lite/src/node/utils/LibreOffice.js": diff_source => "puppet:///modules/role/etherpad/libreoffice_patch.diff", } + -> file { "/etc/etherpad-lite/settings.json": + ensure => present, + owner => "etherpad-lite", + group => "etherpad-lite", + notify => Service["etherpad-lite"], + content => template("role/etherpad/settings.json.erb"), + } $modules = [ "ep_aa_file_menu_toolbar", @@ -66,11 +87,6 @@ class role::etherpad ( subscribe => Aur::Package["etherpad-lite"], } - $web_host = "outils-1.v.immae.eu" - $pg_db = "etherpad-lite" - $pg_user = "etherpad-lite" - $pg_password = generate_password(24, $password_seed, "postgres_etherpad") - profile::postgresql_master { "postgresql master for etherpad": letsencrypt_host => $web_host, backup_hosts => ["backup-1"], -- cgit v1.2.3