Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: $ ansible -m ping bol-racsalud-901 -i inventory/hosts -vvvv ansible 2.4.0.0 config file = /home/jortia/ansible/ansible.cfg configured module search path = [u'/home/jortia/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.6/site-packages/ansible executable location = /usr/bin/ansible python version = 2.6.6 (r266:84292, Aug 18 2016, 08:36:59) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] Using /home/jortia/ansible/ansible.cfg as config file setting up inventory plugins Parsed /home/jortia/ansible/inventory/hosts inventory source with ini plugin Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.6/site-packages/ansible/plugins/callback/__init__.pyc META: ran handlers ERROR! ansible-vault requires either the cryptography library (preferred) or a newer version of pycrypto in order to function. $ rpm -qi python-crypto Name : python-crypto Relocations: (not relocatable) Version : 2.0.1 Vendor: Oracle America Release : 22.el6 Build Date: sáb 20 nov 2010 16:40:43 CET Install Date: jue 08 jun 2017 15:53:41 CEST Build Host: ca-build19.us.oracle.com Group : Development/Libraries Source RPM: python-crypto-2.0.1-22.el6.src.rpm Size : 575118 License: Public Domain Signature : RSA/8, lun 03 ene 2011 21:18:44 CET, Key ID 72f97b74ec551f03 URL : http://www.amk.ca/python/code/crypto.html Summary : Cryptography library for Python Description : Python-crypto is a collection of both secure hash functions (such as MD5 and SHA), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.). $ rpm -qi python-crypto2.6 Name : python-crypto2.6 Relocations: (not relocatable) Version : 2.6.1 Vendor: Fedora Project Release : 2.el6 Build Date: vie 13 feb 2015 22:23:34 CET Install Date: jue 08 jun 2017 16:05:53 CEST Build Host: buildvm-20.phx2.fedoraproject.org Group : Development/Libraries Source RPM: python-crypto2.6-2.6.1-2.el6.src.rpm Size : 2339371 License: Public Domain and Python Signature : RSA/8, vie 13 feb 2015 23:12:40 CET, Key ID 3b49df2a0608b895 Packager : Fedora Project URL : http://www.pycrypto.org/ Summary : Cryptography library for Python Description : PyCrypto is a collection of both secure hash functions (such as MD5 and SHA), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.). This package provides the 2.6.x version of PyCrypto $ yum list installed|grep python-crypto python-crypto.x86_64 2.0.1-22.el6 @public_ol6_latest python-crypto2.6.x86_64 2.6.1-2.el6 @epel Version-Release number of selected component (if applicable): ansible-2.4.0.0-2.el6.noarch python-crypto-2.0.1-22.el6.x86_64 python-crypto2.6-2.6.1-2.el6.x86_64 Additional info: This is in a Sun Ray server (Oracle Linux 6): $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.9 (Santiago) $ cat /etc/oracle-release Oracle Linux Server release 6.9 Upstream bug: https://github.com/ansible/ansible/issues/31169
I still intend to get this working for you, but the upstream bug has been closed. Do you still want to persue this?
(In reply to Kevin Fenzi from comment #1) > I still intend to get this working for you, but the upstream bug has been > closed. > > Do you still want to persue this? It would be great if it can be done. We use this Oracle Linux 6 to run all our ansible playbooks. If the RHEL6 family is no longer supported we'll be forced to upgrade this box to RHEL7 (not a problem).
Can you try this version: https://koji.fedoraproject.org/koji/taskinfo?taskID=22814193 I think I found the issue and fixed it.
ansible-2.4.1.0-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f1f4d9585b
ansible-2.4.1.0-2.el6 works fine with my playbooks using vaults. Thank you.
ansible-2.4.1.0-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
I still have a problem with the nevest ansible [root@dec ~]# yum list installed|grep python-crypto python-crypto.x86_64 2.0.1-22.el6 @anaconda-CentOS-201303020151.x86_64/6.4 python-crypto2.6.x86_64 2.6.1-2.el6 @epel [root@dec ~]# yum list installed|grep ansible ansible.noarch 2.5.3-1.el6 @epel [root@dec ~]# [bogucki@dec deployment]$ ansible-vault encrypt group_vars/vault-asseco-prd.yml New Vault password: Confirm New Vault password: ERROR! ansible-vault requires either the cryptography library (preferred) or a newer version of pycrypto in order to function. [bogucki@dec deployment]$
huh, and you are sure thats the ansible-vault from that rpm? which -a ansible-vault and 'rpm -qf /usr/bin/ansible-vault' and 'ansible-vault --version' output please?
I'm sure. [bogucki@dec ~]$ which -a ansible-vault /usr/bin/ansible-vault [bogucki@dec ~]$ rpm -qf /usr/bin/ansible-vault ansible-2.5.3-1.el6.noarch [bogucki@dec ~]$ ansible-vault --version ansible-vault 2.5.3 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/bogucki/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.6/site-packages/ansible executable location = /usr/bin/ansible-vault python version = 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] [bogucki@dec ~]$
What about rpm -V ansible and rpm -V python-crypto2.6 ?
I can't get it to duplicate here... [kevin@el6-test ~][PROD]$ ansible-vault create foobar New Vault password: Confirm New Vault password: [kevin@el6-test ~][PROD]$ ansible-vault decrypt foobar Vault password: Decryption successful [kevin@el6-test ~][PROD]$ cat /etc/redhat-release CentOS release 6.9 (Final) [kevin@el6-test ~][PROD]$ rpm -q ansible ansible-2.5.3-1.el6.noarch [kevin@el6-test ~][PROD]$ ansible-vault --version ansible-vault 2.5.3 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/fedora/kevin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.6/site-packages/ansible executable location = /usr/bin/ansible-vault python version = 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] Can you try running it with -vvvv and see if it gives any more info/clues?
It must be something on my computer. In the new chroot it works ;) mkdir -p /opt/chroot-centos-6 rpm -ivh --root=/opt/chroot-centos-6 --nodeps http://rpmfind.net/linux/centos/6.9/os/x86_64/Packages/centos-release-6-9.el6.12.3.x86_64.rpm yum --installroot=/opt/chroot-centos-6 install bash rpm -ivh --root=/opt/chroot-centos-6 http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum --installroot=/opt/chroot-centos-6 install ansible mount --bind /dev /opt/chroot-centos-6/dev chroot /opt/chroot-centos-6/ bash bash-4.1# ansible-vault encrypt /tmp/vault-asseco-prd.yml New Vault password: Confirm New Vault password: Encryption successful bash-4.1# I'm sorry for wasting You time!
Not a problem at all... I am curious what the issue is though. Please let us know if you find it...