# Ansible apt module question (Repository issues)

**URL:** <https://forum.ansible.com/t/ansible-apt-module-question-repository-issues/31351>\
**Category:** Ansible Project\
**Created:** [September 24, 2019, 1:54pm UTC](https://forum.ansible.com/t/ansible-apt-module-question-repository-issues/31351 "2019-09-24T13:54:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias\_Klenota](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@Tobias\_Klenota](https://forum.ansible.com/u/Tobias_Klenota)\
**Post date:** [September 24, 2019, 1:54pm UTC](https://forum.ansible.com/t/ansible-apt-module-question-repository-issues/31351/1 "2019-09-24T13:54:26Z")

</div>

Hi,

i,m getting the “public key is not avaiable” error while using the apt module.(installing zabbix agent)  
I know i could just add the key, but my question is:

Why does this error occure while im using ansible and its apt-module, but if i log into the server directly and use apt install i wont get any errors?  
Shouldn’t this be exactly the same or whats the difference?

kind regards

---

<div class="post-metadata">

**Author:** ![Tobias\_Klenota](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@Tobias\_Klenota](https://forum.ansible.com/u/Tobias_Klenota)\
**Post date:** [September 26, 2019, 6:36am UTC](https://forum.ansible.com/t/ansible-apt-module-question-repository-issues/31351/2 "2019-09-26T06:36:55Z")

</div>

Solved, it was just because ansible does a apt-update before installing an package.
