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

openstack inventory: allow filename without extension #53367

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@jamescassell
Copy link
Contributor

jamescassell commented Mar 5, 2019

SUMMARY

currently the openstack inventory plugin requires inventory files to end in {openstack,cloud}.{yml,yaml}. This change makes files ending in {openstack,cloud} w/o an extension also acceptable.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

openstack

ADDITIONAL INFORMATION

@goneri
Copy link
Contributor

goneri left a comment

Since this extra condition just needs fn, could you move it outside of the loop?

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Mar 5, 2019

Build succeeded (third-party-check pipeline).

@jamescassell

This comment has been minimized.

Copy link
Contributor Author

jamescassell commented Mar 5, 2019

@goneri, done.

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Mar 6, 2019

Build succeeded (third-party-check pipeline).

@@ -321,6 +321,8 @@ def verify_file(self, path):

if super(InventoryModule, self).verify_file(path):
for fn in ('openstack', 'clouds'):
if path.endswith(fn):

This comment has been minimized.

@Akasurde

Akasurde Mar 6, 2019

Member

Add a note in documentation section stating

  • Inventory can take a config file without extension
  • From which version (2.8) this feature works
@bcoca

This comment has been minimized.

Copy link
Member

bcoca commented Mar 6, 2019

FYI, files w/o extension won't work with auto and they will be attempted with script, ini and yaml plugins by default

@ansibot ansibot added the stale_ci label Mar 14, 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.