Ansible execute remote ssh task -


i have tried connecting remote "custom" linux vm, , copied ssh public ssh it, yet, i'm able ansible ping / connect it, keep getting remote host unreachable. "i think because running custom version of linux , ssh auth might behaving differently"

the following remote ssh command works

 # ssh -t user@server_ip "show vd"  password: mypassword 

i'm trying convert above command ansible playbook

--- - hosts: server_ip   gather_facts: no   remote_user: root    tasks:     - name: check devise status       shell: ssh -i server_ip "show vd"       register: output      - expect:       command: sh "{{ output.stdout }}"       responses:         (?i)password: user 

i'm unable work, , i'm not sure if write way of doing it, input highly appreciated it.

whenever have ssh connection problems should add -vvvv parameter ansible-playbook command line. way give detailed information ssh connection , errors.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -