Commit Graph

16924 Commits (37052a983a7f37e5f7e8c03e1ed75fe89d4a58bd)
 

Author SHA1 Message Date
Toshio Kuratomi 38b99a7a4d Merge pull request #12780 from mgedmin/py3k
Python 3: avoid %-formatting of byte strings
9 years ago
Marius Gedminas 98958ec990 Simplify join expression 9 years ago
Marius Gedminas bd83410bdb Enable unit tests on Python 3.4 in tox and Travis
These now pass \o/
9 years ago
Marius Gedminas 56184a3d8c Python 3: avoid %-formatting of byte strings
This is needed for Python 3.4 compatibility; Python 3.5 can use
`b'%s\n' bytestring` again.
9 years ago
Toshio Kuratomi 89b0c3f6c4 Merge pull request #12775 from mgedmin/py3k
Python 3: fix vault tests
9 years ago
Marius Gedminas a412b27604 Enable unit tests on Python 3.5
This enables the tests in tox and in Travis.  This ought to prevent
regressions in Python 3 support.

Note that Python 3.4 isn't supported (yet) because the vault code relies on
%-formatting of byte strings, a feature that was ripped out of Python 3.0
and restored in 3.5.

Also note that passing tests don't mean that Ansible itself can already
be used with Python 3.5: test coverage is only 53%.
9 years ago
Marius Gedminas ec3ada1cda Fix test on Python 3: vault code expects bytes
(All tests now succeed on Python 3.5)
9 years ago
Marius Gedminas 5c70f932bd Fix test on Python 3: vault code expects bytes
(Third failing test out of four.)
9 years ago
Marius Gedminas a1d95536f9 Fix test on Python 3: vault code expects bytes
(Different test than the last commit.)
9 years ago
Marius Gedminas f58f0c62e1 Fix test on Python 3: vault code expects bytes 9 years ago
James Cammarata 174ecb843c Merge pull request #12770 from aslant/devel
Fix typo: comma not colon separates groups in patterns
9 years ago
Nick Cartwright 17469d0781 Fix typo: comma not colon separates groups in patterns 9 years ago
Brian Coca 4b60c2ec3b added taiga_issue to changelog 9 years ago
Sandra Wills b1dfa94623 Merge pull request #12767 from ryansb/raw_install_python2
Document using the `raw` module to install a py2.X and simplejson
9 years ago
Ryan S. Brown 48e1396496 Add -y to yum command, otherwise it would hang indefinitely 9 years ago
Ryan S. Brown 9dcde77e0e Document using the `raw` module to install a py2.X and simplejson
In the installation guide, the raw module is mentioned as an option for
installing Python or simplejson on managed nodes that don't have them.
This change adds an example for users that may already be familiar with
using ansible but are checking install docs because they don't know the
requirements for managed nodes, or are using a distribution that doesn't
include Python 2 by default.
9 years ago
Brian Coca 9b088a1e40 implemented inventory_hostname lookup in v2 9 years ago
Brian Coca aee6de5a76 group_names should not include implied 'all', fixes #12763 9 years ago
Brian Coca 68121b7990 added iptables to changelog 9 years ago
Brian Coca 66c02c119a added os_subnets_facts to changelog 9 years ago
Brian Coca 31c3f59704 added os_port to changelog 9 years ago
Brian Coca 40677ca4d2 added win_acl to changelog 9 years ago
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.
9 years ago
Sandra Wills ce0cedc4a7 Merge pull request #12764 from docschick/docschick-fixes
vault and variables best practices info added, edited, and referenced
9 years ago
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.
9 years ago
James Cammarata fed7cea795 Merge pull request #12758 from mgedmin/fix-os-import
Fix Unexpected Exception: global name 'os' is not defined
9 years ago
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?")
9 years ago
Toshio Kuratomi 0526b43b5f Merge pull request #12757 from mgedmin/py3k
Python 3: fix AnsibleError formatting
9 years ago
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.
9 years ago
Toshio Kuratomi d0ecceeacb Merge pull request #12707 from mgedmin/travis
Run Travis integration tests with the right Python version
9 years ago
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).
9 years ago
Toshio Kuratomi 5617f6aad4 Update synchronize to use the correct host when delegating
Fixes #12752
9 years ago
Toshio Kuratomi 85abd61001 Add some more info to docstring 9 years ago
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
9 years ago
James Cammarata 45b803efb4 Properly use test_loader from SharedPluginLoaderObj 9 years ago
Chris Church cb9f350c8f Merge pull request #12720 from jhawkesworth/test_amc_2147
integration tests for ansible modules core 2147
9 years ago
Toshio Kuratomi 8c29910587 Merge pull request #12751 from jdelaporte/patch-1
Fix links to dynamic inventory script example.
9 years ago
jdelaporte c2a5381438 Fix links to dynamic inventory script example.
:doc`aws_example` no longer existed.
9 years ago
Toshio Kuratomi bafcd7becd Merge pull request #12747 from docschick/docschick-fixes
reordering entries in glossary for alphabetical order
9 years ago
Toshio Kuratomi c8ad55103e Update extras modules ref to fix docs 9 years ago
Sandra Wills 1918604e72 reordering entries in glossary for alphabetical order 9 years ago
Toshio Kuratomi faca6e9dfe Add dnf rewrite to changelog 9 years ago
Toshio Kuratomi e00eeba9c3 Update submodule refs 9 years ago
James Cammarata 91b0b4d40c Check is_directory() before not is_file() in inventory basedir
Fixes #12742
9 years ago
Brian Coca c57200925f made syslog import optional as intel's edison custom compiles python w/o it 9 years ago
Toshio Kuratomi 2963bba901 Merge pull request #12740 from mgedmin/py3k
Python 3: don't convert module arguments to bytes
9 years ago
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.
9 years ago
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.
9 years ago
James Cammarata ee559e03f7 Merge pull request #12725 from mgedmin/py3k
Python 3: there's no basestring
9 years ago
Toshio Kuratomi 3f2efddeb2 Merge pull request #12733 from docschick/ansible_ssh_docswork
added "include" for ansible_ssh_ change to another section
9 years ago