Same issue here with
asa_command
SUMMARY
簡單地說,就是目前還不能用,我已經有發issue給ansible了,詳請可以參考下面的鏈結
ISSUE TYPE
- Bug Report
COMPONENT NAME
- asa_command
ANSIBLE VERSION
ansible 2.3.1.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Apr 4 2017, 08:46:44) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
CONFIGURATION
hosts
asa ansible_host=192.168.1.1 ansible_python_interpreter=/usr/bin/python
---
- hosts: asa
connection: local
gather_facts: yes
tasks:
- name: run show version on remoter devices
asa_command:
provider:
host: IP
username: USERNAME
password: PASSWORD
authorize: yes
auth_pass: PASSWORD
timeout: 30
commands:
- show version
register: version
- name: show version
debug:
var: version.stdout_lines
with_items: version.results
OS / ENVIRONMENT
Darwin Danielde-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Tue Apr 11 16:00:51 PDT 2017; root:xnu-3248.60.11.5.3~1/RELEASE_X86_64 x86_64
STEPS TO REPRODUCE
$ ansible-playbook -i hosts asa.yml -vvv
No config file found; using defaults
PLAYBOOK: asa.yml *************************************************************************************************************
1 plays in asa.yml
PLAY [asa] ********************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
<192 .168.1.1=""> ESTABLISH LOCAL CONNECTION FOR USER: daniel
<192 .168.1.1=""> EXEC /bin/sh -c 'echo ~ && sleep 0'
<192 .168.1.1=""> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260 `" && echo ansible-tmp-1500304102.91-122764280426260="` echo /Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260 `" ) && sleep 0'
<192 .168.1.1=""> PUT /var/folders/03/ns9kvh215g12x_h6gyq7f7tr0000gn/T/tmpGAqiRu TO /Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260/setup.py
<192 .168.1.1=""> EXEC /bin/sh -c 'chmod u+x /Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260/ /Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260/setup.py && sleep 0'
<192 .168.1.1=""> EXEC /bin/sh -c '/usr/local/bin/python /Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260/setup.py; rm -rf "/Users/daniel/.ansible/tmp/ansible-tmp-1500304102.91-122764280426260/" > /dev/null 2>&1 && sleep 0'
ok: [asa]
META: ran handlers
TASK [run show version on remoter devices] ************************************************************************************
task path: /Users/daniel/work/lab/asa.yml:6
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/network/asa/asa_command.py
<192 .168.1.1=""> ESTABLISH LOCAL CONNECTION FOR USER: daniel
<192 .168.1.1=""> EXEC /bin/sh -c 'echo ~ && sleep 0'
<192 .168.1.1=""> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732 `" && echo ansible-tmp-1500304104.0-136124011056732="` echo /Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732 `" ) && sleep 0'
<192 .168.1.1=""> PUT /var/folders/03/ns9kvh215g12x_h6gyq7f7tr0000gn/T/tmpdXRCx3 TO /Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732/asa_command.py
<192 .168.1.1=""> EXEC /bin/sh -c 'chmod u+x /Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732/ /Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732/asa_command.py && sleep 0'
<192 .168.1.1=""> EXEC /bin/sh -c '/usr/local/bin/python /Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732/asa_command.py; rm -rf "/Users/daniel/.ansible/tmp/ansible-tmp-1500304104.0-136124011056732/" > /dev/null 2>&1 && sleep 0'
fatal: [asa]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"auth_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"authorize": true,
"commands": [
"show version"
],
"context": null,
"host": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"interval": 1,
"match": "all",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": null,
"provider": {
"auth_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"authorize": true,
"host": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"timeout": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
},
"retries": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"ssh_keyfile": null,
"timeout": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"transport": null,
"username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"wait_for": null
}
},
"msg": "timeout trying to send command: enable"
}
to retry, use: --limit @/Users/daniel/work/lab/asa.retry
PLAY RECAP ********************************************************************************************************************
asa : ok=1 changed=0 unreachable=0 failed=1192>192>192>192>192>192>192>192>192>192>192>192>
How to fix this issue ?
Reference:
沒有留言:
張貼留言