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

preserve same order as inventory manager when using host lookup #55331

Merged
merged 2 commits into from
Apr 18, 2019

Conversation

s-hertel
Copy link
Contributor

SUMMARY

Fixes the inconsistent order between inventory manager and the inventory_hostnames lookup.

Fixes #31735

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/plugins/lookup/inventory_hostnames.py

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. inventory Inventory category needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 15, 2019
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Apr 15, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 15, 2019
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Apr 18, 2019
@bcoca bcoca merged commit afb5e02 into ansible:devel Apr 18, 2019
@DanyC97
Copy link

DanyC97 commented Jun 11, 2019

@bcoca any chance you can cherry pick this into 2.8 and / or 2.7 please ?

s-hertel added a commit to s-hertel/ansible that referenced this pull request Jun 12, 2019
…ble#55331)

* preserve same order as inventory manager when using inventory_hostnames lookup

add a test

* move generic code

(cherry picked from commit afb5e02)
@s-hertel
Copy link
Contributor Author

@DanyC97 I opened a backport PR #57769 for 2.8.

2.7 is critical fixes only at this point.

ndclt pushed a commit to ndclt/ansible that referenced this pull request Jun 13, 2019
…ble#55331)

* preserve same order as inventory manager when using inventory_hostnames lookup

add a test

* move generic code
abadger pushed a commit that referenced this pull request Jun 17, 2019
* preserve same order as inventory manager when using host lookup (#55331)

* preserve same order as inventory manager when using inventory_hostnames lookup

add a test

* move generic code

(cherry picked from commit afb5e02)

* changelog
@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.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. inventory Inventory category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inventory_hostnames lookup by group result ordering is inconsistent with order in groups['some-group']
4 participants