Wednesday, February 28, 2018

Ansible Pbrun Issues

     Permission denied (publickey,password,keyboard-interactive).

    Use flag -vvv to get detailed debug info
                   -k to get into interactive password input

     [WARNING]: Could not match supplied host pattern, ignoring:

    Need to add your hostname into /etc/ansible/hosts
    see github link

     "pbrun9.3.0-07[12461]: Invalid command\r\n", ???

-vvv to get details ssh command
  ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/hxie/.ansible/cp/1369acbeec -tt '/bin/sh -c '"'"'pbrun content -u oracle '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-gfjkhmsxjbzyupwkwnusqvetgeoinkwf; /usr/bin/python /tmp/ansible-tmp-1519878480.59-177960971664277/'"'"'"'"'"'"'"'"' && sleep 0'"'"''

Test run and dig deeper  on the target host for exec command
   debug1: Sending command: /bin/sh -c 'pbrun content -u oracle '"'"'echo BECOME-SUCCESS-gfjkhmsxjbzyupwkwnusqvetgeoinkwf; /usr/bin/python /tmp/ansible-tmp-1519878480.59-177960971664277/'"'"' && sleep 0'
    Got the same error

So it is related how the pbrun server policy is setup. Some pbrun policies do not allow to run ssh command like above. Please contact your pbrun admin

GitHub addressed other similar issue

No comments: