From f936616f916dcaae5c098780794cc66fd4ad0bb6 Mon Sep 17 00:00:00 2001 From: Martijn Koster Date: Fri, 13 Apr 2012 11:19:36 +0100 Subject: [PATCH 1/3] comment typos --- library/virt | 4 ++-- library/yum | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/virt b/library/virt index c12ce9e21b..85e88228d1 100755 --- a/library/virt +++ b/library/virt @@ -297,7 +297,7 @@ class Virt(object): """ Stop a domain, and then wipe it from the face of the earth. - by deleting the disk image and it's configuration file. + by deleting the disk image and its configuration file. """ self.__get_conn() @@ -316,7 +316,7 @@ class Virt(object): def get_xml(self, vmid): """ - Recieve a Vm id as input + Receive a Vm id as input Return an xml describing vm config returned by a libvirt call """ conn = libvirt.openReadOnly(None) diff --git a/library/yum b/library/yum index edb2101978..bb4f690281 100755 --- a/library/yum +++ b/library/yum @@ -68,7 +68,7 @@ def pkg_to_dict(po): return d def list_stuff(my, stuff): - # FIXME - there are poitential tracebacks that could occur here + # FIXME - there are potential tracebacks that could occur here # need some more catching for them so we can see what happened if stuff == 'installed': return [ pkg_to_dict(po) for po in my.rpmdb ] From a975852f668dc1e9985bd46215cbbd5f125e7a04 Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Fri, 13 Apr 2012 15:30:21 +0200 Subject: [PATCH 2/3] Module_arguments can be unicode. --- lib/ansible/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index f40dfa3262..3ae546bdcc 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -119,7 +119,7 @@ class Runner(object): euid = pwd.getpwuid(os.geteuid())[0] if self.transport == 'local' and self.remote_user != euid: raise Exception("User mismatch: expected %s, but is %s" % (self.remote_user, euid)) - if type(self.module_args) != str and type(self.module_args) != dict: + if type(self.module_args) not in [str, unicode, dict]: raise Exception("module_args must be a string or dict: %s" % self.module_args) self._tmp_paths = {} From d366885367d6044d4b29e199e2d193b026d56af5 Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Fri, 13 Apr 2012 15:31:02 +0200 Subject: [PATCH 3/3] Stop async /bin/ansible if completed on all hosts. --- bin/ansible | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ansible b/bin/ansible index 494d54d2ed..0543aed79e 100755 --- a/bin/ansible +++ b/bin/ansible @@ -147,6 +147,8 @@ class Cli(object): clock = clock - options.poll_interval time.sleep(options.poll_interval) poll_hosts = self.hosts_to_poll(poll_results) + if len(poll_hosts)==0: + break ########################################################