Apparently you need to get the source from GitHub and compile it instead of yum.
Follow the official procedure below to carry out the work. http://docs.ansible.com/ansible/intro_installation.html#running-from-source
An error occurred with the following command. .. ..
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six
gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param= ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -pipe -Wall -Wp,-D_FORTIFY_SOURC E=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOU RCE -fPIC -fwrapv -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.7 -c src/MD2.c -o build/temp.lin ux-x86_64-2.7/src/MD2.o
src/MD2.c:31:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-DJuN7X/pycrypto/setup.py';exec(compile (getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c G6Sjn-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-buil d-DJuN7X/pycrypto
When I looked it up, it seems that the cause is that there is no python develop tool. So
$ sudo yum install python-devel
When I executed the same command after installing the above package, it ended normally. Subsequent work could be carried out as it was without any errors.
Check the version and there seems to be no problem
$ ansible --version
ansible 2.0.0
config file =
configured module search path = Default w/o overrides
$ echo "127.0.0.1" > ~/ansible_hosts
$ ansible all -m ping --ask-pass
SSH password:
127.0.0.1 | FAILED! => {
"failed": true,
"msg": "ERROR! to use the 'ssh' connection type with passwords, you must ins tall the sshpass program"
}
That is an error. He asked me to put in an ssh pass. Then let's do exactly that.
$ sudo rpm -ivh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
$ sudo yum install sshpass
$ ansible all -m ping --ask-pass
SSH password:
127.0.0.1 | SUCCESS => {
"changed": false,
"ping": "pong"
}
Oh, I was able to communicate. Then, execute the find command that you wanted to use last.
$ ansible all -m find -a "paths=." --ask-pass
SSH password:
127.0.0.1 | SUCCESS => {
"changed": false,
"examined": 10,
"files": [
{
"atime": 1448404038.6609726,
"ctime": 1448403725.0179846,
"dev": 64769,
"gid": 1000,
"inode": 611328,
"isblk": false,
"ischr": false,
"isdir": false,
"isfifo": false,
"isgid": false,
"islnk": false,
"isreg": true,
"issock": false,
"isuid": false,
"mode": "0664",
"mtime": 1448403725.0179846,
"nlink": 1,
"path": "ansible_hosts",
"rgrp": true,
"roth": true,
"rusr": true,
"size": 10,
"uid": 1000,
"wgrp": true,
"woth": false,
"wusr": true,
"xgrp": false,
"xoth": false,
"xusr": false
}
],
"matched": 1,
"msg": ""
}
The file information was successfully acquired.
After all, considering the dependency, it is easy to put it in yum. However, there is no choice but to do this kind of work temporarily because the latest functions are not provided.