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

Extend doc fragment from base constructed class to fix error #364

Merged
merged 2 commits into from
Dec 16, 2020

Conversation

AlanCoding
Copy link
Contributor

SUMMARY

This resolves an error I get about an undefined option, and it follows the pattern from other inventory plugins, like aws_ec2

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/inventory/azure_rm.py

ADDITIONAL INFORMATION

this is the error before the patch:

[WARNING]:  * Failed to parse /home/alancoding/repos/awx/testing/awx_75_ug7azj7k/azure_rm.yml with auto plugin: 'Requested
entry (plugin_type: inventory plugin: ansible_collections.azure.azcollection.plugins.inventory.azure_rm setting:
leading_separator ) was not defined in configuration.'
  File "/home/alancoding/repos/ansible/lib/ansible/inventory/manager.py", line 290, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/home/alancoding/repos/ansible/lib/ansible/plugins/inventory/auto.py", line 58, in parse
    plugin.parse(inventory, loader, path, cache=cache)
  File "/home/alancoding/.ansible/collections/ansible_collections/azure/azcollection/plugins/inventory/azure_rm.py", line 206, in parse
    self._get_hosts()
  File "/home/alancoding/.ansible/collections/ansible_collections/azure/azcollection/plugins/inventory/azure_rm.py", line 290, in _get_hosts
    self._add_host_to_keyed_groups(constructable_config_keyed_groups, h.hostvars, inventory_hostname, strict=constructable_config_strict)
  File "/home/alancoding/repos/ansible/lib/ansible/plugins/inventory/__init__.py", line 446, in _add_host_to_keyed_groups
    if prefix == '' and self.get_option('leading_separator') is False:
  File "/home/alancoding/repos/ansible/lib/ansible/plugins/__init__.py", line 60, in get_option
    raise KeyError(to_native(e))

Then with the patch it successfully completes.

@azure-pipelines
Copy link

There was an error handling pipeline event 42ca79ef-f80f-4521-b1f7-316c5bb63c1f.

@haiyuazhang haiyuazhang merged commit 3dc5dd3 into ansible-collections:dev Dec 16, 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

Successfully merging this pull request may close these issues.

2 participants