# python-apt not seend from ansible

**URL:** <https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219>\
**Category:** Ansible Project\
**Created:** [July 31, 2018, 10:38pm UTC](https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219 "2018-07-31T22:38:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![realtebo](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@realtebo](https://forum.ansible.com/u/realtebo)\
**Post date:** [July 31, 2018, 10:38pm UTC](https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219/1 "2018-07-31T22:38:23Z")

</div>

I have python and python-apt.

```auto

$ python -V Python 2.7.15rc1
$ pip list 
... cut ...
python-apt (1.6.2)
... cut ...

```

```auto
But I am facing this error

```

```auto

```

---

<div class="post-metadata">

**Author:** ![Andreas\_Olsson](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Andreas\_Olsson](https://forum.ansible.com/u/Andreas_Olsson)\
**Post date:** [August 1, 2018, 3:14am UTC](https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219/2 "2018-08-01T03:14:12Z")

</div>

tis 2018-07-31 klockan 15:38 -0700 skrev realtebo:

> I have python and python-apt.
> 
> $ python -V Python 2.7.15rc1  
> $ pip list  
> ... cut ...  
> python-apt (1.6.2)  
> ... cut ...
> 
> But I am facing this error
> 
> $ ansible openvpn -C -m "apt update-cache=yes"  
> 192.168.1.225 | FAILED! =\> {  
> &nbsp;&nbsp;&nbsp;&nbsp;"changed": false,  
> &nbsp;&nbsp;&nbsp;&nbsp;"msg": "python-apt must be installed to use check mode. If run  
> normally this module can auto-install it."}
> 
> \*Which can be the reason and how to fix?\*

Does 192.168.1.225 have python-apt installed?

// Andreas

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [August 1, 2018, 6:04am UTC](https://forum.ansible.com/t/python-apt-not-seend-from-ansible/28219/3 "2018-08-01T06:04:49Z")

</div>

If you check "ansible -h" you'll see that -m takes the module name and -a takes the arguments,

&nbsp;&nbsp;&nbsp;ansible openvpn -C -m apt -a "update-cache=yes"
