]> git.openstreetmap.org Git - chef.git/blob - roles/fafnir.rb
Simplify named configuration
[chef.git] / roles / fafnir.rb
1 name "fafnir"
2 description "Master role applied to fafnir"
3
4 default_attributes(
5   :dhcpd => {
6     :first_address => "10.0.79.1",
7     :last_address => "10.0.79.254"
8   },
9   :exim => {
10     :routes => {
11       :openstreetmap => {
12         :comment => "openstreetmap.org",
13         :domains => ["openstreetmap.org"],
14         :host => ["shenron.openstreetmap.org"]
15       }
16     }
17   },
18   :networking => {
19     :interfaces => {
20       :internal_ipv4 => {
21         :interface => "bond0",
22         :role => :internal,
23         :family => :inet,
24         :address => "10.0.64.2",
25         :bond => {
26           :mode => "802.3ad",
27           :lacprate => "fast",
28           :xmithashpolicy => "layer3+4",
29           :slaves => %w[eno1 eno2 eno3 eno4 eno49 eno50]
30         }
31       },
32       :external_ipv4 => {
33         :interface => "bond0.101",
34         :role => :external,
35         :family => :inet,
36         :address => "184.104.226.98"
37       },
38       :external_ipv6 => {
39         :interface => "bond0.101",
40         :role => :external,
41         :family => :inet6,
42         :address => "2001:470:1:b3b::2"
43       }
44     }
45   },
46   :prometheus => {
47     :snmp => {
48       "pdu1" => { :address => "10.0.64.100", :modules => %w[apcups], :labels => { "site" => "dublin" } },
49       "pdu2" => { :address => "10.0.64.101", :modules => %w[apcups], :labels => { "site" => "dublin" } },
50       "switch1" => { :address => "184.104.226.97", :modules => %w[if_mib juniper_ex4300], :labels => { "site" => "dublin" } }
51     },
52     :metrics => {
53       :uplink_interface => {
54         :help => "Site uplink interface name",
55         :labels => { :site => "dublin", :name => "ae50" }
56       }
57     }
58   }
59 )
60
61 run_list(
62   "role[equinix-dub]",
63   "role[hp-g9]",
64   "role[gateway]",
65   "role[mail]",
66   "recipe[dhcpd]"
67 )