OSDN Git Service

improve the backup and restore scripts.
[metasearch/grid-chef-repo.git] / roles / node_commons.rb
1 name 'node_commons'
2 description 'Node common role.'
3
4 run_list(
5   'role[security_update]',
6   'role[apt]',
7   'recipe[commons::yum-epel]',
8   'recipe[commons::ntpd]',
9   'recipe[ssl_cert::ca_certs]',
10   'recipe[ssl_cert::ca_pubkeys]',
11   'recipe[ssl_cert::ssh_ca_krl]',
12   'recipe[ssh_utils::server]',
13 )
14
15 #env_run_lists()
16
17 ca_name = 'grid_ca'
18 ssh_ca_name = 'grid_ssh_ca'
19
20 #default_attributes()
21
22 override_attributes(
23   'apt_utils' => {
24     'conf' => {
25       'proxy' => {
26         'sequence' => '80',
27         'http' => 'http://ftp.grid.example.com:3142/',
28         'https' => 'DIRECT',
29       },
30     },
31   },
32   'ssh_utils' => {
33     'with_ssl_cert_cookbook' => true,
34     'ssl_cert' => {
35       'ca_pubkey_name' => ssh_ca_name,
36       'ssh_ca_krl_name' => ssh_ca_name,
37     },
38     'sshd_config' => {
39       'extra_props' => {
40         # because with_ssl_cert_cookbook is set
41         #'TrustedUserCAKeys' => ca_pubkeys_file,
42         #'RevokedKeys' => ssh_ca_krl_file,
43       },
44     },
45   },
46   'ssl_cert' => {
47     'ca_cert_file_prefix' => '00',
48     'ca_pubkey_file_prefix' => '00',
49     'server_cert_file_prefix' => '01',
50     'server_key_file_prefix' => '01',
51     'ca_names' => [
52       ca_name,
53     ],
54     'ca_pubkey_names' => [
55       ssh_ca_name,
56     ],
57     'ssh_ca_krl_name' => ssh_ca_name,
58   },
59 )
60