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

Ansible docs lack file naming requirements for inventory plugin and plugin does not emit error message #1251

Closed
msitte opened this issue Aug 29, 2023 · 1 comment
Labels
has_pr PR fixes have been made inventory plugin/Inventory/azure_rm.py related issues medium_priority Medium priority

Comments

@msitte
Copy link

msitte commented Aug 29, 2023

SUMMARY
  • The Ansible Documentation for the Azure Resource Manager inventory plugin lacks the key point that the Azure dynamic inventory config file must end with azure_rm and have an extension of either yml or yaml. This is only stated on Microsoft's Tutorial page.
  • The verify_file function does not emit any error message but instead bails out silently, leading to obscure errors. Please add the error message back and change log level from DEBUG to ERROR.
ISSUE TYPE
  • Documentation Report
COMPONENT NAME
  • azure/plugins/doc_fragments/azure.py, requirements section should contain note about the file naming
  • azure/plugins/inventory/azure_rm.py, line 205, make this a proper error message
ANSIBLE VERSION
ansible [core 2.15.3]
  config file = /REDACTED/ansible.cfg
  configured module search path = ['/REDACTED/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /REDACTED/pythonenvs/ansible-devel-2023-08/lib64/python3.9/site-packages/ansible
  ansible collection location = /REDACTED/.ansible/collections:/usr/share/ansible/collections
  executable location = /REDACTED/pythonenvs/ansible-devel-2023-08/bin/ansible
  python version = 3.9.14 (main, Jan  9 2023, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] (/REDACTED/pythonenvs/ansible-devel-2023-08/bin/python3)
  jinja version = 3.1.2
  libyaml = True
@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Nov 23, 2023
@Fred-sun
Copy link
Collaborator

@msitte Thank you very much for your submission. For this, plugin/inventory/azure_rm.yml line 16, Have been standardized the file naming format. In addition, if it does not match, an exception will be raised in the verify_file and an error will be displayed. Please refer to the relevant PR -- #1348 Thank you!

@Fred-sun Fred-sun added inventory plugin/Inventory/azure_rm.py related issues has_pr PR fixes have been made and removed work in In trying to solve, or in working with contributors labels Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr PR fixes have been made inventory plugin/Inventory/azure_rm.py related issues medium_priority Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants