vadud3
November 25, 2013, 7:25pm
1
Hi All
I am trying to run ansible on arbor appliances.
To run ssh remotely and get data from arbor appliance you will need to run it like this
$ echo “uname -a; exit” | ssh -qtt atl-col-01 shell
uname -a; exit
uname -a; exit
Linux atl-col-01 2.6.18-arbux26 #1 SMP PREEMPT Thu Aug 2 16:16:46 EDT 2012 i686 i686 i386 GNU/Linux
exit
$
OR like this
$ ssh -qtt atl-col-01 shell
uname -a
Linux atl-col-01 2.6.18-arbux26 #1 SMP PREEMPT Thu Aug 2 16:16:46 EDT 2012 i686 i686 i386 GNU/Linux
exit
exit
$
OR like this
$ ssh -qtt atl-col-01 shell <<EOF
uname -a
exit
EOF
uname -a
exit
uname -a
Linux atl-col-01 2.6.18-arbux26 #1 SMP PREEMPT Thu Aug 2 16:16:46 EDT 2012 i686 i686 i386 GNU/Linux
exit
exit
I was trying to do the same with playbook
$ cat file.yml
I’m not familiar with Arbor Networks internals personally
Possible options:
try scp instead of SFTP in ansible.cfg
see if you can configure something to give you a login shell
just use “raw” commands
see if there’s a API and do something closer to what’s done with the Arista and F5 modules
etc?
vadud3
November 26, 2013, 1:28pm
3
Once you ssh to arbor, you will need to type shell to get a bash shell. From there it is pure linux.
Yeah that’s not really going to work well in current state, because the system won’t know to run the “shell” command.
There’s no way to configure a regular shell account?
vadud3
November 26, 2013, 4:55pm
5
Yeah that’s not really going to work well in current state, because the system won’t know to run the “shell” command.
There’s no way to configure a regular shell account?
There is a way to provide regular shell account, but appliance upgrade overwrites it. Plus Arbor guys discouraging it too
If we can only redefine ssh as “ssh -ttt remotehost shell” we would be golden. Here is how we run things manually.
~$ ssh atl-col-01
Last login: Tue Nov 26 16:45:52 2013 from 192.168.0.248
ArbOS v5.2
Copyright (c) 2000-2013 Arbor Networks, Inc. All Rights Reserved.
Welcome to ArbOS
admin@atl-col-01:/# shell
uname -a
Linux atl-col-01 2.6.18-arbux26 #1 SMP PREEMPT Thu Aug 2 16:16:46 EDT 2012 i686 i686 i386 GNU/Linux
exit
exit
admin@atl-col-01:/# exit
Connection to atl-col-01 closed.
~$
Here is how we run it interactively using a script which I like to replace with ansible
~$ echo “uname -a; exit” | ssh -qtt atl-col-01 shell
uname -a; exit
uname -a; exit
Linux atl-col-01 2.6.18-arbux26 #1 SMP PREEMPT Thu Aug 2 16:16:46 EDT 2012 i686 i686 i386 GNU/Linux
exit
~$
vadud3
November 26, 2013, 6:09pm
6
I’m not familiar with Arbor Networks internals personally
Possible options:
try scp instead of SFTP in ansible.cfg
see if you can configure something to give you a login shell
just use “raw” commands
With raw I am getting the same output
$ ansible atl-col-01 -u admin -m raw -a “shell; uname -a” -i hosts
atl-col-01 | success | rc=0 >>
120: Invalid command
It is trying to run bash'' or like instead of
shell’'. How do I know that? Because I can generate similar output manually
admin@atl-col-01:/# sh
110: Ambiguous command
admin@atl-col-01:/# bash
120: Invalid command
admin@atl-col-01:/# shell
uname -a
Linux atl-col-01 2.6.18-arbux26 #1 SMP PREEMPT Thu Aug 2 16:16:46 EDT 2012 i686 i686 i386 GNU/Linux
Matt_Hite
(Matt Hite)
December 14, 2013, 12:17am
7
Hi, Asif. I have considered writing an Arbor module (using their API). The initial “itch” I wanted to "scratch’ was to manage network/customer object entities.
What is it that you hope to accomplish?
vadud3
March 14, 2016, 2:04pm
8
Hi, Asif. I have considered writing an Arbor module (using their API). The initial “itch” I wanted to "scratch’ was to manage network/customer object entities.
What is it that you hope to accomplish?
Essentially run remote command to find resource status