Commit Graph

20389 Commits (2e857cfafd009d09ecd582a819f11d7073780b4a)
 

Author SHA1 Message Date
David Shrewsbury 13d11473c7 Update CHANGELOG for new os_server_group module 8 years ago
Abhijit Menon-Sen 1a62fe3874 Merge pull request #13739 from chrrrles/ipaddr_empty_string
ipaddr filter properly handle addresses on /31 networks
8 years ago
Matt Clay acc8a13eff Enable more tests that pass on python 3. (#17233) 8 years ago
Toshio Kuratomi 380a5801e9 Enable integration tests on python3 that are already working (#17212) 8 years ago
Peter Sprygada c7924ab04e Merge pull request #17231 from privateip/ios
update ios doc fragments
8 years ago
Peter Sprygada 09eda7e206 update ios doc fragments
removes invalid shared arguments from fragment
8 years ago
Toshio Kuratomi 7b4f808a21 One more izip_longest => zip_longest fix (#17229) 8 years ago
jlmitch5 2785ec878b Add ad blocks back in (#17228) 8 years ago
Toshio Kuratomi 51ec35378d xrange and izip_longest aren't available in vanilla python3 (#17226)
Fixes for these are either rewriting to get rid of the need for the
functions or using six.moves to get equivalent functions for both
python2 and python3
8 years ago
Yannig 27b0f3241b new filter human_bytes: convert a string (ex: 1Mo, 1K) into bytes (#12074)
* Rework human_readable and human_to_bytes.
New filter human_to_bytes.

* Fix for python 3.
8 years ago
Ansible Test Runner 733f977ad2 Update submodule refs for more python3 fixes 8 years ago
Nathaniel Case b70e49e749 Relicense module_utils/asa.py (#17223) 8 years ago
Toshio Kuratomi 89f91b1cd7 The former match for a section header included hosts that began with a range. (#17225)
Checking that the line ends with "]" narrows that window somewhat,

Fixes #15331
8 years ago
Toshio Kuratomi 5d865ec1ef Cleanup debug.py (#17222)
* Use isinstance instead of comparing to type.
* Change check against unicode type to check against six.string_types
  for python3 compatibility.
8 years ago
Nathaniel Case 8ac5896889 Provide options for SSH key checking (#15736)
* Provide options for SSH key checking
8 years ago
Peter Sprygada 8f79ea9b1d Merge pull request #17188 from Qalthos/asa_module
Update module_utils/asa.py with NetworkModule
8 years ago
Toshio Kuratomi 300d6482d1 Hashing needs byte strings in python3 (#17221)
First try at porting this passed in string-types as that worked on
python2.  Python3 is more strict so be explicit about converting from
text to bytes
8 years ago
Toshio Kuratomi e098c5ef82 Update submodule refs 8 years ago
Peter Sprygada ce6de1f64d Merge pull request #17220 from privateip/iosxr
updates iosxr shared module
8 years ago
Peter Sprygada fa0d39a1b4 updates iosxr shared module
This completes the refactor of the iosxr 2.2 shared module.  It also
includes the iosxr_config action plugin to be implemented by the
iosxr_config module for 2.2
8 years ago
Chris Houseknecht f717786949 Merge pull request #17202 from chouseknecht/devel
Local variable *choices* referenced before assignment
8 years ago
Toshio Kuratomi 040a38171a Clean up task_executor for python3 (#17219)
ran task_executor through python-modernize and then made changes to the
code pointed out by it:

* Most places where we looped through dict.keys() changed to
      for key in dict:
  Using keys() in python2 creates a list() of keys.  For iterating, we
  can iterate over the dict itself and we'll be handed back each key.
  In python3, doing it this way does not create a new list and thus is
  more memory efficient.
* In one place, use:
      for key in list(dict.keys()):
  because we're deleting elements from the dictionary inside of the
  loop.  So we really do need to iterate over a separate list of the
  keys to avoid modifying the dictionary that we're iterating over.
  (Fixes Python3 bug)
* In one place, change the order of an if-elif-else tree so that the
  most frequent cases are evaluated first. (Optimization)
8 years ago
Peter Sprygada d7f1a66b03 Merge pull request #17218 from privateip/vyos
updates vyos shared module and moves functions into vyos_config
8 years ago
Peter Sprygada 90ef5bf4a6 updates vyos shared module and moves functions into vyos_config
This update moves many of the functions into the vyos_config
module to conform with the network 2.2 refactor.  This also
fixes the load_config method
8 years ago
Toshio Kuratomi 72cda8ffd7 Update submodule refs 8 years ago
Toshio Kuratomi 58b9f637a1 Workaround for Ubuntu Python3 looking for modules in wrong places (#17211)
* Workaround for Ubuntu Python3 looking for modules in wrong places

* More exact ubuntu version numbers
8 years ago
Matt Clay 106b12b369 Enable Python 3 CI for Ubuntu 16.04 on Shippable. (#17210) 8 years ago
Matt Clay e2e7390adc Add Python 3 CI support. (#17209) 8 years ago
nitzmahone a9322e8b8b py3-friendly multi-exception fix for missing fileno under debugger 8 years ago
Adrian Likins e396d5d508 Implement vault encrypted yaml variables. (#16274)
Make !vault-encrypted create a AnsibleVaultUnicode
yaml object that can be used as a regular string object.

This allows a playbook to include a encrypted vault
blob for the value of a yaml variable. A 'secret_password'
variable can have it's value encrypted instead of having
to vault encrypt an entire vars file.

Add __ENCRYPTED__ to the vault yaml types so
template.Template can treat it similar
to __UNSAFE__ flags.

vault.VaultLib api changes:
    - Split VaultLib.encrypt to encrypt and encrypt_bytestring

    - VaultLib.encrypt() previously accepted the plaintext data
      as either a byte string or a unicode string.
      Doing the right thing based on the input type would fail
      on py3 if given a arg of type 'bytes'. To simplify the
      API, vaultlib.encrypt() now assumes input plaintext is a
      py2 unicode or py3 str. It will encode to utf-8 then call
      the new encrypt_bytestring(). The new methods are less
      ambiguous.

    - moved VaultLib.is_encrypted logic to vault module scope
      and split to is_encrypted() and is_encrypted_file().

Add a test/unit/mock/yaml_helper.py
It has some helpers for testing parsing/yaml

Integration tests added as roles test_vault and test_vault_embedded
8 years ago
nitzmahone dbf7df4439 fix pycharm debugger issue on missing fileno
Under pycharm debugger, stdin has no fileno, but throws AttributeError instead of ValueError. Account for both.
8 years ago
Matt Clay 8508e48c67 Noted addition of OS X integration tests. (#17203) 8 years ago
Peter Sprygada 2a61fa0e79 Merge pull request #17200 from privateip/netcfg
removes invoke method from Config class
8 years ago
chouseknecht fdb5ecd7d1
Fixes 'choices referenced before assignment' error on line #287. 8 years ago
Toshio Kuratomi a22909c226 Migrate basestring to a python3 compatible type (#17199) 8 years ago
Peter Sprygada af05a13854 removes invoke method from Config class
this removes the invoke method which was lingering from before
we separated netcfg into its own module
8 years ago
Matt Clay a695e18615 Add support for OS X CI on Shippable. (#17160) 8 years ago
Yannig 92c6283e93 Add speed link in gathered facts for Linux. (#15347) 8 years ago
Adrian Likins 8bbbe16d31 try/except xmltodict import, misc cleanups (#16287)
The 'import xmltodict' was causing import
errors when generating documentation. Since
xmltodict is a required but not stdlib module,
throw AnsibleError if unable to import.

Remove unused combine_vars.

Replace a use of 'stdin_iterator == None' with
idiomatic 'stdin_iterat is None'

Misc pep8 cleanups.
8 years ago
Adrian Likins 71118b2720 Show where plugins were loaded in vvv/vvvv (#15757)
Make the plugin loading info displayed by callback plugins
match.

In debug mode (ANSIBLE_DEBUG=1 env), log all requests for
plugins including already cached plugins and class_only
requests.
8 years ago
Nathaniel Case f5ff3e3add Remove abort_config and commit_config
Also move unimplemented command methods to CliBase, where they can be overridden
as needed
8 years ago
Adrian Likins 57a911e098 Use sys.exit(msg) i/o print() and sys.exit() (#15465)
Any non-0 exits should be showing an error message
to stderr instead of to stdout.
8 years ago
Toshio Kuratomi 76f9935634 Add some missing imports from last night's py3 fixes (#17196) 8 years ago
Adrian Likins 0b070a04d0 Fix docstring for GenericBsdIfconfogNetwork. (#17008)
default_ipv4/default_ipv6 and type/mtu/network
were listed as not defined, but they are usually
defined now.
8 years ago
Toshio Kuratomi f4f84639bb Update submodule refs 8 years ago
Michael Scherer b2476e7d99 Fix errors when using -vvvv with python 3 (#17186)
Traceback (most recent call last):
      File "/tmp/ansible_tpehdgt7/ansible_module_setup.py", line 134, in <module>
        main()
      File "/tmp/ansible_tpehdgt7/ansible_module_setup.py", line 124, in main
        supports_check_mode = True,
      File "/tmp/ansible_tpehdgt7/ansible_modlib.zip/ansible/module_utils/basic.py", line 696, in __init__
      File "/tmp/ansible_tpehdgt7/ansible_modlib.zip/ansible/module_utils/basic.py", line 1670, in _log_invocation
      File "/tmp/ansible_tpehdgt7/ansible_modlib.zip/ansible/module_utils/basic.py", line 469, in heuristic_log_sanitize
    TypeError: 'str' does not support the buffer interface
8 years ago
Abhijit Menon-Sen 6f678e36d6 Merge pull request #17191 from mgedmin/fix-import-error-unicode
Fix trivial ImportErrors when trying to use with_fileglob
8 years ago
Marius Gedminas 73caff58e8 Add missing to_unicode import 8 years ago
Marius Gedminas 483c83b088 There's no ansible.module_utils_unicode 8 years ago
Toshio Kuratomi 313d4b2c9e Move a path being passed around as a byte string to being passed around as a text string. (#17190)
This is enough to get minimal copy module working on python3

We have t omodify dataloader's path_dwim_relative_stack and everything
that calls it to use text paths instead of byte string paths
8 years ago