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

Strip whitespace when reading limit file #53564

Merged
merged 1 commit into from Mar 18, 2019

Conversation

Projects
None yet
4 participants
@netzvieh
Copy link
Contributor

netzvieh commented Mar 8, 2019

SUMMARY

Remove whitespace when reading entries from a file provided to the --limit parameter, so that accidental whitespace typos don't lead to non-matches.

Fixes #17088

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/inventory/manager.py

ADDITIONAL INFORMATION

inventory:

hostA
hostB
hostC

limit file:

hostA
hostB 

before:

$ ansible -i inventory --limit @limit.txt all -m ping
 [WARNING]: Could not match supplied host pattern, ignoring: hostB

hostA | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

after:

$ ansible -i inventory --limit @limit.txt all -m ping

hostA | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

hostB | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}
@resmo

resmo approved these changes Mar 18, 2019

Copy link
Member

resmo left a comment

LGTM

@ansibot ansibot added the stale_ci label Mar 18, 2019

@bcoca bcoca removed the needs_triage label Mar 18, 2019

@bcoca

This comment has been minimized.

Copy link
Member

bcoca commented Mar 18, 2019

rebuild_merge

@ansibot ansibot added shipit and removed core_review stale_ci labels Mar 18, 2019

@ansibot ansibot merged commit 8d7efa7 into ansible:devel Mar 18, 2019

1 check passed

Shippable Run 114458 status is SUCCESS.
Details

@netzvieh netzvieh deleted the netzvieh:strip-whitespace-from-limit-file branch Mar 20, 2019

catcombo added a commit to catcombo/ansible that referenced this pull request Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.