From 503e4cf5c54e3fe4b802038e8917341c4ce803e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 10 Sep 2017 12:45:41 +0200 Subject: Make use of LDAP variables to configure node --- modules/base_installation/manifests/cronie.pp | 8 +++++++- modules/base_installation/templates/puppet/host_ldap.info.erb | 1 + modules/base_installation/templates/puppet/puppet.conf.erb | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/base_installation') diff --git a/modules/base_installation/manifests/cronie.pp b/modules/base_installation/manifests/cronie.pp index bcdd9a7..918bce3 100644 --- a/modules/base_installation/manifests/cronie.pp +++ b/modules/base_installation/manifests/cronie.pp @@ -10,12 +10,18 @@ class base_installation::cronie inherits base_installation { owner => root, group => root, } - cron { 'puppet-apply': + cron { 'puppet-pull-apply': ensure => present, command => "cd $base_installation::puppet_code_path ; /usr/bin/git pull", user => root, minute => '*/30', require => File['post-hook'], } + cron { 'puppet-apply': + ensure => present, + command => "cd $base_installation::puppet_code_path ; puppet apply --test $base_installation::puppet_code_path/manifests/site.pp", + user => root, + minute => '*/20' + } } } diff --git a/modules/base_installation/templates/puppet/host_ldap.info.erb b/modules/base_installation/templates/puppet/host_ldap.info.erb index a350c37..f742da7 100644 --- a/modules/base_installation/templates/puppet/host_ldap.info.erb +++ b/modules/base_installation/templates/puppet/host_ldap.info.erb @@ -2,6 +2,7 @@ ldapadd -D "cn=root,<%= @ldap_base %>" -W << 'EOF' dn: <%= @ldap_dn %> cn: <%= @ldap_cn %> +cn: <%= @system_hostname %> objectclass: device objectclass: top objectclass: simpleSecurityObject diff --git a/modules/base_installation/templates/puppet/puppet.conf.erb b/modules/base_installation/templates/puppet/puppet.conf.erb index 99d9fc3..3748039 100644 --- a/modules/base_installation/templates/puppet/puppet.conf.erb +++ b/modules/base_installation/templates/puppet/puppet.conf.erb @@ -2,6 +2,7 @@ ssldir = <%= @puppet_ssl_path %> node_terminus = ldap +certname = <%= @system_hostname %> ldapserver = <%= @ldap_server %> ldaptls = true ldapbase = <%= @ldap_base %> -- cgit v1.2.3