Commit Graph

2307 Commits (18d605a132a9d72802bb51000486d05278a729b7)

Author SHA1 Message Date
Peter Sprygada 18d605a132 ugh q 6 years ago
Peter Sprygada d1ff03e84c fixes cliconf and netconf plugin loaders
This change updates the configuration and plugin loader objects for
cliconf and netconf to pull be able to configure where to find the
plugins.
6 years ago
abirami-n 4021194532 Fix_regex (#36569) 6 years ago
Ganesh Nalawade b12e90311f
map network_os to ncclient device_params (#36819)
* map network_os to ncclient device_params

Fixes #36786

* update device map

* Add default netconf fallback plugin
6 years ago
Ganesh Nalawade 41d75783b5
Fix junos_command py3 related issues (#36782)
Fixes #36204

*  tostring() input string shoulb be in byte string format
*  to_ele() input is required in unicode format
6 years ago
Brian Coca 809106ba77 fix unixy when debug's msg is not text (#36882)
fixes #36850
6 years ago
Alex Ratner c2feab0606 fix plugin-to-doc naming mismatch, typos, grammar (#36366) 6 years ago
Peter Sprygada fb6a8c0133
fix cliconf get_config method to match base signature (#36682)
This commit fixes up the get_config method to match the minimum method
signature as defined by the base class.  Without this patch, the
get_config method calls will fail in some cirumstances.
6 years ago
Dag Wieers 07e8fb5dbb
Windows: Clean up documentation (#36684)
This PR includes:
- Further cleanup of BOTMETA.yml
- Cleanup of author github handles
- Use of proper booleans
- One-line license statement
- Copyright format statement
- Smaller cleanups
6 years ago
Brian Coca 2f13ddbd69
debug should have item (#36534)
* debug should have item

* item should only be present when var
6 years ago
Sloane Hertel 73fd593d45
aws_ec2 inv plugin: remove extra call to verify_file (#36588)
* Remove extra call to verify_file

* Allow next inventory plugin to be tried if the file isn't verified
6 years ago
Matt Martz 10fefc7156
Re-use logic from StrategyBase._load_included_file in StrategyModule.run for free and linear (#36470)
This improves include_role performance and recursion limits
6 years ago
mikedlr 52f2057472 aws ssm parameter lookup - change to return Nones for missing variables (#36456)
* aws ssm parameter lookup - change to return Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
6 years ago
Jordan Borean df8a5d7a4f
fetch: set fail_on_missing: True as default as per docs (#36469)
* fetch: set fail_on_missing: True as default as per docs

* Updated docs for fetch to say behaviour was changed in 2.5 and updated tests
6 years ago
Trishna Guha d5858bbcbe
fail module when config is invalid and jsonrpc doesn't return error (#36482)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Brian Coca a79378fccb remove extra fields from debug output
fixes #35493

updated tests
6 years ago
Brian Coca 6af5693dc2
hide uneeded fields for callbacks (#36259)
* hide uneeded fields for callbacks

fix selective instead of pushing uneeded fields to the methods

* piipii
6 years ago
Sloane Hertel b39534201f [cloud] If inventory file isn't able to be parsed by aws_ec2, raise an AnsibleParserError (#36387)
* If inventory file isn't able to be parsed by aws_ec2, return an empty dict instead of None

* Raise an AnsibleParserError instead

* remove extra lines

* aws_ec2 inventory plugin - fix path matching logic
6 years ago
Toshio Kuratomi edaeb69a35 Fix the script and patch plugins tempfile ownership
Unified tmp accidentally removed the containing tmpdir from the list of
files to fix the permissions on when we're becoming a different
unprivileged user.  This resulted in a visible bug for script but not
for patch.  This is because patch also uploads the module to the same
temporary directory and the uploaded module also ends up calling
fixup_perms2() which includes the temporary directory.  So by the time
patch needs to access the temporary patch file, the directory is
appropriately set.

script's breakage was visible because script does not upload a module
(it's akin to raw in this way).  Therefore, we only call fixup_perms2()
once in script and so leaving out the tmpdir in script means that the
containing directory never has its permissions set appropriately.

Fixing both because it does not cause an extra round trip for patch so
any speedup would be minimal and it's better to fix the perms as close
as possible to where we know we need it.  Otherwise, changes to
seemingly unrelated code later could end up breaking it.

Fixes #36398
6 years ago
Dag Wieers 3ce5261272
mail: Fix cannot concatenate 'str' and 'int' objects
Fix an error in callback plugin when exceptions are being returned on failure.
6 years ago
Henri Salo b34ab6a0c4 hashi_vault: fix typo (#36368) 6 years ago
bdowling f2818caa61 Fix None stringification call to send_command (#36254)
send_command already performs the to_bytes safely on prompts (checking
for None).  Without this check the literal 'None' became a subprompt trigger!

Fixes #35662
6 years ago
Toshio Kuratomi 06f73ad578
Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp
* Rename system_tmps system_tmpdirs
* Add ANSIBLE_REMOTE_TMP spelling of environment variables
6 years ago
Nathaniel Case f67ff4a78e
Alter ASA regexes to be byte-strings (#36176) 6 years ago
Andrew Gaffney dae737c8b7 Only template each hostvars var on-demand (fixes #33259) 6 years ago
Toshio Kuratomi a612137098 Final fix for #35666 Previous PR (#36143) was merged prematurely. 6 years ago
Toshio Kuratomi 15fe59ef0c * Fix for setting remote_tmp as a subdirectory of a system temp dir (#36143)
Fixes #35666

* Check that system_temps is all absolute paths
6 years ago
Jordan Borean 8fb66c18de
win_updates: fix regression when using string cat names (#36015) 6 years ago
Sam Doran 97573d8b0c
Add unit tests for edgeos_command (#35861) 6 years ago
Anil Kumar Muraleedharan cf9b427add Changing Lenovo Inc to Lenovo and update License file to be consistent. (#36155) 6 years ago
Chris Houseknecht 69be2c169f
Upgrade to openshift client 0.4.0 (#35127) 6 years ago
John R Barker e4c04aa0f3
Fix YAML issue (#36103) 6 years ago
Brian Coca e8b631d4df corrected dump signature 6 years ago
Martin Krizek 39d9496282 add_host: check if name or hostname arg is provided 6 years ago
tedder e8fc269cd3 fix spelling. Seriously, that's it. 6 years ago
Nathaniel Case 6cdf91fd35
Fix VyOS check mode (#35977)
* Revert "commented out check tests (#35788)"

This reverts commit 3df2561405.

* `discard_changes()` now uses `exit discard`

instead of just `discard`. Also a slight tweak to avoid a second `exit` after
`exit discard`
6 years ago
Nick Wilde aa09ed1a88 Fix typo in examples in Lookup/password plugin. (#35022) 6 years ago
Tomasz Kontusz 89ad40b129 Fix for #31477: return 'dest' from copy when file wasn't changed 6 years ago
Matt Martz 7d1eb88ecf Address memory ballooning caused by task caching changes (#35921)
* Exclude parent when copying included task to avoid memory issues. Fixes #35796

* Simplify implicit block squashing to pre-group, instead of post re-parenting
6 years ago
Brian Coca 79fbe09a4d remove slice filter as it already exists in jinja (#35922) 6 years ago
Alex Tsitsimpis 933bc45cf2 callback: Get handlers with json callback plugin (#35842)
Implement the `v2_playbook_on_handler_task_start()' method in the json
callback plugin to correctly include handlers in the results.

This fixes a bug where the last task in the results returned by
json callback would be wrong if an unconditional handler was triggered,
since the result of that handler would overwrite the result of the last
task.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
6 years ago
Toshio Kuratomi 03c73e2bbb Rename var lookup to vars and add tests 6 years ago
Toshio Kuratomi db29190c28 Allow var lookup plugin to operate on a list of terms
Not sure this has a good use case but it's how nearly all other lookups
work so we should support the common interface.
6 years ago
Toshio Kuratomi 59faad3a6b Fix var lookup plugin to return a list 6 years ago
Toshio Kuratomi 5c085b2436 Fix aysnc failure by forgetting the remote tempdir that async_wrapper will delete on the remote end 6 years ago
Toshio Kuratomi 71f46d69d6 First bit of fixing temporary to have one source of truth (#35747)
* First bit of fixing temporary to have one source of truth

* Fix pep8

* Remove explicit make_tmp_path() in copy

The copy action plugin sets TRANSFER_FILES=True so it does not need to
set the temporary directory explicitly; the base class's run() method
will do that for us.

* Fix for calling a module's run when a shell has already created a temp path.

* Remember to inform the rest of the world when tempdir is removed

* New strategy for how to warn on passing tmp

Now we just warn when calling the parent class run() early.  If the
module does a late call to the parent run() and doesn't make use of the
temporary directory, then we don't check for the possibility that the
user mistakenly is sending tmp in.  If we truly deprecate this (rather
than ignoring it forever) then we might want to switch back to checking
for someone passing a value in as tmp.

* Remove tmp parameter from _execute_module as well

* Port all action plugins to not send tmp explicitly

This is now handled inside of _execute_module via the
_connection._shell.tempdir attribute.

Also update warnings and docs to tell people to set the attribute
instead of using _execute_module's tmp parameter.

* Always set local tempdir variable
6 years ago
Brian Coca 3b0d864683 fix keep remote files 6 years ago
Pilou a7461179cf Fix lookup plugins documentation (nios, conjur_variable) (#35847)
* conjur_variable lookup plugin doc: fix YAML
* nios lookup plugin doc: fix a typo
6 years ago
Chad Norgan 9bbf97632c [WIP] Add new network module for EdgeOS (#33109)
* Add edgeos network module using network_cli

* Add documentation and some sanity test fixes

* Update copyright and documentation
6 years ago
Toshio Kuratomi 8a2bda0e06 When tempdir fails to be created, we have nothng to remove
This commit should get us a better error traceback when things do go
wrong.

References #35613
6 years ago