# apt module behavior

**URL:** <https://forum.ansible.com/t/apt-module-behavior/23473>\
**Category:** Ansible Project\
**Created:** [January 17, 2017, 9:42am UTC](https://forum.ansible.com/t/apt-module-behavior/23473 "2017-01-17T09:42:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Schaefer](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Igor\_Schaefer](https://forum.ansible.com/u/Igor_Schaefer)\
**Post date:** [January 17, 2017, 9:42am UTC](https://forum.ansible.com/t/apt-module-behavior/23473/1 "2017-01-17T09:42:41Z")

</div>

Hello, colleagues

Sure, all you know the situation, when you install a new version of package and you get a dialog window with warnings like “use existing version of config file or replace it with new one” or “that your lovely function is depricated now, make a note of this”, etc.  
I’d like to know, what’s apt module’s behavior in such situation? What will its answer to this warnings?

---

<div class="post-metadata">

**Author:** ![alexey.vazhnov](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@alexey.vazhnov](https://forum.ansible.com/u/alexey.vazhnov)\
**Post date:** [January 18, 2017, 7:06am UTC](https://forum.ansible.com/t/apt-module-behavior/23473/2 "2017-01-18T07:06:19Z")

</div>

Ansible set DEBIAN\_FRONTEND=noninteractive, so no any dialog.

---

<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:** [January 18, 2017, 7:36am UTC](https://forum.ansible.com/t/apt-module-behavior/23473/3 "2017-01-18T07:36:17Z")

</div>

tis 2017-01-17 klockan 01:42 -0800 skrev Igor Schaefer:

> Sure, all you know the situation, when you install a new version of  
> package and you get a dialog window with warnings like "use existing  
> version of config file or replace it with new one" or "that your  
> lovely function is depricated now, make a note of this", etc.  
> I'd like to know, what's apt module's behavior in such situation?  
> What will its answer to this warnings?

Ansible defaults to keeping the old/existing config files.

See [https://docs.ansible.com/ansible/apt\_module.html](https://docs.ansible.com/ansible/apt_module.html) and  
the dpkg\_options parameter for the technical details.

Regarding other questions I guess that depends on their origin. In most  
cases I assume they come from debconf, in which case they are hidden by  
DEBIAN\_FRONTEND=noninteractive (as mentioned by Alexey).

// Andreas

---

<div class="post-metadata">

**Author:** ![Igor\_Schaefer](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Igor\_Schaefer](https://forum.ansible.com/u/Igor_Schaefer)\
**Post date:** [January 20, 2017, 3:31am UTC](https://forum.ansible.com/t/apt-module-behavior/23473/4 "2017-01-20T03:31:38Z")

</div>

Спасибо!  
А где можно изменить этот параметр? Я не нашел его в /etc/ansible/ansible.cfg

---

<div class="post-metadata">

**Author:** ![Igor\_Schaefer](https://avatars.discourse-cdn.com/v4/letter/i/a4c791/32.png) [@Igor\_Schaefer](https://forum.ansible.com/u/Igor_Schaefer)\
**Post date:** [January 20, 2017, 3:36am UTC](https://forum.ansible.com/t/apt-module-behavior/23473/5 "2017-01-20T03:36:22Z")

</div>

Thank you for paying my attention to the Ansible documentation. I read it but didn’t get the dpkg\_options
