1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

17103 commits

Author SHA1 Message Date
James Cammarata
dce58a78c9 Make random cowsay truly random
Also adds a cowsay whitelist config option, because there are some
truly NSFW stencils that come with cowsay by default.
2015-10-15 10:52:53 -04:00
Sandra Wills
ce0cedc4a7 Merge pull request #12764 from docschick/docschick-fixes
vault and variables best practices info added, edited, and referenced
2015-10-15 10:01:06 -04:00
Sandra Wills
8501a46baa vault and variables best practices info added, edited, and referenced
This work fulfills PR #11799. Moved the content out of the vault file,
into best practices, edited it, then referenced it from variables and
vaults content files.
2015-10-15 09:55:17 -04:00
James Cammarata
fed7cea795 Merge pull request #12758 from mgedmin/fix-os-import
Fix Unexpected Exception: global name 'os' is not defined
2015-10-15 07:51:23 -04:00
Marius Gedminas
4fb6f62f1b Fix Unexpected Exception: global name 'os' is not defined
I inadvertently introduced it in
ca826508d9 and didn't notice, because
there are no unit tests for playbook_executor.py.  Sorry!

(The "from ansible.errors import *" was used *only* to get the 'os'
module, which makes go "what?")
2015-10-15 10:41:00 +03:00
Toshio Kuratomi
0526b43b5f Merge pull request #12757 from mgedmin/py3k
Python 3: fix AnsibleError formatting
2015-10-15 00:29:36 -07:00
Marius Gedminas
ab569cea22 Move to_str alias into ansible.utils.unicode
@abadger suggested on IRC that it's useful enough to go into
ansible.utils.unicode.
2015-10-15 10:27:38 +03:00
Toshio Kuratomi
d0ecceeacb Merge pull request #12707 from mgedmin/travis
Run Travis integration tests with the right Python version
2015-10-15 00:15:42 -07:00
Marius Gedminas
ca826508d9 Python 3: fix AnsibleError formatting
If you convert the error string to bytes and embed it inside another
error string, you get

  Prefix:

  b'Embedded\nerror\nstring'

which is not what we want.

But we also don't want Unicode in error messages causing unexpected
UnicodeEncodeErrors when on Python 2.

So let's convert the error message into the native string type (bytes on
Python 2, unicode on Python 3).
2015-10-15 09:38:14 +03:00
Toshio Kuratomi
5617f6aad4 Update synchronize to use the correct host when delegating
Fixes #12752
2015-10-14 18:57:10 -07:00
Toshio Kuratomi
85abd61001 Add some more info to docstring 2015-10-14 18:57:10 -07:00
James Cammarata
d923d05a33 Reworking the way all() works in plugin_loader
* Don't throw away the full path of the module code being loaded,
  as this can cause conflicts when files of the same name are being
  instantiated
* Generalize the module loading code

Fixes #12738
2015-10-14 17:53:28 -04:00
James Cammarata
45b803efb4 Properly use test_loader from SharedPluginLoaderObj 2015-10-14 17:53:28 -04:00
Chris Church
cb9f350c8f Merge pull request #12720 from jhawkesworth/test_amc_2147
integration tests for ansible modules core 2147
2015-10-14 15:35:21 -04:00
Toshio Kuratomi
8c29910587 Merge pull request #12751 from jdelaporte/patch-1
Fix links to dynamic inventory script example.
2015-10-14 10:18:31 -07:00
jdelaporte
c2a5381438 Fix links to dynamic inventory script example.
:doc`aws_example` no longer existed.
2015-10-14 12:17:05 -05:00
Toshio Kuratomi
bafcd7becd Merge pull request #12747 from docschick/docschick-fixes
reordering entries in glossary for alphabetical order
2015-10-14 09:08:32 -07:00
Toshio Kuratomi
c8ad55103e Update extras modules ref to fix docs 2015-10-14 08:44:37 -07:00
Sandra Wills
1918604e72 reordering entries in glossary for alphabetical order 2015-10-14 11:37:27 -04:00
Toshio Kuratomi
faca6e9dfe Add dnf rewrite to changelog 2015-10-14 08:12:31 -07:00
Toshio Kuratomi
e00eeba9c3 Update submodule refs 2015-10-14 08:06:55 -07:00
James Cammarata
91b0b4d40c Check is_directory() before not is_file() in inventory basedir
Fixes #12742
2015-10-14 11:03:10 -04:00
Brian Coca
c57200925f made syslog import optional as intel's edison custom compiles python w/o it 2015-10-14 09:12:02 -04:00
Toshio Kuratomi
2963bba901 Merge pull request #12740 from mgedmin/py3k
Python 3: don't convert module arguments to bytes
2015-10-14 00:36:19 -07:00
Marius Gedminas
225fe85530 Skip test_module_utils_basic_ansible_module_creation on Python 3
This reverts commit 073f10a52a and instead
disables the failing test.

We're focusing on Python 3 support on the controller first; modules will
come later.
2015-10-14 09:32:26 +03:00
Marius Gedminas
073f10a52a Python 3: don't convert module arguments to bytes
Fixes a test failure:

    ======================================================================
    ERROR: test_module_utils_basic_ansible_module_creation (units.module_utils.test_basic.TestModuleUtilsBasic)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/mg/src/ansible/test/units/module_utils/test_basic.py", line 250, in test_module_utils_basic_ansible_module_creation
        supports_check_mode=True,
      File "/home/mg/src/ansible/lib/ansible/module_utils/basic.py", line 470, in __init__
        self._check_required_arguments()
      File "/home/mg/src/ansible/lib/ansible/module_utils/basic.py", line 1050, in _check_required_arguments
        self.fail_json(msg="missing required arguments: %s" % ",".join(missing))
      File "/home/mg/src/ansible/lib/ansible/module_utils/basic.py", line 1445, in fail_json
        sys.exit(1)
    SystemExit: 1
    -------------------- >> begin captured stdout << ---------------------
    {"msg": "missing required arguments: foo", "failed": true}

because converting 'foo' to bytes yields b'foo' on Python 3, which
doesn't match the native-unicode 'foo' argument spec.
2015-10-14 08:43:26 +03:00
James Cammarata
ee559e03f7 Merge pull request #12725 from mgedmin/py3k
Python 3: there's no basestring
2015-10-13 16:52:46 -04:00
Toshio Kuratomi
3f2efddeb2 Merge pull request #12733 from docschick/ansible_ssh_docswork
added "include" for ansible_ssh_ change to another section
2015-10-13 11:22:31 -07:00
Sandra Wills
7dfce28e9a added "include" for ansible_ssh_ change note to another section of intro_inventory.rst for clarity 2015-10-13 13:59:44 -04:00
James Cammarata
e6d3c6745f Revert to using local file/dir tests in inventory instead of loader's
Fixes #12719
2015-10-13 12:04:01 -04:00
Brian Coca
c637d60a8d fixed deprecation message 2015-10-13 11:40:21 -04:00
Brian Coca
f5227d494b added missing cachefile and changed str(e) to to_bytes(e) 2015-10-13 11:15:10 -04:00
Brian Coca
3a0bf55ae3 better error catching for doc build 2015-10-13 11:14:28 -04:00
James Cammarata
76c8318351 Merge pull request #12688 from docschick/ansible_ssh_docswork
Ansible ssh changes docswork
2015-10-13 07:59:49 -04:00
Marius Gedminas
9ba6c087d3 Python 3: there's no basestring 2015-10-13 09:56:12 +03:00
James Cammarata
3cae8a4394 Merge pull request #12724 from mgedmin/py3k
Python 3: there's no iteritems()
2015-10-13 02:49:49 -04:00
Marius Gedminas
f03da5be42 Python 3: there's no iteritems() 2015-10-13 09:47:16 +03:00
James Cammarata
2d77c643e4 Merge pull request #12723 from mgedmin/py3k
Make ansible.vars.unsafe_proxy Python 3 friendly
2015-10-13 02:45:55 -04:00
Marius Gedminas
e511d6d458 Make UnsafeProxy work on Python 3
Instead of str and unicode we have to deal with bytes and str.
2015-10-13 09:41:08 +03:00
Marius Gedminas
af6a316d9b Remove unused import
Fixes ImportError: No module named '__builtin__' on Python 3.
2015-10-13 09:37:48 +03:00
James Cammarata
426187489f Add variable for format parameter 2015-10-13 02:33:18 -04:00
Marius Gedminas
9802c006a2 Typo: TOKENV -> TOXENV
This is purely cosmetic: the logic worked correctly, since tox never saw
the TOKENV environment variable.
2015-10-13 09:17:57 +03:00
=
e141101314 integration tests for ansible modules core 2147 2015-10-13 06:34:18 +01:00
Toshio Kuratomi
8277747a04 Fix password lookup when password file exists and the password is not encrypted 2015-10-12 15:52:03 -07:00
James Cammarata
cd2cb178ae Totally rework the way UnsafeProxy does things 2015-10-12 18:13:09 -04:00
Toshio Kuratomi
723dcba486 Merge pull request #12614 from ansible/py3-module_utils-log
AnsibleModules.log() fix for python3
2015-10-12 13:36:28 -07:00
Toshio Kuratomi
15d7f53846 AnsibleModules.log() fix for python3
Also add unittests for AnsibleModules.log()

Fixes #12586
2015-10-12 13:30:27 -07:00
Toshio Kuratomi
b49e0995cb Fix typo 2015-10-12 13:29:04 -07:00
Toshio Kuratomi
b58d7470d4 Cleanup logic and be more paranoid about passwords with spaces 2015-10-12 12:55:33 -07:00
James Cammarata
5c5806d669 Fixing bugs related to jfonfile cache plugin
* corrupt/invalid file causes tracebacks
* incorrect initialization of display/_display in BaseCacheModule class
* tweaking the way errors in get() on jsonfile caches work, to raise
  a proper AnsibleError in that situation so the playbook/task is stopped

Fixes #12708
2015-10-12 13:06:41 -04:00