0

When I am trying to run an ansible playbook on the target CUCM, I see below error.

[root@localhost ansibleuser]# ansible-playbook change_cucm_IP.yml -u admin --ask-pass -vvv
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying
the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can become
unstable at any point.
ansible-playbook [core 2.15.0.dev0]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.9.13 (main, Feb 28 2023, 01:40:46) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] (/usr/local/bin/python3.9)
  jinja version = 3.0.0
  libyaml = False
Using /etc/ansible/ansible.cfg as config file
SSH password:
Parsed /etc/ansible/hosts inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: change_cucm_IP.yml **************************************************************************************************
1 plays in change_cucm_IP.yml

PLAY [Change CUCM IP address] *************************************************************************************************

TASK [Stop CUCM services] *****************************************************************************************************
task path: /root/ansibleuser/change_cucm_IP.yml:9
<172.16.25.59> ESTABLISH SSH CONNECTION FOR USER: admin
<172.16.25.59> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="admin"' -o ConnectTimeout=10 -o 'ControlPath="/root/.ansible/cp/9b7f75f9a6"' 172.16.25.59 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /tmp/ansible `"&& mkdir "` echo /tmp/ansible/ansible-tmp-1679396858.900448-24763-94862907347806 `" && echo ansible-tmp-1679396858.900448-24763-94862907347806="` echo /tmp/ansible/ansible-tmp-1679396858.900448-24763-94862907347806 `" ) && sleep 0'"'"''
<172.16.25.59> (1, b'Command Line Interface is starting up, please wait ...\n\n\n\n', b'stty: standard input: Inappropriate ioctl for device\nstty: standard input: Inappropriate ioctl for device\nstty: standard input: Inappropriate ioctl for device\nException in thread "main" java.lang.NumberFormatException: For input string: ""\n\tat java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\n\tat java.lang.Integer.parseInt(Integer.java:592)\n\tat java.lang.Integer.parseInt(Integer.java:615)\n\tat sdMain.initialize(sdMain.java:507)\n\tat sdMain.main(sdMain.java:682)\nstty: standard input: Inappropriate ioctl for device\n')
**<172.16.25.59> Failed to connect to the host via ssh: stty: standard input: Inappropriate ioctl for device**
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:592)
     

type here

   at java.lang.Integer.parseInt(Integer.java:615)
        at sdMain.initialize(sdMain.java:507)
        at sdMain.main(sdMain.java:682)
stty: standard input: Inappropriate ioctl for device
fatal: [target_cucm]: UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo /tmp/ansible `\"&& mkdir \"` echo /tmp/ansible/ansible-tmp-1679396858.900448-24763-94862907347806 `\" && echo ansible-tmp-1679396858.900448-24763-94862907347806=\"` echo /tmp/ansible/ansible-tmp-1679396858.900448-24763-94862907347806 `\" ), exited with result 1, stdout output: Command Line Interface is starting up, please wait ...\n\n\n\n",
    "unreachable": true
}

PLAY RECAP ********************************************************************************************************************
target_cucm                : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0

Ansible control node trying to connect to CUCM and facing an error, "<172.16.25.59> Failed to connect to the host via ssh: stty: standard input: Inappropriate ioctl for device" while expecting successful ssh connection.

Harsha
  • 1
  • 2

0 Answers0