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

compose inventory_hostname #1080

Merged
merged 1 commit into from
Dec 3, 2020
Merged

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Nov 27, 2020

Fixes: #1070

for host in self._get_hosts():
if host.get('name'):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this looks like a big change in the diff, it's actually just mostly re-indenting the code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took me a while to comprehend that ;)

@evgeni
Copy link
Member Author

evgeni commented Nov 27, 2020

this is inspired by the vmware inventory, which supports similar composition

@nesanton
Copy link
Contributor

fwiw lgtm

user: ansibleinventory
password: changeme
hostnames:
- name.split('.')[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never seen companies putting dots in shortnames. Oh wait ...

@evgeni evgeni merged commit b568c3c into theforeman:develop Dec 3, 2020
@evgeni evgeni deleted the compose-hostname branch December 3, 2020 10:57
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.

Option to import hosts with hostname/shortname only
2 participants