if one package fails all other non dependent packages installation fails in ansible

TASK [get python-yum and python-curl] *************************************************************************************************************************************
…ignoring
failed: [192.168.211.131] (item=[u’python-pycurl’, u’git’, u’curl’, u’php5-common’, u’php5-cli’, u’php5-mysql’, u’php5-curl’, u’php5-gd’, u’php5-dev’, u’php5-mcrypt’, u’php-apc’, u’php-pear’, u’python-mysqldb’, u’mysql-server’]) => {“changed”: false, “failed”: true, “item”: [“python-pycurl”, “git”, “curl”, “php5-common”, “php5-cli”, “php5-mysql”, “php5-curl”, “php5-gd”, “php5-dev”, “php5-mcrypt”, “php-apc”, “php-pear”, “python-mysqldb”, “mysql-server”], “msg”: “No package matching ‘php5-common’ found available, installed or updated”, “rc”: 126, “results”: [“python-pycurl-7.19.0-17.el7.x86_64 providing python-pycurl is already installed”, “git-1.8.3.1-5.el7.x86_64 providing git is already installed”, “curl-7.29.0-25.el7.centos.x86_64 providing curl is already installed”, “No package matching ‘php5-common’ found available, installed or updated”]}

<snip />

That's by design, this is one task and Ansible fails a entire task and not
just part of it.
If you need that feature you need to split it up in several tasks.