Cannot run ansible on RHEL 7 – Paramiko is not installed
Question:
I have a server running RHEL 7, and I have installed ansible but cannot run a playbook with error saying paramiko is not installed. I have verified that paramiko is installed and also tried to install paramiko using pip but still does not work.
TASK [Show the Connection] **************************************************************************************************************************************************
fatal: [ASA]: FAILED! => {"msg": "paramiko is not installed: No module named paramiko"}
Below are the versions I have:
sh-4.2$ sudo yum install ansible
Package ansible-2.8.5-2.el7ae.noarch already installed and latest version
sh-4.2$ sudo yum install python-paramiko
Package python-paramiko-2.1.1-9.el7.noarch already installed and latest version
sh-4.2$
Answers:
You can try to install paramiko via pip. This is the sequence
# curl -O https://bootstrap.pypa.io/get-pip.py
# python get-pip.py --user
# pip install paramiko
If you have a valid subscription for Red Hat Enterprise Linux, then you can enable the official Red Hat Ansible repository and install it.
To enable the Ansible Engine repository for RHEL 7, run the following command:
$ sudo subscription-manager repos --enable rhel-7-server-ansible-2.8-rpms
On RHEL and CentOS:
$ sudo yum install ansible
This is for the Ansible Engine version (as in: it doesn’t include Ansible Tower).
More information in the official Ansible documentation
I already resolved this issue. We had to add the rhel-7-server-extras-rpms in addition to the already added rhel-7-server-ansible-2.8-rpms and do a yum remove ansible and yum install ansible.
I have a server running RHEL 7, and I have installed ansible but cannot run a playbook with error saying paramiko is not installed. I have verified that paramiko is installed and also tried to install paramiko using pip but still does not work.
TASK [Show the Connection] **************************************************************************************************************************************************
fatal: [ASA]: FAILED! => {"msg": "paramiko is not installed: No module named paramiko"}
Below are the versions I have:
sh-4.2$ sudo yum install ansible
Package ansible-2.8.5-2.el7ae.noarch already installed and latest version
sh-4.2$ sudo yum install python-paramiko
Package python-paramiko-2.1.1-9.el7.noarch already installed and latest version
sh-4.2$
You can try to install paramiko via pip. This is the sequence
# curl -O https://bootstrap.pypa.io/get-pip.py
# python get-pip.py --user
# pip install paramiko
If you have a valid subscription for Red Hat Enterprise Linux, then you can enable the official Red Hat Ansible repository and install it.
To enable the Ansible Engine repository for RHEL 7, run the following command:
$ sudo subscription-manager repos --enable rhel-7-server-ansible-2.8-rpms
On RHEL and CentOS:
$ sudo yum install ansible
This is for the Ansible Engine version (as in: it doesn’t include Ansible Tower).
More information in the official Ansible documentation
I already resolved this issue. We had to add the rhel-7-server-extras-rpms in addition to the already added rhel-7-server-ansible-2.8-rpms and do a yum remove ansible and yum install ansible.