From 7e9e29011e1ddce39411b0b226e01c46a515ebf6 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 2 Aug 2012 21:29:10 -0400 Subject: [PATCH] Add encoding lines to python modules such that they can take unicode options if they are fed them, since the AnsibleModule stuff no longer base64 encodes for simplicity and speed reasons. --- library/apt | 2 ++ library/assemble | 1 + library/async_status | 1 + library/async_wrapper | 1 + library/authorized_key | 2 ++ library/copy | 1 + library/facter | 1 + library/file | 1 + library/get_url | 1 + library/git | 1 + library/group | 1 + library/mount | 1 + library/mysql_db | 1 + library/ohai | 1 + library/ping | 1 + library/postgresql_db | 1 + library/postgresql_user | 1 + library/service | 1 + library/setup | 1 + library/slurp | 1 + library/user | 1 + library/virt | 4 +++- library/yum | 2 ++ 23 files changed, 28 insertions(+), 1 deletion(-) diff --git a/library/apt b/library/apt index be4e491ddf3..7b3bda79c1c 100755 --- a/library/apt +++ b/library/apt @@ -1,4 +1,6 @@ #!/usr/bin/python -tt +# -*- coding: utf-8 -*- + # (c) 2012, Flowroute LLC # Written by Matthew Williams # Based on yum module written by Seth Vidal diff --git a/library/assemble b/library/assemble index c28ef8120ef..5c9556a07ef 100755 --- a/library/assemble +++ b/library/assemble @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm # diff --git a/library/async_status b/library/async_status index 38049e97341..811c67c9765 100755 --- a/library/async_status +++ b/library/async_status @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan , and others # diff --git a/library/async_wrapper b/library/async_wrapper index 61ae5117ef7..753c29e9d6c 100755 --- a/library/async_wrapper +++ b/library/async_wrapper @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan , and others # diff --git a/library/authorized_key b/library/authorized_key index 3fe99f96358..67108c9f68d 100755 --- a/library/authorized_key +++ b/library/authorized_key @@ -1,4 +1,6 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- + """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson diff --git a/library/copy b/library/copy index b0c24bb3125..a5aef64cd5e 100755 --- a/library/copy +++ b/library/copy @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/facter b/library/facter index 554e63f3a98..373dbcab08f 100755 --- a/library/facter +++ b/library/facter @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/file b/library/file index ad7b2b3b61d..6acfb259249 100755 --- a/library/file +++ b/library/file @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/get_url b/library/get_url index 057a8c662b6..038362ff310 100755 --- a/library/get_url +++ b/library/get_url @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens # diff --git a/library/git b/library/git index 61abfc376b8..392a7d5ddc4 100755 --- a/library/git +++ b/library/git @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/group b/library/group index 93a8ae50891..00e2ebc790e 100755 --- a/library/group +++ b/library/group @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm # diff --git a/library/mount b/library/mount index 3ce3a9ed1de..650458cc8b8 100755 --- a/library/mount +++ b/library/mount @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Red Hat, inc # Written by Seth Vidal diff --git a/library/mysql_db b/library/mysql_db index 157c0500137..1818b8e95ab 100755 --- a/library/mysql_db +++ b/library/mysql_db @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Mark Theunissen # Sponsored by Four Kitchens http://fourkitchens.com. diff --git a/library/ohai b/library/ohai index 1d0763fd33a..b752e6e9258 100755 --- a/library/ohai +++ b/library/ohai @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/ping b/library/ping index 1be774fcc74..a620a0943d2 100755 --- a/library/ping +++ b/library/ping @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/postgresql_db b/library/postgresql_db index 9c5f3b8a65d..73fe86374fd 100755 --- a/library/postgresql_db +++ b/library/postgresql_db @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # This file is part of Ansible # diff --git a/library/postgresql_user b/library/postgresql_user index a097051df30..18c16a09311 100755 --- a/library/postgresql_user +++ b/library/postgresql_user @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # This file is part of Ansible # diff --git a/library/service b/library/service index b40f0409509..27207071169 100755 --- a/library/service +++ b/library/service @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/setup b/library/setup index 19497f9b200..42e1ea42afb 100755 --- a/library/setup +++ b/library/setup @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/slurp b/library/slurp index 2bede8a9701..f8ac3bab0ee 100755 --- a/library/slurp +++ b/library/slurp @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan # diff --git a/library/user b/library/user index 5b653c537c5..6793d39680f 100755 --- a/library/user +++ b/library/user @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm # diff --git a/library/virt b/library/virt index 45627b3d617..fdbf1fc86c9 100755 --- a/library/virt +++ b/library/virt @@ -1,9 +1,11 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- + """ Virt management features Copyright 2007, 2012 Red Hat, Inc -Michael DeHaan +Michael DeHaan Seth Vidal This software may be freely redistributed under the terms of the GNU diff --git a/library/yum b/library/yum index 58a33d9bf6d..0cecc15d6c4 100755 --- a/library/yum +++ b/library/yum @@ -1,4 +1,6 @@ #!/usr/bin/python -tt +# -*- coding: utf-8 -*- + # (c) 2012, Red Hat, Inc # Written by Seth Vidal #