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

Allow customization of hostname source for azure_rm inventory plugin to enable awx adoption of plugin #54065

Closed
kdelee opened this issue Mar 19, 2019 · 8 comments
Labels
affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. support:community This issue/PR relates to code supported by the Ansible community.

Comments

@kdelee
Copy link
Member

kdelee commented Mar 19, 2019

SUMMARY

Currently, the appending of a hashed set of characters to the end of host names brought in by the azure_rm inventory plugin is considered a breaking change by awx developers because it would break the use of host limits on any playbooks (they would no longer match).

This happens here:

# Azure often doesn't provide a globally-unique filename, so use resource name + a chunk of ID hash
self.default_inventory_hostname = '{0}_{1}'.format(vm_model['name'], hashlib.sha1(to_bytes(vm_model['id'])).hexdigest()[0:4])

It is mentioned in the source code and implemented in other plugins to enable customization of the source of the hostname:

# FUTURE: configurable hostname sources
return host.default_inventory_hostname

e.g. we would like a feature that let us pass in a hostvar we would like to use as the host name.

ISSUE TYPE
  • Bug Report
  • Feature Idea
COMPONENT NAME

azure_rm inventory plugin

ANSIBLE VERSION

devel

@AlanCoding this is the issue we discussed that we need to enable azure plugin

@ansibot
Copy link
Contributor

ansibot commented Mar 19, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Mar 19, 2019
@AlanCoding
Copy link
Member

Proposed fix at #54060

This needs an additional patch as well.

@bcoca bcoca added feature This issue/PR relates to a feature request. and removed bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. labels Mar 20, 2019
@AlanCoding
Copy link
Member

AlanCoding commented Mar 20, 2019

Link second patch needed #54074

@AlanCoding
Copy link
Member

AlanCoding commented Mar 20, 2019

Link alternative for second patch #54099

This means that, in order to resolve this, #54060 is needed in conjunction with either #54099 OR #54074

@AlanCoding
Copy link
Member

Update - #54060 and #54099 are needed

@AlanCoding
Copy link
Member

The other one was merged, so only #54060 is needed now.

@AlanCoding
Copy link
Member

This is resolved

issue can be closed

@abadger
Copy link
Contributor

abadger commented Mar 26, 2019

#54060 merged, closing this issue

@abadger abadger closed this as completed Mar 26, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

No branches or pull requests

5 participants