From 149014be195ae1154cc9d94bc6b960a46f83ed07 Mon Sep 17 00:00:00 2001 From: Monocots Date: Tue, 19 May 2020 23:00:32 +0000 Subject: [PATCH] Use the correct user to ssh to the BTS --- modules/rhizo_base/manifests/init.pp | 1 + modules/rhizo_base/templates/rccn-functions.sh.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index 4ec973d..6b8ed94 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -285,6 +285,7 @@ schedule { 'repo': group => 'root', } + $bts_user = { 'UmSite' => 'fairwaves', '2050M' => 'root', '2050S' => 'root' } file { "/etc/profile.d/rccn-functions.sh": ensure => present, content => template('rhizo_base/rccn-functions.sh.erb'), diff --git a/modules/rhizo_base/templates/rccn-functions.sh.erb b/modules/rhizo_base/templates/rccn-functions.sh.erb index 08bce94..1d9fe15 100644 --- a/modules/rhizo_base/templates/rccn-functions.sh.erb +++ b/modules/rhizo_base/templates/rccn-functions.sh.erb @@ -83,7 +83,7 @@ check_trx() { <% @bts.each_with_index do |bts, index| -%> b<%= index %>() { - ssh -o StrictHostKeyChecking=no root@<%= bts["ip"] %> + ssh -o StrictHostKeyChecking=no <%= @bts_user[bts["model"]] %>@<%= bts["ip"] %> } <% end -%>