# 2.1 upgrade gather\_subset error

**URL:** <https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595>\
**Category:** Ansible Project\
**Created:** [May 29, 2016, 3:33am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595 "2016-05-29T03:33:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [May 29, 2016, 3:33am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/1 "2016-05-29T03:33:47Z")

</div>

We are trying to upgrade from 1.9 to 2.1. With no changes to so far we get:

`FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: gather_subset"}`

I cannot find any use of gather\_subset in our playbooks or configuration. I also cannot find any notes on this being an issue for upgrading. I see the docs for gathering ([https://docs.ansible.com/ansible/intro\_configuration.html#gathering](https://docs.ansible.com/ansible/intro_configuration.html#gathering)), but why would a default value be invalid?

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [May 29, 2016, 3:41am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/2 "2016-05-29T03:41:07Z")

</div>

I set in ansible.cfg

`gather_subset = all`

And the error is gone. Why would i /need/ to set a value for this? Is this now a required config option? What is used if not specified?

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [May 29, 2016, 4:40am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/3 "2016-05-29T04:40:02Z")

</div>

Well, that did not solve the problem. I had reverted back to 1.9, that’s why it worked. So I’m still stuck. Can’t get past this error when running 2.1.

---

<div class="post-metadata">

**Author:** ![Yannig\_Perre](https://avatars.discourse-cdn.com/v4/letter/y/5fc32e/32.png) [@Yannig\_Perre](https://forum.ansible.com/u/Yannig_Perre)\
**Post date:** [May 30, 2016, 1:21pm UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/4 "2016-05-30T13:21:41Z")

</div>

gather\_subset is a new option to restrict gathered facts. By default, Ansible use all keyword. I think you are facing a problem after upgrading Ansible. How have you done your installation? Using pip/yum/source?

Regards,

Yannig

I think you have a problem

---

<div class="post-metadata">

**Author:** ![Dragan\_Milchevski](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Dragan\_Milchevski](https://forum.ansible.com/u/Dragan_Milchevski)\
**Post date:** [May 30, 2016, 4:12pm UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/5 "2016-05-30T16:12:14Z")

</div>

If you checked-out ansible from github, you need to do git submodule update --init --recursive.  
I had the same problem with ansible 2.2.0 and after the submodule update the problem was gone.

Read more here: [https://github.com/ansible/ansible](https://github.com/ansible/ansible)

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [June 4, 2016, 2:29am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/6 "2016-06-04T02:29:34Z")

</div>

Thanks Dragan! That did it.

---

<div class="post-metadata">

**Author:** ![Ibrahim\_Awwal](https://avatars.discourse-cdn.com/v4/letter/i/3be4f8/32.png) [@Ibrahim\_Awwal](https://forum.ansible.com/u/Ibrahim_Awwal)\
**Post date:** [June 9, 2016, 1:43am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/7 "2016-06-09T01:43:14Z")

</div>

I installed ansible 2.1 through pip and am getting the same error, how can I go about solving it? I also tried upgrading all my pip packages using this one-liner: [http://stackoverflow.com/a/3452888/90551](http://stackoverflow.com/a/3452888/90551) but still no luck…

---

<div class="post-metadata">

**Author:** ![Ibrahim\_Awwal](https://avatars.discourse-cdn.com/v4/letter/i/3be4f8/32.png) [@Ibrahim\_Awwal](https://forum.ansible.com/u/Ibrahim_Awwal)\
**Post date:** [June 9, 2016, 3:23am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/8 "2016-06-09T03:23:17Z")

</div>

I had the same issue with pip installed ansible. Turned out it was because someone else had also installed ansible through apt, and it was looking in /usr/share/ansible for modules, which was picking up the outdated apt versions. Removing the apt installed ansible fixed my issue. Reporting this for others who run into the same issue.

---

<div class="post-metadata">

**Author:** ![Ayushi\_jain](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@Ayushi\_jain](https://forum.ansible.com/u/Ayushi_jain)\
**Post date:** [August 3, 2016, 3:31pm UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/9 "2016-08-03T15:31:37Z")

</div>

I recently upgraded to ansible 2.1 from 1.9.1 in our development environment. I use virtualenv to install ansible 2.1 using pip. Recently while running the playbook, I got this error:

```auto
fatal: [xxxxx-dev.com]: FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: gather_subset"}

```

I see that in Ansible 2.1, they have added a new capability to gather limited facts about hosts but by default it sets [gather\_subset](http://docs.ansible.com/ansible/intro_configuration.html#gathering) to all. Thus, I have not set this value in my config file and expect it to default to all.

This failure happened only once and the subsequent runs were successful. I also read here that if ansible is installed separately through apt as well, it may cause issues but since I’m using venv, I’d assume that it will be forced to use version 2.1. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![Ayushi\_jain](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@Ayushi\_jain](https://forum.ansible.com/u/Ayushi_jain)\
**Post date:** [August 8, 2016, 3:22pm UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/10 "2016-08-08T15:22:45Z")

</div>

After struggling for two days, I finally understand why it was failing.

The reason was that I had a default configuration setting in ansible.cfg that was making ansible pick up system ansible libraries from /usr/share/ansible instead of virtualenv where we were installing the libraries. The system ansible libraries were outdated on the host we were running the playbook on, thus causing failure. I removed the setting to ensure ansible picks up latest modules installed in venv only.

---

<div class="post-metadata">

**Author:** ![Ashish\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Ashish\_Jain](https://forum.ansible.com/u/Ashish_Jain)\
**Post date:** [August 18, 2016, 11:17am UTC](https://forum.ansible.com/t/2-1-upgrade-gather-subset-error/21595/11 "2016-08-18T11:17:19Z")

</div>

I was also facing a similar issue post ansible upgrade, removing /usr/share/ansible helped me.
