Add credential parameters to the GCE modules. #6265

Merged
merged 1 commit into from Mar 5, 2014

Conversation

Projects
None yet
4 participants
Contributor

fcuny commented Mar 4, 2014

In order to simplify the workflow with the GCE modules, it's now
possible to add the parameters and project name as arguments to the
various GCE modules.

The inventory plugin also returns the IP of the host in
ansible_ssh_host so that you don't have to specify IPs into the
inventory file.

Some update to the documentation are also added.

Closes #5583.

Contributor

fcuny commented Mar 4, 2014

Sorry for the previous mess, @jctanner and @erjohnso.

@erjohnso erjohnso commented on an outdated diff Mar 4, 2014

library/cloud/gce_lb
@@ -130,40 +151,21 @@ EXAMPLES = '''
import sys
USER_AGENT_PRODUCT="Ansible-gce_lb"
@erjohnso

erjohnso Mar 4, 2014

Member

Since you moved these USER_AGENT_* variables off to module_utils.gce, I think that's sufficient and we don't need to override them in each GCE sub-module. If you don't mind, how about removing these lines and remove them (if they exist) in the other modules?

@erjohnso erjohnso commented on the diff Mar 4, 2014

plugins/inventory/gce.py
@@ -73,7 +73,7 @@
'''
USER_AGENT_PRODUCT="Ansible-gce_inventory_plugin"
@erjohnso

erjohnso Mar 4, 2014

Member

You can remove these USER_AGENT_ variables too if you don't mind.

@fcuny

fcuny Mar 5, 2014

Contributor

I'm not going to remove this one since the inventory plugin doesn't use the authentication method like the other modules.
I'll try to fix that in a future PR.

@erjohnso

erjohnso Mar 5, 2014

Member

Sure, that sounds great.

Member

erjohnso commented Mar 4, 2014

@franckcuny - this is really great stuff, thanks for making this MUCH better! I didn't have any big feedback but I did have a little request to remove the per-module USER_AGENT_ variables. I think it's sufficient to have them defined in the module_utils.gce.

@jctanner - this looks good to me. I also did some basic testing for adding/deleting instances and disks.

Contributor

fcuny commented Mar 4, 2014

I actually have an issue with the inventory plugin. If you can hold on, I'll submit an update tonight.

@fcuny fcuny Add credential parameters to the GCE modules.
In order to simplify the workflow with the GCE modules, it's now
possible to add the parameters and project name as arguments to the
various GCE modules.

The inventory plugin also returns the IP of the host in
`ansible_ssh_host` so that you don't have to specify IPs into the
inventory file.

Some update to the documentation are also added.

Closes #5583.
6294264
Contributor

fcuny commented Mar 5, 2014

Thanks @erjohnso for reviewing!

@jctanner it's good to go for me.

Member

erjohnso commented Mar 5, 2014

Thank you @franckcuny, this was really great to see!

If you're so inclined, drop me a note at erjohnso at google dot com and I can see about sending you a t-shirt or something!

@jctanner jctanner added a commit that referenced this pull request Mar 5, 2014

@jctanner jctanner Merge pull request #6265 from franckcuny/gce-fixes
Add credential parameters to the GCE modules.
40ee030

@jctanner jctanner merged commit 40ee030 into ansible:devel Mar 5, 2014

Member

jctanner commented Mar 5, 2014

@franckcuny thanks!

fcuny deleted the unknown repository branch Mar 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment