OSDN Git Service

add yarn-installer recipe to the nodejs_utils cookbook.
[metasearch/grid-chef-repo.git] / roles / ldap-client-grid.rb
1 name 'ldap-client-grid'
2 description 'LDAP client role for Grid'
3
4 run_list(
5   'recipe[ssl_cert::ca_certs]',
6   'role[ldap-client]',
7   'recipe[openldap::nss-ldapd]'
8 )
9
10 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
11
12 uri = 'ldap://ldap.grid.example.com/'
13 base = 'dc=grid,dc=example,dc=com'
14 ca_name = 'grid_ca'
15 #ca_cert_file = '/etc/ssl/certs/00grid_ca.crt'
16
17 default_attributes(
18   'ssl_cert' => {
19     'ca_cert_file_prefix' => '00',
20     'server_cert_file_prefix' => '01',
21     'server_key_file_prefix' => '01',
22     'ca_names' => [
23       ca_name,
24     ],
25   },
26   'openldap' => {
27     'with_ssl_cert_cookbook' => true,
28     'ssl_cert' => {
29       'ca_name' => ca_name,
30     },
31     'client' => {
32       'URI' => uri,
33       'BASE' => base,
34       # because with_ssl_cert_cookbook is set
35       #'TLS_CACERT' => ca_cert_file,
36       'TLS_REQCERT' => 'allow',
37       'TLS_CHECKPEER' => 'yes',
38       'SASL_MECH' => 'GSSAPI'
39     },
40     'nss-ldapd' => {
41       'uri' => uri,
42       'base' => base,
43       'ssl' => 'start_tls',
44       # because with_ssl_cert_cookbook is set
45       #'tls_cacertfile' => ca_cert_file,
46       'tls_reqcert' => 'demand'
47     },
48     'ldap_lookup_nameservices' => ['passwd', 'group']
49   }
50 )
51
52 #override_attributes "apache2" => { "max_children" => "50" }