# apt module to support --no-install-recommends

**URL:** <https://forum.ansible.com/t/apt-module-to-support-no-install-recommends/11648>\
**Category:** Ansible Project\
**Created:** [July 6, 2012, 4:33pm UTC](https://forum.ansible.com/t/apt-module-to-support-no-install-recommends/11648 "2012-07-06T16:33:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Sankauskas](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@Peter\_Sankauskas](https://forum.ansible.com/u/Peter_Sankauskas)\
**Post date:** [July 6, 2012, 4:33pm UTC](https://forum.ansible.com/t/apt-module-to-support-no-install-recommends/11648/1 "2012-07-06T16:33:52Z")

</div>

Hi,

I would like to add an option to the apt module so that is supports the very handy option: --no-install-recommends

By default, apt automatically installs recommended packages, but not suggested packages. Usually, this is fine, but when it comes to anything Java related, the number of recommended packages explodes.

The apt module line could look like this:

> action: apt pkg=openjdk-6-jdk state=latest install-recommends=false

with the default being install-recommends=true so it acts the same way it does now.

Thoughts?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 6, 2012, 4:37pm UTC](https://forum.ansible.com/t/apt-module-to-support-no-install-recommends/11648/2 "2012-07-06T16:37:42Z")

</div>

Sounds reasonable.

Ansible standardizes on yes/no versus True, False, so just make that part consistent…

---

<div class="post-metadata">

**Author:** ![Peter\_Sankauskas](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@Peter\_Sankauskas](https://forum.ansible.com/u/Peter_Sankauskas)\
**Post date:** [July 6, 2012, 5:00pm UTC](https://forum.ansible.com/t/apt-module-to-support-no-install-recommends/11648/3 "2012-07-06T17:00:02Z")

</div>

OK, will do.

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Sankauskas](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@Peter\_Sankauskas](https://forum.ansible.com/u/Peter_Sankauskas)\
**Post date:** [July 6, 2012, 7:14pm UTC](https://forum.ansible.com/t/apt-module-to-support-no-install-recommends/11648/4 "2012-07-06T19:14:56Z")

</div>

PR here:  
[https://github.com/ansible/ansible/pull/546](https://github.com/ansible/ansible/pull/546)

Please let me know if you have any feedback.

I have tested it with defaults, with “yes” and with “no”, and all do what they are suppose to.

Peter
