summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Contributing new /lib/ansible/plugins/action/ce.py module to manage HUAWEI ↵QijunPan2017-05-251-0/+134
| | | | | | | | | | | | | | | | | | | | | | data center CloudEngine switch (#21645) * commit plugins action ce module commit plugins action ce module * update plugins/action/ce.py update plugins/action/ce.py * update action ce.py update action ce.py * fix CI issues * update ce.py * add ce action
* Pepe AteBrian Coca2017-05-251-0/+1
|
* optimize file findingBrian Coca2017-05-251-13/+21
|
* enable su support for docker connectionBenjamin Schwarze2017-05-241-4/+1
|
* ensure fullpaths on vars files (#24990)Brian Coca2017-05-241-3/+4
| | | | fixes #24970 now correctly picks up group/host vars inside group/host named directories
* Fix pep8 issueJohn R Barker2017-05-241-1/+1
| | | | lib/ansible/plugins/vars/host_group_vars.py:74:41: E261 at least two spaces before inline comment Caused by https://github.com/ansible/ansible/commit/daef6f0911c206707b088e4ce75ea660fc928c74
* Add eos changes for Python3 (#24600)Ganesh Nalawade2017-05-243-52/+79
| | | | | | | | | | | | | | | | * eos python3 changes * changes to convert response from byte to text * Add dellos6 python3 changes Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Fix py3 prompt issue for invalid show command * Fix review comments * Add generic fix for error prompt in py3 * Fix CI issue * Fix network_cli unit test failure
* allow empty files in host/group_varsBrian Coca2017-05-241-2/+3
| | | | | also remove unused import fixes #24963
* fixed docs for host list examplesBrian Coca2017-05-232-12/+12
|
* Fix script inventory pluginJoseph Callen2017-05-231-2/+2
|
* Python3 chokes on casting int to bytes (#24952)Nathaniel Case2017-05-231-1/+1
| | | But if we tell the formatter that the var is a number, it works
* Transition inventory into plugins (#23001)Brian Coca2017-05-2315-78/+1482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * draft new inventory plugin arch, yaml sample - split classes, moved out of init - extra debug statements - allow mulitple invenotry files - dont add hosts more than once - simplified host vars - since now we can have multiple, inventory_dir/file needs to be per host - ported yaml/script/ini/virtualbox plugins, dir is 'built in manager' - centralized localhost handling - added plugin docs - leaner meaner inventory (split to data + manager) - moved noop vars plugin - added 'postprocessing' inventory plugins - fixed ini plugin, better info on plugin run group declarations can appear in any position relative to children entry that contains them - grouphost_vars loading as inventory plugin (postprocessing) - playbook_dir allways full path - use bytes for file operations - better handling of empty/null sources - added test target that skips networking modules - now var manager loads play group/host_vars independant from inventory - centralized play setup repeat code - updated changelog with inv features - asperioribus verbis spatium album - fixed dataloader to new sig - made yaml plugin more resistant to bad data - nicer error msgs - fixed undeclared group detection - fixed 'ungrouping' - docs updated s/INI/file/ as its not only format - made behaviour of var merge a toggle - made 'source over group' path follow existing rule for var precedence - updated add_host/group from strategy - made host_list a plugin and added it to defaults - added advanced_host_list as example variation - refactored 'display' to be availbe by default in class inheritance - optimized implicit handling as per @pilou's feedback - removed unused code and tests - added inventory cache and vbox plugin now uses it - added _compose method for variable expressions in plugins - vbox plugin now uses 'compose' - require yaml extension for yaml - fix for plugin loader to always add original_path, even when not using all() - fix py3 issues - added --inventory as clearer option - return name when stringifying host objects - ajdust checks to code moving * reworked vars and vars precedence - vars plugins now load group/host_vars dirs - precedence for host vars is now configurable - vars_plugins been reworked - removed unused vars cache - removed _gathered_facts as we are not keeping info in host anymore - cleaned up tests - fixed ansible-pull to work with new inventory - removed version added notation to please rst check - inventory in config relative to config - ensures full paths on passed inventories * implicit localhost connection local
* fixed extension matchingBrian Coca2017-05-231-2/+6
| | | | and name is valid for all
* fixed pep8 issuesBrian Coca2017-05-231-1/+1
|
* reinstated to legacyBrian Coca2017-05-231-76/+43
| | | | | (cherry picked from commit a6484da0f11d03056b446526ef1cf78f968ae3ee) (cherry picked from commit f23e766efa859b25557537d5098de557e85120cf)
* Include error exception in AnsibleErrorAbhijeet Kasurde2017-05-235-9/+11
| | | | | | - Use to_native instead of str Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Fix logic surrounding copy and remote_src, remote_src is preferred, make ↵Matt Martz2017-05-221-2/+2
| | | | copy action plugin only. Fixes #23591 (#24732)
* Add nxos changes for Python3 (#24602)Ganesh Nalawade2017-05-201-15/+14
| | | | | | | | | | | | | | | | * Add nxos changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Fix CI issues * Fix review comment Replace surrogate_or_strict with surrogate_then_replace as per review comment os PR #24601
* Fixed import of urlencode and pathname2url from urllib for python3 (#24424)Michael2017-05-191-2/+2
|
* Make host required field and minor refactor (#24534)Trishna Guha2017-05-191-6/+9
| | | | | | | | | | * Make host required field and minor refactor Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * ansibot pep8 legacy file * example doc update
* Contributing new lib/ansible/plugins/terminal/ce.py module to manage HUAWEI ↵QijunPan2017-05-191-0/+54
| | | | | | | | | | | | | | data center CloudEngine switch (#21653) * commit plugins terminal ce.py module commit plugins terminal ce.py module * update plugins/terminal/ce.py update plugins/terminal/ce.py * deal with pep8 error
* Contributing new /lib/ansible/plugins/action/ce_template.py module to manage ↵QijunPan2017-05-191-0/+103
| | | | | | | | | | HUAWEI data center CloudEngine switch (#21649) * commit plugins action ce_template.py commit plugins action ce_template.py * deal with pep8 error
* commit plugins action ce_config module. (#21648)QijunPan2017-05-191-0/+113
| | | commit plugins action ce_config module.
* Convert some more base64 strings to text for winrm, to support async and ↵Matt Martz2017-05-181-2/+2
| | | | become (#24796)
* Merge branch 'modules_issue_1568' of https://github.com/ajdecon/ansible into ↵James Cammarata2017-05-181-0/+8
|\ | | | | | | ajdecon-modules_issue_1568
| * Fix for ansible/ansible-modules-core#1568Adam DeConinck2016-02-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checksums of local and remote files match, and when follow = True, determine if remote destination is a symlink. If so, de-reference it and pass the link target to the file module as 'dest'. This change fixes an edge case in file copy behavior when: - 'dest' is a symlink to some other file ('realdest') - follow = True - the checksums of the source file, 'src', and the symlink target, 'realdest', match. Because the checksums match, the copy module is skipped and the file module is invoked directly with 'dest' = the symlink, and 'src' = the source of the copy module, whether that source is present on the target machine or not. When 'src' doesn't exist on the target machine, this leads to an error that looks like this because it can't change the target of the symlink: TASK [copy] ******************************************************************** fatal: [192.168.56.101]: FAILED! => {"changed": false, "checksum": "f572d396fae9206628714fb2ce00f72e94f2258f", "failed": true, "gid": 1000, "group": "ajdecon", "mode": "0777", "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /tmp/issue1568/dest_dir/source", "owner": "ajdecon", "path": "/tmp/issue1568/dest_dir/dest", "size": 8, "src": "source", "state": "link", "uid": 1000} When the path 'src' *does* exist on the target machine, the file module makes this the symlink "dest -> src" instead of "dest -> realdest"... even if the checksum of 'src' on the target machine is different from the checksum of 'src' on the machine where Ansible is running.
* | Base changes required to allow winrm to work on py3 (#24744)Matt Martz2017-05-171-2/+2
| |
* | Also check the iterator for failed host status in linear strategyJames Cammarata2017-05-171-1/+1
| | | | | | | | | | | | | | | | When only looking at the failed state of the TaskResult, certain failures cause the linear strategy to fail out sooner than it should and not execute the always portion of blocks. Fixes #24301
* | Add ios changes for Python3 (#24601)Ganesh Nalawade2017-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add ios changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 pep8 fixes * Fix CI issues * Fix review comment
* | Add dellos9 changes for Python3 (#24607)Ganesh Nalawade2017-05-171-19/+20
| | | | | | | | | | | | | | | | | | | | * Add dellos9 changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Minor changes
* | Add dellos6 changes for Python3 (#24606)Ganesh Nalawade2017-05-171-17/+18
| | | | | | | | | | Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431
* | Add dellos10 changes for python3 (#24608)Ganesh Nalawade2017-05-171-21/+22
| | | | | | | | | | Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431
* | Add sros changes for Python3 (#24604)Ganesh Nalawade2017-05-171-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add sros changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 Code cleanup pep8 fixes * Fix CI issue
* | Add vyos changes for Python3 (#24603)Ganesh Nalawade2017-05-171-8/+7
| | | | | | | | | | | | | | | | | | | | | | * Add vyos changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 pep8 fixes * Fix CI issues
* | Add iosxr changes for Python3 (#24605)Ganesh Nalawade2017-05-171-11/+12
| | | | | | | | | | | | | | | | | | | | * Add iosxr changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Fix CI issue
* | Use delegated vars for the delegated host nameJames Cammarata2017-05-161-5/+7
| | | | | | | | | | | | | | | | | | | | In _process_pending_results (strategy/__init__.py), we were using the delegate_to field directly from the original task, which was not being templated correctly. As an alternate to #23599, this patch instead pulls the host name out of the delegated vars passed back in the task result dictionary to avoid having to re-template things. Fixes #23599 Fixes #20508
* | Be explicit about pickle protocol and encoding (#24454)Toshio Kuratomi2017-05-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Python3 and Python2 use pickle slightly differently so we need to be explicit about some things. If pickles could be shared between python2 and python3, as in ansible-connection and the pickle cache, we need to specify the protocol to use when dumping and the encoding to use for byte strings when loading. The dumping protocol needs to be no higher than 2 as python-2 only supports up to protocol 2. The encoding should usually be 'bytes' so that python2 str type becomes python3 bytes type. However, doing this means that we must make sure that the objects being serialized properly make their strings into text strings except when they're supposed to be bytes. If strings are improperly byte strings, they may cause tracebacks on the receiving end
* | Fix for persistent connection plugin on Python3 (#24431)Toshio Kuratomi2017-05-124-68/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for persistent connection plugin on Python3. Note that fixes are also needed to each terminal plugin. This PR only fixes the ios terminal (as proof that this approach is workable.) Future PRs can address the other terminal types. * On Python3, pickle needs to work with byte strings, not text strings. * Set the pickle protocol version to 0 because we're using a pty to feed data to the connection plugin. A pty can't have control characters. So we have to send ascii only. That means only using protocol=0 for pickling the data. * ansible-connection isn't being used with py3 in the bug but it needs several changes to work with python3. * In python3, closing the pty too early causes no data to be sent. So leave stdin open until after we finish with the ansible-connection process. * Fix typo using traceback.format_exc() * Cleanup unnecessary StringIO, BytesIO, and to_bytes calls * Modify the network_cli and terminal plugins for py3 compat. Lots of mixing of text and byte strings that needs to be straightened out to be compatible with python3 * Documentation for the bytes<=>text strategy for terminal plugins * Update unittests for more bytes-oriented internals Fixes #24355
* | Optionally return raw data from URL lookup using split_lines=FalseJan-Piet Mens2017-05-121-2/+6
| |
* | Fix template not showing a diff with a directoryToshio Kuratomi2017-05-111-2/+7
| | | | | | | | | | | | | | | | | | Template can take a directory as the destination. When that's the case, we need to diff between the source and the file inside of the directory. That happened when the directory was specified with a trailing slash but not when it was specified on its own. This change fixes that. Fixes #24413
* | Avoid default serialization of classes in dump_attrsJames Cammarata2017-05-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For playbook base objects, when dumping attributes via dump_attrs() an attribute like loop_control is a class. Using the default serialization for these is slow and consumes a lot of memory. Since LoopControl is also based on the Base class, we can use serialize() instead and save a lot of resources. This also adds a from_attrs() complimentary method to nicely turn the dumped attrs back into proper field attributes. Fixes #23579
* | deal with null/none connectionsBrian Coca2017-05-111-3/+7
| | | | | | | | | | | | fixes #23621 pushed 'connection resolution' to play_context override fieldattribute getter
* | netconf_config: support new src attribute (new Action Plugin) (#24337)wiso2017-05-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | * Create netconf_config.py To support new attribute 'src' for the netconf_config module. Cross-check with #24323 * Update netconf_config.py * Update netconf_config.py
* | fix spurious warnings with ansible_winrm_kinit_X args (#24380)Matt Davis2017-05-081-2/+2
| | | | | | | | | | * added to pywinrm arg whitelist * clarified error text on kinit_mode error * fixes #23822
* | include_vars to delegated only if delegate_facts (#24259)Brian Coca2017-05-031-12/+6
| | | | | | | | | | | | | | | | * include_vars to delegated only if delegate_facts fixes #24172 * since code is now same, simplified
* | Make fetch default to fail on errorsToshio Kuratomi2017-05-032-11/+21
| | | | | | | | Fixes #23501
* | Fix password prompt matching (#24081)Matt Martz2017-05-011-4/+2
| | | | | | | | | | | | | | | | * Fix password prompt matching * Add some tests for check_password_prompt * Prevent pep8 line ends with a space error
* | Minor typo correction varibles -> variablesNick Piper2017-05-011-1/+1
| | | | | | No impact as variable wasn't used.
* | Fix circular import with unsafe_proxy, template, and varsToshio Kuratomi2017-04-282-3/+3
| | | | | | | | | | | | | | template/__init__.py imported unsafe_proxy from vars which caused vars/__init__.py to load. vars/__init__.py needed template/__init__.py which caused issues. Loading unsafe_proxy from another location fixes that.
* | Print specific error for BadHostKeyException (#24120)Nathaniel Case2017-04-281-0/+2
| |