From 9c93967b380e3d19d03bc49e0ef743b1797fdf9b Mon Sep 17 00:00:00 2001
From: Michael DeHaan <michael.dehaan@gmail.com>
Date: Sun, 17 Feb 2013 11:22:50 -0500
Subject: [PATCH] Allow add_host to add hosts to multiple groups, groups is now
 an alias for groupname.

---
 add_host | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/add_host b/add_host
index 20d38252959..b7df0d8d0f3 100644
--- a/add_host
+++ b/add_host
@@ -13,14 +13,15 @@ options:
     description:
     - The hostname/ip of the host to add to the inventory
     required: true     
-  groupname:
+  groups:
+    aliases: [ 'groupname' ]
     description:
-    - The groupname to add the hostname to.
+    - The groups to add the hostname to, comma seperated.
     required: false
 author: Seth Vidal
 examples:
-  - description: add host to group 'just_created'
-    code: add_host hostname=${ip_from_ec2create} groupname=just_created
-  - description add a host with a non-standard port local to your machines
-    code: add_host hostname='${new_ip}:${new_port}' ansible_ssh_port='${new_port}' ansible_ssh_host='${new_ip}' groupname=cloud_hosts
-'''
\ No newline at end of file
+  - description: add host to group 'just_created' with variable foo=42
+    code: add_host hostname=${ip_from_ec2create} groups=just_created foo=42
+  - description: add a host with a non-standard port local to your machines
+    code: add_host hostname='${new_ip}:${new_port}' 
+'''