• Diniz Martins

Ansible | Some issues

In this post I want to share with you some problems that I was facing and that I managed to fix by searching on Google, making debugs and talking with friends.

#1) Problem to connect to devices using playbook:

fatal: [XXX]: 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. 
    "unreachable": true

Workaround: type those commands into your ansible:

mv /usr/bin/sleep /usr/bin/sleep.dist
ln -s /bin/true /usr/bin/sleep

#2) Problem to connect to devices with crypto:

"msg": "p must be exactly 1024, 2048, or 3072 bits long"

Workaround: Try this commands below:

ssh -o HostKeyAlgorithms=ssh-dss -c aes256-cbc login@ip-address

Inside the host file, insert:

ansible_ssh_common_args="-o HostKeyAlgorithms=ssh-dss -c aes256-cbc"

Make sure your router is using the same encryption as you are sending!

#3) Problem with ssh service:

root@DRM:/etc/ansible# service ssh status
 * sshd is not running

Workaround: Try to restart the process.

root@DRM:/etc/ansible# sudo service ssh start
 * Starting OpenBSD Secure Shell server sshd   
 [ OK ]
root@DRM:/etc/ansible# service ssh status
 * sshd is running

#4) Packages and commands to installation and complete operation of Ansible:


sudo apt install ansible
sudo apt-add-repository ppa:ansible/ansible
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
pip install ansible-lint


apt install python3-pip
/usr/bin/python -m pip install --upgrade pip
sudo apt-get install python-setuptools
apt install -y python python3-pip sshpass tree
apt install python-cryptography


apt install paramiko
pip3 install scrapy
apt install sshpass
apt full-upgrade

33 views0 comments

Recent Posts

See All

BF | Brainfuck

Brainfuck is an esoteric programming language created in 1993 by Urban Müller. Notable for its extreme minimalism, the language consists of only eight simple commands and an instruction pointer. While


This tool is design to find Admin Panel of any website by using custom wordlist or default wordlist easily. Grab the result and paste to your web browser: How to install: Usages: -site <url of website

BAP – Basic Auth Pot | HoneyPot

What is a honeypot? A honeypot is a computer or computer system intended to mimic likely targets of cyberattacks. It can be used to detect attacks or deflect them from a legitimate target. It can also