From aa7195a833c5573a96bbfd841b44b2c9898f4e21 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 31 Aug 2025 00:21:01 +0100 Subject: [PATCH] Add roles for azure-01 and azure-02 --- roles/azure-01.rb | 28 ++++++++++++++++++++++++++++ roles/azure-02.rb | 28 ++++++++++++++++++++++++++++ roles/twds.rb | 22 ++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 roles/azure-01.rb create mode 100644 roles/azure-02.rb create mode 100644 roles/twds.rb diff --git a/roles/azure-01.rb b/roles/azure-01.rb new file mode 100644 index 000000000..3a63032a6 --- /dev/null +++ b/roles/azure-01.rb @@ -0,0 +1,28 @@ +name "azure-01" +description "Master role applied to azure-01" + +default_attributes( + :networking => { + :interfaces => { + :external => { + :interface => "bond0", + :role => :external, + :inet => { + :address => "103.147.22.156", + :prefix => "24", + :gateway => "103.147.22.254" + }, + :bond => { + :mode => "802.3ad", + :lacprate => "slow", + :xmithashpolicy => "layer3+4", + :slaves => %w[ens1f0np0 ens1f1np1] + } + } + } + } +) + +run_list( + "role[twds]" +) diff --git a/roles/azure-02.rb b/roles/azure-02.rb new file mode 100644 index 000000000..a28e0a964 --- /dev/null +++ b/roles/azure-02.rb @@ -0,0 +1,28 @@ +name "azure-02" +description "Master role applied to azure-02" + +default_attributes( + :networking => { + :interfaces => { + :external => { + :interface => "bond0", + :role => :external, + :inet => { + :address => "103.147.22.157", + :prefix => "24", + :gateway => "103.147.22.254" + }, + :bond => { + :mode => "802.3ad", + :lacprate => "slow", + :xmithashpolicy => "layer3+4", + :slaves => %w[ens1f0np0 ens1f1np1] + } + } + } + } +) + +run_list( + "role[twds]" +) diff --git a/roles/twds.rb b/roles/twds.rb new file mode 100644 index 000000000..95bae64e5 --- /dev/null +++ b/roles/twds.rb @@ -0,0 +1,22 @@ +name "twds" +description "Role applied to all servers at TWDS" + +default_attributes( + :accounts => { + :users => { + :seadog007 => { :status => :administrator } + } + }, + :hosted_by => "Taiwan Digital Streaming Co", + :location => "Taiwan" +) + +override_attributes( + :ntp => { + :servers => ["0.tw.pool.ntp.org", "1.tw.pool.ntp.org", "asia.pool.ntp.org"] + } +) + +run_list( + "role[tw]" +) -- 2.39.5