X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fferm%2Ftemplates%2Fme.conf.erb;h=7069f592a27b763a4a76148860fdc97893743045;hb=bf6b1da5520ccce7b30b81e1f6cb0bb4619a48c2;hp=1637b3b877918ab8d2d10ce761be5498c64d1b20;hpb=c3f3b0635d6e2b11512e5383e4a681722eda8fa8;p=mirror%2Fdsa-puppet.git diff --git a/modules/ferm/templates/me.conf.erb b/modules/ferm/templates/me.conf.erb index 1637b3b87..7069f592a 100644 --- a/modules/ferm/templates/me.conf.erb +++ b/modules/ferm/templates/me.conf.erb @@ -6,7 +6,16 @@ <%= out = [] -restrict_ssh = %w{lebrun logtest01 geo1 geo2 geo3 beethoven tchaikovsky schroeder heininen handel lotti} +restricted_purposes = {'kvm host', 'central syslog server', 'puppet master', 'jumphost'} +restrict_ssh = %w{lebrun logtest01 geo1 geo2 geo3 beethoven tchaikovsky schroeder rossini draghi} + +if (nodeinfo['ldap'].has_key?('purpose')) then + nodeinfo['ldap']['purpose'].each do |purp| + if restricted_purposes.include?(purp) then + restrict_ssh << hostname + end + end +end ssh4allowed = [] ssh6allowed = [] @@ -18,10 +27,9 @@ end if %w{lebrun schroeder}.include?(hostname) then out << '@def $CARNET = ( 193.198.184.8/29 161.53.160.133 161.53.160.90 161.53.11.222 161.53.12.134 161.53.12.142 161.53.12.143 );' ssh4allowed << '$CARNET' - ssh4allowed << '70.103.162.29' # master - ssh4allowed << '82.195.75.84' # nott.ayous.org, HE (builddadm) + ssh4allowed << '$BUILDD_SSH_ACCESS' end -if %w{beethoven}.include?(hostname) then +if %w{beethoven draghi}.include?(hostname) then ssh4allowed << '$HOST_DEBIAN_V4' ssh6allowed << '$HOST_DEBIAN_V6' end