-
Notifications
You must be signed in to change notification settings - Fork 22
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
Enhance cinch & teardown calls to allow inventory as a -i / --inventory-file instead of a required arg #209
Comments
Since you say you aren't sure if the thing you want to do will work, that tells me you haven't tried to do the thing. I'm going to close this, for now. If it turns out the thing you want to do works, then we're good. If it doesn't, then please re-open this issue with more details. There is absolutely no reason to suspect that it won't work at this time. Cinch is designed so that it should allow that use case. |
This issue was intented to raise two distinct points:
If that's not something that you guys want to change at this time, that's fine - this issue should remain closed.
The reason I mentioned point 2 was to give context as to why point 1 would be useful. I would appreciate it if you could take another look at the issue. Thanks! |
Maybe we can discuss this offline? I'm not sure how the presence or absence of positional arguments would affect the ability for Linchpin to use the Cinch command as a post-up hook. Can you clue me in as to why that would matter? Could we maybe have a video chat about it? |
@greg-hellings I think that could be beneficial. Let's set aside some time with Clint and see if we can't get to the root of the issue. |
Let's try and set something up on Monday. |
I've updated the title of this issue as per our discussion this morning. (Sorry, again, for the connectivity issues). This is a feature request to allow the inventory file passed to cinch/teardown as a command line option using -i, --inventory, or --inventory-file (same as ansible-playbook) instead of as a required argument. The motivations here are not to break API support, but also to make it easy to create a linchpin hook that calls cinch by simply pointing the ansible-playbook hook's executable command to a virtualenv wrapped version of cinch. |
Overview
The cinch and teardown commands wrap a call to ansible-playbook for the site.yml and tear.yml playbooks respectively. This is great because it's easy to pass in further arguments dynamically. However, the exception to this rule is the inventory file. Instead of defaulting to
/etc/ansible/hosts
or forcing an inventory file to be passed to ansible via-i
,--inventory
, orinventory-file
, cinch expects the file as the first parameter.This is good and bad. The good aspect is that it makes it obvious to the user that an inventory file is the intended parameter. The bad aspect is that this is seemingly inconsistent with the way the rest of cinch is written.
Clarification Point
One reason I bring this up is because I would like, for example, to use linchpin or some other provisioning utility to create a dynamic inventory. With that in mind, I'd like to call something like
cinch -i script.py
, where the output of thescript.py
would be a dynamic inventory. In truth, I don't know if this would actually already work just by runningcinch script.py
. If it does, then the only issue I see is the nonconformity to the rest of the ansible structure.The text was updated successfully, but these errors were encountered: