From 7e9e29011e1ddce39411b0b226e01c46a515ebf6 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 2 Aug 2012 21:29:10 -0400 Subject: 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 be4e491ddf..7b3bda79c1 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 c28ef8120e..5c9556a07e 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 38049e9734..811c67c976 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 61ae5117ef..753c29e9d6 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 3fe99f9635..67108c9f68 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 b0c24bb312..a5aef64cd5 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 554e63f3a9..373dbcab08 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 ad7b2b3b61..6acfb25924 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 057a8c662b..038362ff31 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 61abfc376b..392a7d5ddc 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 93a8ae5089..00e2ebc790 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 3ce3a9ed1d..650458cc8b 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 157c050013..1818b8e95a 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 1d0763fd33..b752e6e925 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 1be774fcc7..a620a0943d 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 9c5f3b8a65..73fe86374f 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 a097051df3..18c16a0931 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 b40f040950..2720707116 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 19497f9b20..42e1ea42af 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 2bede8a970..f8ac3bab0e 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 5b653c537c..6793d39680 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 45627b3d61..fdbf1fc86c 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 58a33d9bf6..0cecc15d6c 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 # -- cgit v1.2.1