Hi Team,
I'm using telnet module. When running the commands I see very partial
results in the output though I was expecting to get all text printed to
stdout.
For example, below play does not return in the output result the full print
of ifconfig command. Is there something wrong, or am I doing something
wrong?
- hosts: all
connection: local
gather_facts: no
tasks:
- name: Run ifconfig test
telnet:
host: somehost
send_newline: yes
port: 23
user: someuser
password: somepassword
login_prompt: "localhost login: "
password_prompt: "Password: "
prompts:
- "[~# ]"
command:
- ifconfig
Command to run the play:
ansible-playbook ip.yaml -i inventory -vvvvv
Actual output:
ansible-playbook 2.7.10
config file = None
configured module search path = [u'/root/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5
20150623 (Red Hat 4.8.5-4)]
No config file found; using defaults
setting up inventory plugins
/tmp/inventory did not meet host_list requirements, check plugin
documentation if this is unexpected
/tmp/inventory did not meet script requirements, check plugin documentation
if this is unexpected
Parsed /tmp/inventory inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from
/usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
PLAYBOOK: ip.yaml
*********************************************************************************************************************************************************************************************
1 plays in ip.yaml
PLAY [all]
****************************************************************************************************************************************************************************************************
META: ran handlers
TASK [Get node IP]
********************************************************************************************************************************************************************************************
task path: /tmp/ip.yaml:5
>>> ifconfig
<<< ifconfig
changed: [10.8.120.141] => {
"changed": true,
"output": [
"login: "
]
}
META: ran handlers
META: ran handlers
PLAY RECAP
****************************************************************************************************************************************************************************************************
10.8.120.141 : ok=1 changed=1 unreachable=0 failed=0
Doron
--
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/656d4540-b301-4815-a7d7-754e9dc9213a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.