You don't make it particularly easy for to help you by not providing a
playbook, or details about the host you're trying to manage.
But, there are a few bits of information buried in that error you posted.
Most importantly the string 'amzn' in one of the the package names
suggests that you're using an AWS AMI.
I think in that universe the package you're after is called "python-devel".


Dick


On Wed, 17 Apr 2019 at 23:33, AQ <anas.qureshi0...@gmail.com> wrote:
>
> still doesn't work:
>
> [test@ip-172-31-1-143 ~]$ ansible webservers -m yum -a 'name=python2-dev 
> state=present' -u test --become --ask-become-pass
> SUDO password:
> 172.31.13.61 | FAILED! => {
>     "changed": false,
>     "failed": true,
>     "msg": "No package matching 'python2-dev' found available, installed or 
> updated",
>     "rc": 126,
>     "results": [
>         "No package matching 'python2-dev' found available, installed or 
> updated"
>     ]
> }
>
>
> On Wednesday, April 17, 2019 at 1:56:16 PM UTC+10, Sascha Andres wrote:
>>
>> Hi,
>>
>> depending on your distribution the packages might have a different name. 
>> Have you tried installing python-dev manually. It might be named python2-dev.
>>
>> Kind regards,
>> Sascha
>>
>> On Tue, Apr 16, 2019 at 11:13 PM AQ <anas.qu...@gmail.com> wrote:
>>>
>>> [test@ip-172-31-1-143 ~]$ ansible-playbook 
>>> /home/test/AQ-Project2/playbook.yml -i /home/test/AQ-Project2/inventory.txt
>>>
>>> PLAY [Deploy a web application] 
>>> ****************************************************************
>>>
>>> TASK [Gathering Facts] 
>>> *************************************************************************
>>> ok: [db_and_web_server]
>>>
>>> TASK [Install dependencies] 
>>> ********************************************************************
>>> failed: [db_and_web_server] (item=[u'python', u'python-setuptools', 
>>> u'python-dev', u'build-essential', u'python-pip', u'python-mysqldb']) => 
>>> {"changed": false, "failed": true, "item": ["python", "python-setuptools", 
>>> "python-dev", "build-essential", "python-pip", "python-mysqldb"], "msg": 
>>> "No package matching 'python-dev' found available, installed or updated", 
>>> "rc": 126, "results": ["python-2.7.14-58.amzn2.0.4.x86_64 providing python 
>>> is already installed", "python2-setuptools-38.4.0-3.amzn2.0.6.noarch 
>>> providing python-setuptools is already installed", "No package matching 
>>> 'python-dev' found available, installed or updated"]}
>>>         to retry, use: --limit @/home/test/Anas-Project2/playbook.retry
>>>
>>> PLAY RECAP 
>>> *************************************************************************************
>>> db_and_web_server          : ok=1    changed=0    unreachable=0    failed=1
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to ansible...@googlegroups.com.
>>> To post to this group, send email to ansible...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/44374cf9-87c5-46e4-bc4e-9017a7543f63%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/7fdfd004-5063-42a5-bf7c-8bf8e6d09a56%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwP2O5a-T8g2YscJzkF%3DstH-v7pq7Rra1r2kd%2BkdKvqGdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to