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?






On Mon, Nov 25, 2013 at 2:25 PM, Asif Iqbal <[email protected]> wrote:

> 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
> DIAG> 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
> DIAG> 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
> DIAG> exit
> exit
> $
>
>
> OR like this
>
> $ ssh -qtt atl-col-01 shell <<EOF
> > uname -a
> > exit
> > EOF
> uname -a
> exit
> DIAG> 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
> DIAG> exit
> exit
>
> I was trying to do the same with playbook
>
> $ cat file.yml
> ---
> - hosts: atl-col-01
>   user: admin
>   tasks:
>   - name: ping it
>     local_action: shell 'ping {{ inventory_hostname }}'
>     register: result
>
>
> $ cat hosts
> ...
> atl-col-01 ansible_python_interpreter=/usr/local/bin/python
> ...
>
> $ cat ~/.ansible.cfg
> [defaults]
> remote_tmp = /tmp
>
> $ ansible-playbook file.yml -i hosts -vvvv
>
> PLAY [atl-col-01]
> *************************************************************
>
> GATHERING FACTS
> ***************************************************************
> <atl-col-01> ESTABLISH CONNECTION FOR USER: admin
> <atl-col-01> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o',
> 'ControlPersist=60s', '-o',
> 'ControlPath=/home/iqbala/.ansible/cp/ansible-ssh-%h-%p-%r', '-o',
> 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o',
> 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey',
> '-o', 'PasswordAuthentication=no', '-o', 'User=admin', '-o',
> 'ConnectTimeout=10', 'atl-col-01', "/bin/sh -c 'mkdir -p
> /tmp/ansible-1385407330.54-15863228552079 && chmod a+rx
> /tmp/ansible-1385407330.54-15863228552079 && echo
> /tmp/ansible-1385407330.54-15863228552079'"]
> <atl-col-01> REMOTE_MODULE setup
> <atl-col-01> PUT /tmp/tmpQ1MvZ1 TO 120: Invalid command/setup
> fatal: [atl-col-01] => failed to transfer file to 120: Invalid
> command/setup:
>
> 120: Invalid command
>
>
> TASK: [ping it]
> ***************************************************************
> FATAL: no hosts matched or all hosts have already failed -- aborting
>
>
> PLAY RECAP
> ********************************************************************
>            to retry, use: --limit @/home/iqbala/file.retry
>
> atl-col-01                 : ok=0    changed=0    unreachable=1
>  failed=0
>
>
> Any suggestion how to make it work?
>
> Thanks
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <[email protected]>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to