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?
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?
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.
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
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
Thanks Dragan! That did it.
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…
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.
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.
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.
I was also facing a similar issue post ansible upgrade, removing /usr/share/ansible helped me.