# change user to a debian package

**URL:** <https://forum.ansible.com/t/change-user-to-a-debian-package/33862>\
**Category:** Ansible Project\
**Created:** [September 22, 2020, 9:10am UTC](https://forum.ansible.com/t/change-user-to-a-debian-package/33862 "2020-09-22T09:10:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johana\_Galarza\_Monta](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@Johana\_Galarza\_Monta](https://forum.ansible.com/u/Johana_Galarza_Monta)\
**Post date:** [September 22, 2020, 9:10am UTC](https://forum.ansible.com/t/change-user-to-a-debian-package/33862/1 "2020-09-22T09:10:14Z")

</div>

I am trying to install a debian pacakge and change the user with become\_user but it seems not working, the error it says that “No package is available” but it is available

- name: Install rules  
apt:  
name:-rules={{ rules\_version }}  
state: present  
become: true  
become\_method: sudo  
become\_user: user

Does anyone know if this is possible?

Thanks!

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [September 22, 2020, 9:16am UTC](https://forum.ansible.com/t/change-user-to-a-debian-package/33862/2 "2020-09-22T09:16:43Z")

</div>

> I am trying to install a debian pacakge and change the user with become\_user but it seems not working, the error it says  
> that "No package is available" but it is available
> 
> - name: Install rules  
> apt:  
> name:-rules={{ rules\_version }}  
> state: present  
> become: true  
> become\_method: sudo  
> become\_user: user
> 
> Does anyone know if this is possible?

You are really sure that this package exists? Is the APT cache up-to-date?

Also usually a regular user can't install APT packages.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke
