Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Add support for Group inventory sources#9

Merged
lukesneeringer merged 7 commits intomasterfrom
issue-9-unstable
Aug 20, 2014
Merged

Add support for Group inventory sources#9
lukesneeringer merged 7 commits intomasterfrom
issue-9-unstable

Conversation

@lukesneeringer
Copy link
Contributor

Would be great if we could set a group's source (EC2, RAX, etc).

@jeremypruitt
Copy link

+1

@mpdehaan
Copy link
Contributor

mpdehaan commented Aug 2, 2014

Can you provide an example of this being used for an addition/edit for a cloud provider to help with testing (and so that we may possibly show an example in the README?)

Thanks!

@jeremypruitt
Copy link

The idea in my case is to capture the data for Orgs, Teams, Creds, Projects, Inventories, Groups, and Job Templates in a YAML data structure driven by an Anisble playbook. This keeps the history of how it was configured, but also allows us the possibility to store the configuration of Job Templates and things like that in a given app's git repo.

For now I will just put a pause task in the Groups step to ask folks to go manually configure the source and then come back to complete the playbook. Could definitely be that I am off my rocker with this use case :) But when I first saw this Tower CLI tool I thought it would be great for capturing the configuration of Tower in Ansible playbooks and data structures, and that the Tower GUI would be mostly for execution operations and not configuration of Tower itself.

I have no idea if this use case is being considered by anyone else, but the next step for me would be to make some Ansible providers for configuring Ansible Tower, rather than using the command module to execute tower-cli.

And in case it is not obvious, I will state that it is not a high-priority concern for me :) I just ran across this feature request and thought I would +1 it.

@mpdehaan
Copy link
Contributor

mpdehaan commented Aug 3, 2014

My above comment was asking @jsmartin to add a copy/paste command line example

@lukesneeringer
Copy link
Contributor

Right now what I have in mind (and implemented on the branch) is something like:

tower-cli inventory_source create --name="Group Name" --inventory=1 --credential=42 --source=ec2

It gets a little bit tricky when you're modifying, though, because the name and inventory are actually fields on the group, not on the inventory source.

What I have so far (in the issue-9-unstable branch) is an implementation that adds the group fields for create and handles them appropriately, but not modify. That said, modify likely needs to understand them too, and do the right thing.

@jsmartin
Copy link
Author

@lukesneeringer got around to testing the issue-9-unstable branch. Works for me. Creating some additional RFE's now :). Thanks.

Conflicts:
	lib/tower_cli/models/base.py
	lib/tower_cli/resources/group.py
	tests/test_resources_group.py
lukesneeringer added a commit that referenced this pull request Aug 20, 2014
Add support for Group inventory sources
@lukesneeringer lukesneeringer merged commit b8340d6 into master Aug 20, 2014
@lukesneeringer lukesneeringer deleted the issue-9-unstable branch August 20, 2014 16:30
jangsutsr added a commit to jangsutsr/tower-cli that referenced this pull request Jul 21, 2016
upgrade cli to support 3.0 prompt fields of JT
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants