diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-06-28 12:17:40 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-06-28 12:17:40 +0200 |
commit | 0a145a25c0a8cbcd50d515d2a828bd6665836ddb (patch) | |
tree | c6e3832098d19917b0ba0bcbe119103c632c7d29 /modules/profile/manifests/postgresql/pam_ldap.pp | |
parent | f1d583bfdaf881116e5f9ca9e050307e7acdc28e (diff) | |
parent | 3925777d9715d271c0643faef9f520e7816dba89 (diff) | |
download | Puppet-0a145a25c0a8cbcd50d515d2a828bd6665836ddb.tar.gz Puppet-0a145a25c0a8cbcd50d515d2a828bd6665836ddb.tar.zst Puppet-0a145a25c0a8cbcd50d515d2a828bd6665836ddb.zip |
Merge branch 'refactoring' into dev
Diffstat (limited to 'modules/profile/manifests/postgresql/pam_ldap.pp')
-rw-r--r-- | modules/profile/manifests/postgresql/pam_ldap.pp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/profile/manifests/postgresql/pam_ldap.pp b/modules/profile/manifests/postgresql/pam_ldap.pp new file mode 100644 index 0000000..f068245 --- /dev/null +++ b/modules/profile/manifests/postgresql/pam_ldap.pp | |||
@@ -0,0 +1,28 @@ | |||
1 | class profile::postgresql::pam_ldap ( | ||
2 | String $pg_user = "postgres" | ||
3 | ) { | ||
4 | include "profile::pam_ldap" | ||
5 | |||
6 | $password_seed = lookup("base_installation::puppet_pass_seed") | ||
7 | $ldap_server = lookup("base_installation::ldap_server") | ||
8 | $ldap_base = lookup("base_installation::ldap_base") | ||
9 | $ldap_dn = lookup("base_installation::ldap_dn") | ||
10 | $ldap_password = generate_password(24, $password_seed, "ldap") | ||
11 | $ldap_attribute = "cn" | ||
12 | |||
13 | file { "/etc/pam_ldap.d/postgresql.conf": | ||
14 | ensure => "present", | ||
15 | mode => "0400", | ||
16 | owner => $pg_user, | ||
17 | group => "root", | ||
18 | content => template("profile/postgresql/pam_ldap_postgresql.conf.erb"), | ||
19 | require => File["/etc/pam_ldap.d"], | ||
20 | } -> | ||
21 | file { "/etc/pam.d/postgresql": | ||
22 | ensure => "present", | ||
23 | mode => "0644", | ||
24 | owner => "root", | ||
25 | group => "root", | ||
26 | source => "puppet:///modules/profile/postgresql/pam_postgresql" | ||
27 | } | ||
28 | } | ||