- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
05-22-2020 01:13 AM - edited 05-22-2020 01:15 AM
Advices are deeply appreciated, stuck in this issue for 2-3 days, please find below info.
Sample script###############
- name: running show system info cmd
hosts: PA
vars_files:
- pass.yml
roles:
- role: PaloAltoNetworks.paloaltonetworks
tasks:
- name: tasks will run now
panos_op:
#ip_address: '{{ ip_address }}'
# username: '{{ username }}'
password: '{{ password }}'
cmd: 'show system info'
Ansible.cfg output######################
inventory=./hosts
roles_path=./roles
interpreter_python=/home/user/venv/bin/python
#[ssh_connection]
#ssh_args = -o ControlMaster=no
#host_key_checking = False
Hosts file output########
[PA]
10.x.x.x ansible_connection=ssh ansible_user=user
debug output -vvv and error#########
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
task path: /home/user/file.yml:1
<10.x.x.x> ESTABLISH SSH CONNECTION FOR USER: user
<10.x.x.x> 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 'User="user"' -o ConnectTimeout=10 -o ControlPath=/home/user/.ansible/cp/7935e2xxx 10.x.x.x '/bin/sh -c '"'"'echo ~user && sleep 0'"'"''
<10.x.x.x> (255, b'', b'This system is the property of xyz. Unauthorized use may result in penalties including, but not limited to, reprimand, dismissal, financial penalties, and legal action.\nuser@10.x.x.x: Permission denied (publickey,password,keyboard-interactive).\r\n')
fatal: [10.206.30.36]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: This system is the property of xyz. Unauthorized use may result in penalties including, but not limited to, reprimand, dismissal, financial penalties, and legal action.\nuser@10.x.x.x: Permission denied (publickey,password,keyboard-interactive).",
"unreachable": true
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!