I have a playbook where it has an option that can be run in 2 different ways.
- When having single host to execute, can run prompt.yml file to execute against single host.
- When a large number of hosts exits, that was kept in a inventory and run against them.
Play book is working fine when executing with site_prompt.yml, but having issue when executing again site_inventory.yml
SK [upgrade : Retrieve the current firmware] **************************************************************************************************************************************
task path: /root/brocade/ansible-fos-command/devopsweb1/roles/brocade_upgrade/tasks/main.yaml:1
<7.5.5.154> ESTABLISH SSH CONNECTION FOR USER: None
<7.5.5.154> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/c6fd0bb33a 7.5.5.154 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’“‘’
<7.5.5.155> ESTABLISH SSH CONNECTION FOR USER: None
<7.5.5.155> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/900bdb6d71 7.5.5.155 '/bin/sh -c '”‘“‘echo ~ && sleep 0’”’"‘’
<7.50.52.154> (255, b’‘, b’Permission denied (publickey,password).\r\n’)
fatal: [7.5.5.154]: UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).”,
“unreachable”: true
}
<7.5.5.155> (255, b’‘, b’Permission denied (publickey,password).\r\n’)
fatal: [7.5.5.155]: UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).”,
“unreachable”: true