]> git.openstreetmap.org Git - chef.git/commitdiff
Add role for ladon
authorTom Hughes <tom@compton.nu>
Thu, 25 May 2017 08:03:36 +0000 (09:03 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 25 May 2017 08:03:36 +0000 (09:03 +0100)
cookbooks/networking/templates/default/interfaces.erb
cookbooks/networking/templates/default/shorewall-zones.erb
roles/gr.rb [new file with mode: 0644]
roles/grnet.rb [new file with mode: 0644]
roles/ladon.rb [new file with mode: 0644]

index 2344c1f9d0e3c372082add2dccda507532d7d087..7ffd456deceabb306291c13b100851e29c00a416 100644 (file)
@@ -48,6 +48,9 @@ iface <%= interface[:interface] %> <%= interface[:family] %> static
       bond-slaves none
       bond-primary <%= interface[:bond][:slaves].first %>
       bond-miimon <%= interface[:bond][:miimon] || 100 %>
       bond-slaves none
       bond-primary <%= interface[:bond][:slaves].first %>
       bond-miimon <%= interface[:bond][:miimon] || 100 %>
+<% if interface[:bond][:xmithashpolicy] -%>
+      bond_xmit_hash_policy <%= interface[:bond][:xmithashpolicy] %>
+<% end -%>
       bond-downdelay <%= interface[:bond][:downdelay] || 200 %>
       bond-updelay <%= interface[:bond][:updelay] || 200 %>
 <% end -%>
       bond-downdelay <%= interface[:bond][:downdelay] || 200 %>
       bond-updelay <%= interface[:bond][:updelay] || 200 %>
 <% end -%>
index 629ad010057d7f9411cc56a304ec48dc560da55b..6b54a59309433a4df03fc66f3367b2d2e9ebf193 100644 (file)
@@ -34,3 +34,4 @@ uz:osm          <%= @type %>
 ovh:osm         <%= @type %>
 ffr:osm         <%= @type %>
 ixz:osm         <%= @type %>
 ovh:osm         <%= @type %>
 ffr:osm         <%= @type %>
 ixz:osm         <%= @type %>
+grn:osm         <%= @type %>
diff --git a/roles/gr.rb b/roles/gr.rb
new file mode 100644 (file)
index 0000000..6905327
--- /dev/null
@@ -0,0 +1,10 @@
+name "gr"
+description "Role applied to all servers located in Greece"
+
+override_attributes(
+  :country => "gr"
+)
+
+run_list(
+  "role[base]"
+)
diff --git a/roles/grnet.rb b/roles/grnet.rb
new file mode 100644 (file)
index 0000000..30dc0a5
--- /dev/null
@@ -0,0 +1,27 @@
+name "grnet"
+description "Role applied to all servers at GRNET"
+
+default_attributes(
+  :hosted_by => "GRNET",
+  :location => "Athens, Greece",
+  :networking => {
+    :nameservers => [
+      "83.212.2.77"
+    ],
+    :roles => {
+      :external => {
+        :zone => "grn"
+      }
+    }
+  }
+)
+
+override_attributes(
+  :ntp => {
+    :servers => ["0.gr.pool.ntp.org", "1.gr.pool.ntp.org", "europe.pool.ntp.org"]
+  }
+)
+
+run_list(
+  "role[gr]"
+)
diff --git a/roles/ladon.rb b/roles/ladon.rb
new file mode 100644 (file)
index 0000000..68cd923
--- /dev/null
@@ -0,0 +1,35 @@
+name "ladon"
+description "Master role applied to ladon"
+
+default_attributes(
+  :networking => {
+    :interfaces => {
+      :external_ipv4 => {
+        :interface => "bond0",
+        :role => :external,
+        :family => :inet,
+        :address => "83.212.2.116",
+        :prefix => "29",
+        :gateway => "83.212.2.113",
+        :bond => {
+          :mode => "802.3ad",
+          :miimon => "100",
+          :xmithashpolixt => "layer3+4",
+          :slaves => %w(eth0 eth1)
+        }
+      },
+      :external_ipv6 => {
+        :interface => "bond0",
+        :role => :external,
+        :family => :inet6,
+        :address => "2001:648:2ffe:4::116",
+        :prefix => "64",
+        :gateway => "2001:648:2ffe:4::1"
+      }
+    }
+  }
+)
+
+run_list(
+  "role[grnet]"
+)