I am having a timeout issue with ios_config and login banners. The playbook 
times out. Any help or examples of a working config would be appreciated. 

adminlen@len-nm-1:~/ansible$ ansible --version
ansible 2.3.0
  config file = /home/adminlen/ansible/ansible.cfg
  configured module search path = Default w/o overrides


ansible$ cat router-login-banner.yml

hosts: testsitehsrp1
gather_facts: no
connection: local

tasks:
    name: Set motd and alias commands for dsl
    ios_config:
    username: adminlen
    save: yes
    src: /home/adminlen/ansible/router-login-banner-test

adminlen@len-nm-1:~/ansible$ cat router-login-banner-test
banner login @

test login
banner

@

adminlen@len-nm-1:~/ansible$ ansible-playbook -vvv router-login-banner.yml 
--ask-pass
Using /home/adminlen/ansible/ansible.cfg as config file
SSH password:

PLAYBOOK: router-login-banner.yml 
*******************************************************************************
1 plays in router-login-banner.yml

PLAY [testsitehsrp1] 
********************************************************************************************
META: ran handlers

TASK [Set motd and alias commands for dsl] 
**********************************************************************
task path: /home/adminlen/ansible/router-login-banner.yml:7
Using module file 
/usr/local/lib/python2.7/dist-packages/ansible-2.3.0-py2.7.egg/ansible/modules/network/ios/ios_config.py
<10.100.80.2> ESTABLISH LOCAL CONNECTION FOR USER: adminlen
<10.100.80.2> EXEC /bin/sh -c 'echo ~ && sleep 0'
<10.100.80.2> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo 
/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534" && 
echo ansible-tmp-1487961451.38-133078886647534="echo 
/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534" ) && 
sleep 0'
<10.100.80.2> PUT /tmp/tmpIbJY6x TO 
/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534/ios_config.py
<10.100.80.2> EXEC /bin/sh -c 'chmod u+x 
/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534/ 
/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534/ios_config.py
 
&& sleep 0'
<10.100.80.2> EXEC /bin/sh -c '/usr/bin/python 
/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534/ios_config.py;
 
rm -rf 
"/home/adminlen/.ansible/tmp/ansible-tmp-1487961451.38-133078886647534/" > 
/dev/null 2>&1 && sleep 0'
fatal: [testsitehsrp1]: FAILED! => {
"changed": false,
"command": "banner login @",
"failed": true,
"invocation": {
"module_args": {
"after": null,
"auth_pass": null,
"authorize": null,
"backup": false,
"before": null,
"config": null,
"defaults": false,
"force": false,
"host": null,
"lines": null,
"match": "line",
"multiline_delimiter": "@",
"parents": null,
"password": null,
"port": null,
"provider": null,
"replace": "line",
"save": true,
"src": "banner login @ \n\ntest login\nbanner\n\n@\n\n",
"ssh_keyfile": null,
"timeout": null,
"username": "adminlen"
}
},
"msg": "timeout trying to send command: banner login @",
"rc": 1
}
to retry, use: --limit @/home/adminlen/ansible/router-login-banner.retry

PLAY RECAP 
******************************************************************************************************
testsitehsrp1 : ok=0 changed=0 unreachable=0 failed=1

-- 
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].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c1db20c0-5a63-4bc6-8a0b-d1939357fd4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to