Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: fatal: [localhost]: FAILED! => {"reason": "couldn't resolve module/action 'mount'. #77

Closed
yizhanglinux opened this issue Mar 30, 2020 · 9 comments

Comments

@yizhanglinux
Copy link
Collaborator

yizhanglinux commented Mar 30, 2020

Observed this error when I use the latest ansible, but cannot reproduce it with ansible 2.9.6, pls help check it.

[root@storageqe-62 storage]# ansible-playbook -i inventory tests/tests_default.yml
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.

PLAY [Ensure that the role runs with default parameters] ******************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [storage : Set version specific variables] ***************************************************************************************************************************************************************************************************************************************************************************
ok: [localhost] => (item=/root/storage/vars/RedHat-8.yml)

TASK [storage : define an empty list of pools to be used in testing] ******************************************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [storage : define an empty list of volumes to be used in testing] ****************************************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [storage : include the appropriate provider tasks] *******************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"reason": "couldn't resolve module/action 'mount'. This often indicates a misspelling, missing collection, or incorrect module path.\n\nThe error appears to be in '/root/storage/tasks/main-blivet.yml': line 132, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n#\n- name: manage mounts to match the specified state\n ^ here\n"}

PLAY RECAP ****************************************************************************************************************************************************************************************************************************************************************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

[root@storageqe-62 storage]# ansible --version
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.
ansible 2.10.0.dev0
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible_base-2.10.0.dev0-py3.6.egg/ansible
executable location = /usr/local/bin/ansible
python version = 3.6.8 (default, Dec 5 2019, 15:45:45) [GCC 8.3.1 20191121]

@dwlehman
Copy link
Collaborator

There was a big recent change in upstream ansible which moved most of the previously-standard modules out to a separate repository.

Further info:

https://groups.google.com/forum/#!msg/ansible-devel/oKqgCeYTs-M/cHrOgMw8CAAJ
https://github.com/ansible-collections/overview/blob/master/README.rst

@pcahyna
Copy link
Member

pcahyna commented Mar 30, 2020

mount should be in the posix collection.

@yizhanglinux
Copy link
Collaborator Author

Thanks, do we have plan to fix it on storage role?

@pcahyna
Copy link
Member

pcahyna commented Apr 2, 2020

We will handle those issues consistently in all system roles. But, AFAIK, there will be an Ansible distribution that will behave exactly as now, so nothing will need to be fixed. I don't know whether it is already available.
For now, can you please try importing the posix collection in your playbook before calling the storage role?

@yizhanglinux
Copy link
Collaborator Author

We will handle those issues consistently in all system roles. But, AFAIK, there will be an Ansible distribution that will behave exactly as now, so nothing will need to be fixed. I don't know whether it is already available.
For now, can you please try importing the posix collection in your playbook before calling the storage role?

Sure, but currently I'm not familiar with it, could you tell me how to import it? we can take the bellow case as an example, thanks.
https://github.com/linux-system-roles/storage/blob/master/tests/tests_default.yml

@yizhanglinux
Copy link
Collaborator Author

We will handle those issues consistently in all system roles. But, AFAIK, there will be an Ansible distribution that will behave exactly as now, so nothing will need to be fixed. I don't know whether it is already available.
For now, can you please try importing the posix collection in your playbook before calling the storage role?

Sure, but currently I'm not familiar with it, could you tell me how to import it? we can take the bellow case as an example, thanks.
https://github.com/linux-system-roles/storage/blob/master/tests/tests_default.yml

When I use posix collection in my playbook, found one issue for the mount module, I've filed bellow issue to track it.

ansible-collections/ansible.posix#21

@pcahyna
Copy link
Member

pcahyna commented May 5, 2020

Thank you for investigating this issue and reporting it, and sorry for not providing advice on transitioning to collections, I have not really started this transition myself.

@yizhanglinux
Copy link
Collaborator Author

The ansible.posix issue was fixed now.

@yizhanglinux yizhanglinux changed the title fatal: [localhost]: FAILED! => {"reason": "couldn't resolve module/action 'mount'. storage: fatal: [localhost]: FAILED! => {"reason": "couldn't resolve module/action 'mount'. Jul 6, 2020
@japokorn
Copy link
Contributor

japokorn commented Oct 1, 2020

I am closing this issue because it is already resolved.

@japokorn japokorn closed this as completed Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants