First of all, I am still learning Ansible, so there is a very real 
possibility this is user error, but here is my issue:

When I try to log in using the sros module, regardless of the username I am 
using in the yml file, it is using my username from the ansible host machine

Here is the yml:

- name: Test SROS in lab
  hosts: lab-12e
      host: "{{ inventory_hostname }}"
      username: ansible
      ssh_keyfile: /home/nkeeling/ansible/rsa-keys/
      transport: cli
    - name: run show version on remote devices
        commands: show version
        provider: "{{ cli }}"

This was taken directly from the examples for the module. When I run the 
module, I get a failure:

nkeeling@eng-tools:~/ansible$ ansible-playbook sros_test.yml

PLAY [Test SROS in lab] 

TASK [setup] 
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed 
to connect to the host via ssh: TiMOS-C-13.0.R4 cpm/hops64 ALCATEL SR 7750 
Copyright (c) 2000-2015 Alcatel-Lucent.\r\nAll rights reserved. All use 
subject to applicable license agreements.\r\nBuilt on Wed Jul 29 16:27:26 
PDT 2015 by builder in /rel13.0/b1/R4/panos/main\r\nThis computer system is 
the property of xxxxxxxxx Networks. It is for authorized use only. Users 
(authorized or unauthorized) have no explicit or implicit expectation of 
privacy. Unauthorized or improper use of this system may result in 
administrative disciplinary action and civil and criminal penalties. 
denied (publickey,password).\r\n", "unreachable": true}
        to retry, use: --limit @/home/nkeeling/ansible/sros_test.retry

*********************************************************************            : ok=0    changed=0    unreachable=1    failed=0 

When I look at the security log on my SR-OS device, I see:

64 2001/02/23 22:41:40.17 PST MINOR: SECURITY #2011 Base nkeeling
"User nkeeling from failed authentication"

I have tried setting the username in multiple places in the yml file, with 
no change in the result. If anyone is able to steer me in the right 
direction, it would be VERY much appreciated!

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 post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to