2.1 upgrade gather_subset error

1,906 views
Skip to first unread message

Barry Kaplan

unread,
May 28, 2016, 11:33:47 PM5/28/16
to Ansible Project
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), but why would a default value be invalid?

Barry Kaplan

unread,
May 28, 2016, 11:41:08 PM5/28/16
to Ansible Project
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?

Barry Kaplan

unread,
May 29, 2016, 12:40:03 AM5/29/16
to Ansible Project
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.

Yannig Perre

unread,
May 30, 2016, 9:21:41 AM5/30/16
to Ansible Project
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 

Dragan Milchevski

unread,
May 31, 2016, 8:12:53 AM5/31/16
to Ansible Project
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. 

Barry Kaplan

unread,
Jun 3, 2016, 10:29:35 PM6/3/16
to Ansible Project
Thanks Dragan! That did it. 

Ibrahim Awwal

unread,
Jun 9, 2016, 1:36:43 PM6/9/16
to Ansible Project
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 but still no luck...

Ibrahim Awwal

unread,
Jun 9, 2016, 1:36:43 PM6/9/16
to Ansible Project
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.

Ayushi jain

unread,
Aug 3, 2016, 1:52:02 PM8/3/16
to Ansible Project

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:

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 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.

Ayushi jain

unread,
Aug 8, 2016, 11:24:04 AM8/8/16
to Ansible Project

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.


Ashish Jain

unread,
Aug 18, 2016, 12:41:38 PM8/18/16
to Ansible Project
I was also facing a similar issue post ansible upgrade, removing /usr/share/ansible helped me.
Reply all
Reply to author
Forward
0 new messages