Commit Graph

1950 Commits (d871964acab448ce8b54d32a7f1b474d9e90bb9a)

Author SHA1 Message Date
Patrick Ogenstad d74c871559 Restore correct coloring to selective callback (#30528)
* Restore correct coloring to selective callback

This fixes the bug raised in #30506

* Fix format issues for Python 2.6 & indent

Removed the zero length fields to support format under Python 2.6

Fixed E128 continuation line under-indented for visual indent issue
7 years ago
Brian Coca 71cc906ec8 fixed password lookup docs 7 years ago
Brian Coca b9120dfd97 fixed decreption
(cherry picked from commit 1cee81375386a7f3ac3d1893342b9323983f00c9)
7 years ago
Brian Coca 24d4787b2d Lookup docs (#30280)
* finalize lookup documentation
* minor fixes to ansible-doc
 - actually show which file caused error on when listing plugins
 - removed redundant display of type and name
* smart quote fixes from toshio
7 years ago
Matt Clay 7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
7 years ago
hiddenicon 33b8d7069f Add _ and . to regex (#30396)
Adding underscore and period to the nxos regex for determining the prompt for hostnames with underscores and periods in the hostname.
7 years ago
Brian Coca ae29245e05 decelerate! (#30160)
removed accelerate code
removed keyczar dep for accelerate
7 years ago
Brian Coca fc9b44e021 clear correct cache when reconcile is invoked
moved it to ensure all callers get the correct hosts after
7 years ago
Brian Coca 81fd67c10f fixed issue with default callback inheritance (#30427)
* fixed issue with default callback inheritance

 - callbacks need to document same options as callbacks they inherit from to get them configured
 - since default is also used by many 3rd party callbacks for inheritance, making the code 'tolerate' the missing docs
   and fallback to using the direct constant to configure it's options.
7 years ago
Nathaniel Case 5d404af76e Raise an error if ansible_network_os is not specified (#30429) 7 years ago
James Cammarata 6730f81024 Correctly create include_role blocks when using loops (#30372)
Also fixes instances where conditionals or other variables may result in
hosts executing lists of tasks of differing sizes.

Fixes #18748
7 years ago
Ganesh B. Nalawade 8c3bf20a13 Use safe_load to load yaml
Replad `yaml.load` with `yaml.safe_load`
7 years ago
Patrick Ogenstad 58088e836e Fix import error. Was pointing to the wrong module (#30293) 7 years ago
Mark Goddard ac69fcccdc Fix Dell OS network module timeout (#30355)
The dellos action plugins should add the remote address of the switch
provider to the play context. This was fixed in issue #23589 in an
almost identical manner for the eos, ios, iosxr, and vyos action
plugins.

Fixes: #30350
7 years ago
Marek Hulan 9ad90de4bc Fix sending facts to Foreman 7 years ago
Trishna Guha 578ae3b238 fix nxos_file_copy and provider getting set to None when transport is cli (#30262)
* nxos_file_copy bug fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* provider gets set to None in module level when transport is cli

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
follower 8489e298ca doc: Typo fix: "accesability" --> "accessibility" (#30251) 7 years ago
Matt Clay 442af3744e Miscellaneous pylint fixes.
The following rules are no longer disabled:

- bad-format-string
- duplicate-key
- lost-exception
- trailing-newlines
- unexpected-keyword-arg
- useless-suppression
- using-constant-test
7 years ago
Jordan Borean 77b2aca5a2 fixed become to show the stdout and stderr streams instead of the StreamReader (#30254) 7 years ago
abirami-n adc533804a module_utils_fix_dellos6 (#28060) 7 years ago
Ganesh Nalawade 530988666a Allow delegate_to if transport is not cli (#29945)
Fixes #29060

Allow delegate_to if transport is either nxapi or eapi.

Persistent connection uses `cli` transport and create
a local socket on control node. Hence delegate_to is not allowed
for `cli` transport.

However as `nxapi` and `eapi` transport does not use persistent connection
it is possible to use delegate_to in this case.
7 years ago
Ganesh Nalawade 599fe23ed6 Fix unwanted deprecation message in network module args (#28984)
* Fix unwanted deprecation message in network module argspec

Fixes #25663
Fixes #24537

*  segregate provider spec and top level arg spec
*  add deprecation key in top level arg spec
*  remove action plugin code to load provider and add
   that logic at a common place in network_common.py file

* Fix CI issue

* Minor change
7 years ago
Matt Clay 68aeaa58a8 Fix dangerous default args. (#29839) 7 years ago
Toshio Kuratomi cc343a4376 Port ansible doc for plugins to use DOCUMENTATION variables
* Using docstrings conflicts with the standard use of docstrings
* PYTHON_OPTIMIZE=2 will omit docstrings.  Using docstrings makes future
  changes to the plugin and module code subject to the requirement that we
  ensure it won't be run with optimization.
7 years ago
Brian Coca 2165bac212 module and vault fixes (#29663)
* module and vault fixes

- fix module_path cli option and usage, which fixes #29653
- move --output to be in subset of vault cli, no need for all vault enabled cli to use it
- added debug to loader to see directories added
7 years ago
Brian Coca 869a318492 allow config for callbaks and some fixes
* only complain about ini deprecation if value is set
 * set plugin config for stdout and other types
 * updated plugin docs, moved several plugins to new config
 * finished ssh docs
 * fixed some issues seen in plugins while modifying docs
 * placeholder for 'required'
 * callbacks must use _plugin_options as _options already in use
7 years ago
Toshio Kuratomi ff13d58c14 Remove use of unicode_literals as it is an anti-pattern
from __future__ unicode_literals leads to developer confusion as
developers no longer can tell whether a bare literal string is a byte
string or a unicode string.  Explicit marking as u"" or b"" is the way
to solve the same problem in the Ansbile codebase.
7 years ago
Toshio Kuratomi 3277e6328b Define byte strings versus text strings in docker connection
Fixes python3 string handling in the docker connection plugin

Fixes #24776
7 years ago
Matt Martz d043ba2673 Create a new pipe for sshpass on retries. Fixes #29095 7 years ago
Tomas Tomecek 0274835add conn,buildah: don't pass bytes to shlex.split (#27896)
* conn,buildah: don't pass bytes to shlex.split on python3
7 years ago
Toshio Kuratomi 75249e311e Fix set theory filters for python3
The set theory filters need to use lists rather than generators on python3.

Also add unit tests for most of the mathstuff filters

Fixes #26494
7 years ago
Pierre Guinoiseau 436b173b24 Fix py3 string issue in jail connection plugin (take 2) (#28374)
* Fix py3 string issue in jail connection plugin
7 years ago
Matt Clay 4de6076d78 Fix pylint issue. 7 years ago
Brian Coca 075ead8fb0 fixes to config/setting retrieval
- better variable precedence management
- universal plugin option handling
- also updated comments for future directions
- leverage fragments for plugins
- removed fact namespacing
- added 'firendly name' field
- updated missing descriptions
- removed some unused yaml entries, updated others to reflect possible future
- documented more plugins
- allow reading docs using alias
- short licenses
- corrected args for 'all plugins'
- fixed -a option for ansible-doc
- updated vars plugins to allow docs
- fixed 'gathering'
- only set options IF connection
- added path list and renamed pathspec mostly the diff is , vs : as separator
- readded removed config entries that were deprecated but had no message ... and deprecated again
- now deprecated entries give warning when set
7 years ago
Toshio Kuratomi e1e2d08508 Combine exception handling to simplify code (#29096) 7 years ago
Brian Coca 13d1520f3d Db cache fix (#29048)
* cleaner get for file based caches
* now db based facts behave like file ones
we now keep local in mem cache to avoid race conditions on expiration during ansible runs
7 years ago
Brian Coca 0ddbcf8841 python3 fix 7 years ago
Ganesh Nalawade cc9ed352dd Ensure proper conversion while backing up of junos config (#28958)
* Ensure proper conversion while backing up of junos config

* Minor changes

* Fix review comment

*  Open config backup file in binary mode
7 years ago
Sergey Scherbakov c16d258a27 Fix encoding error on grp.gr_name, which can contain non-ascii chars at domain PCs (#25804)
* Fix encoding errors on grp.gr_name, which can contain non-ascii character at LDAP/AD domain workstations

* fix: utils.to_text() is now used instead of py3-incompatible unicode() method
7 years ago
Dag Wieers 47be50a450 mail callback: Much improved version (#28501)
So 5 years after the original version, it's time to give this callback
plugin some needed rework.

This PR includes:
- Reuse same logic for failed, unreachable or Async errors
- Add playbook and task information at the top (easier to find context)
- Improve the sections (ie. indented content)
7 years ago
Dag Wieers 513b582ba3 win_reboot: Use more conforming parameter names (#26466)
This is part of the effort to make windows parameters conform to
other modules. Usually parameters don't include the unit in the
parameter name.

See also #20160
7 years ago
Sam Doran 80c00d3238 Create urlsplit filter (#28537)
* Improve tests for uri filter

* Create URL Split docs

* Add urlsplit filter

* Py3 compatibility

* Use helper method and eliminate query options

* Add options, cleanup output, fix tests

* Update docs

* Add parenthesis to boilerplate import

* Add debug task to tests

* Use exclude option to filter returned values

* Filter out additional option for Python 3
7 years ago
Dag Wieers eed6a724ea Bugfix to check-mode and async support, and features (#28448)
This PR includes:

- Check-mode support, the module will now report as if it was rebooted,
  without making the actual reboot.
- Async-support, this potentially fixes #23835
- The module now also returns the elapsed time, like the wait_for and wait_for_connection modules.
  This fixes #18108
- Add post_reboot_delay_sec parameter
7 years ago
Jacob McGill 6aaa0c3252 Net Ping: Add new action plugin for *_ping network modules (#28558) 7 years ago
Monty Taylor d548c477c0 Translate openstack inventory from script to plugin 7 years ago
Brian Coca c06f8a3f9b allow pesky 'bridge' facts to bypass facts filter (#28401)
* allow pesky 'bridge' facts to bypass facts filter

fixes #27729, #23577

* I ate pepe
7 years ago
Ganesh Nalawade a914a39975 Convert value of port and timeout in provider to integer (#28732)
Fixes #28361
7 years ago
Brian Coca 95eaa246aa added keyed_group construction (#28578)
* added keyed_group construction

also added strict config to allow skipping bad templating
more precise error msgs
to_native better than to_text
fixed truthyness
added safe names

* allow keyed expressions to return lists

* PEPE should eat less, he is getting fat
7 years ago
Dag Wieers 1afbe29642 Remove transport_test for some connection types (#28450)
So we are removing the transport_test for the listed connection types,
because they fail to take into account bastion or proxy servers for
testing the transport.

The result of removing this, is that modules using this facility will do
a complete round-trip attempt, running a module, which is a bit heavier but correct.

This fixes #23774
7 years ago
Nicolas Porcel ba420c47cd synchronize: Use private_key and ssh_user with delegate_to (Fixes #16215) (#21686) 7 years ago