Commit Graph

48002 Commits (d672ee1c030328e421f92f4dc862ddc9c33e2091)
 

Author SHA1 Message Date
lospatchos 5399127ec0
Update sesu.py: use defined prompt (#69835)
* Update sesu.py: use defined prompt

* Add changelog fragment

Co-authored-by: Alexandros Zachos <alexandros.zachos@cz.ibm.com>
5 years ago
Abhijeet Kasurde 3e36350309
[2.9] Handle disabled service units (#69804)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 723a904f4e)
5 years ago
Nilashish Chakraborty 6c9ebd76d1
Feature privilege status should only be checked if we need to escalate priv (https://github.com/ansible-collections/cisco.nxos/pull/61) (#69766)
Check feature privilege status only if priv escalation is required

Reviewed-by: https://github.com/apps/ansible-zuul
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 98a1e1f7a6
Remove unused import from frr cli plugin (#67790) (#69764)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 357ae7ec0e)

Add changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Co-authored-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
ximon18 0e9477262f
Add validity check for [Driver][IPAddress] else use docker-machine ip command. (#69696)
* Add validity check for [Driver][IPAddress] else use docker-machine ip command. (backport of https://github.com/ansible-collections/community.general/pull/412)

* Add validity check for [Driver][IPAddress] else use docker-machine ip command.

* Note why we fallback to the `docker-machine ip <machine name>` command.

Co-authored-by: Ben Roose <ben.roose@wichita.edu>

* Backport the changelog as requested.

Co-authored-by: Ben Roose <ben.roose@wichita.edu>
5 years ago
Jose Angel Munoz eb2fae7951
Fixes collection.general 407 (#69695) 5 years ago
Martin Nečas 28b99ead44
Backport: Support direct upload/download to Image I/O daemon on oVirt node (#69691)
* ovirt_disk: fix upload/download of image

* add changelog
5 years ago
Nilashish Chakraborty d5b648ee41
Add FQCN mappings for network facts modules (#69601) (#69689)
* Add FQCN mappings for network facts modules

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add unit tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* update entry for ironware

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit dae3ba71a8)

Add changelog
5 years ago
Abhijeet Kasurde f6829b386e
[2.9] Typecast results before use in profile_tasks callback (#69665)
If user specifies sort_order to none, results are not converted to list.
This fix force this typecasting before using the results.

Fixes: ansible/ansible#69563

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Sam Doran 6abe3a889d
[stable-2.9] file - return 'state': 'absent' when a file does not exist (#66503) (#69657)
This was changed in ansible/ansible#51350.
(cherry picked from commit cd8920af99)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Brian Coca 9e00214fb4
fix delegation vars usage (debug still shows inventory_hostname (#69520)
* fix delegation vars usage (debug still shows inventory_hostname) (#69244)

* fix delegation vars usage and reporting

 - just pass delegated host vars + task vars to plugins
   and avoid poluting with original host vars
 - updated tests

(cherry picked from commit 2165f9ac40)

* fix delegated interpreter discovery (#69604)

* fix delegated interpeter
* allow returning fact if it is 'the right host'
* added note for future fix/efficiency
 as it stands we rerun discovery for the delegated host
unless its saving facts to itself
 * fixed test lacking delegate_to mock

(cherry picked from commit de3f7c7739)

* Fix `ansible -K` become_pass regression (#69629)

* Fix `ansible -K` become_pass regression

Change:
- This fixes a breaking change introduced in
  2165f9ac40

Test Plan:
- Local VM for now, with plans to add an integration test for -K going
  forward.

Tickets:
Refs #69244

(cherry picked from commit fe9696be52)

* fix discovery on loop with delegation (#70013)

* fix discovery on loop with delegation

fixes #69963

(cherry picked from commit 4c9d9dbb56)

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Nilashish Chakraborty 0cdaec5316
Add platform guide for FRR (#69773) (#70067)
* Add platform guide for FRR

* Add entry in index

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 5a7f2f9d5d)

Add changelog
5 years ago
Sam Doran 4c1777e26e
[stable-2.9] Properly handle unicode in safe_eval (#68576) (#69626)
* Properly handle unicode in safe_eval

Fixes #66943

* Update lib/ansible/template/safe_eval.py

Co-authored-by: Sam Doran <sdoran@redhat.com>.
(cherry picked from commit ecd986006e)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
5 years ago
Sumit Jaiswal ef01267eb6
ios_l3 loopback backport (#69593) 5 years ago
yanzhangi e78c8be3d1
Modify the way of parsing NETCONF XML message in ce.py (#69571)
* update module_utils for ce

* update module_utils for ce

* Module modification information

* Module modification information
5 years ago
Sam Doran df3540073c
[stable-2.9] lineinfile - Use ANSIBLE_REMOTE_TMP for temporary file (#69543) (#69549)
(cherry picked from commit b8469d5c7a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Brian Coca f39b106f83
only show_vars when showing vars (#69365) (#69504)
* only show_vars when showing vars

avoid processing function params that can be very expensive
and might not be used at all in called function.

fixes #69357

* Update changelogs/fragments/69357_optimize_inventory_graph_wo_vars.yml

Co-authored-by: Sloane Hertel <shertel@redhat.com>

Co-authored-by: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit f0b6f76bc6)
5 years ago
Sumit Jaiswal 0438165f58
Backport to fix ios_vlans vtp version 2 issue (#69501)
* fix ios_vlans issue

* add changelog
5 years ago
Martin Krizek 036e604587
Remove deprecation for TRANSFORM_INVALID_GROUP_CHARS (#66650) (#69487)
Fixes #61889

(cherry picked from commit 6086ea62ee)
5 years ago
Martin Krizek 4ed4d2d280
Validate args for includes in handlers too (#57537) (#69448)
(cherry picked from commit 9645304da3)
5 years ago
Matt Martz 95f0d3ff8d
[stable-2.9] Fix galaxy publish sha256 value format. (#67942) (#69435)
* Fix galaxy publish sha256 value format.

The multipart/form content used for the body
of the POST to /api/automation-hub/v3/collections
was missing a newline before the line with the value
of the sha256.

automation-hub/galaxy/django skips the field entirely in
that case and automation-hub code will use None for default
to indicate that no sha256 is provided (an available option).

Fixes ansible/galaxy-dev#246

* Add changelog fragment

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit cd8dd4a)

Co-authored-by: Adrian Likins <alikins@redhat.com>

Co-authored-by: Adrian Likins <alikins@redhat.com>
5 years ago
Chih-Hsuan Yen 6aca3a2c69
Fix/archive empty file (#64895) (#69420)
* Remove call to filecompare to fix issue with empty file exclusion from archive

* Add empty file

(cherry picked from commit 277dd54d45)

Co-authored-by: Nabil BENDAFI <nbendafi@yseop.com>
5 years ago
Felix Fontein abbb8c4ea8
ansible-test: don't trigger full CI run for changes to changelogs/ and docs/ in collections (#68550) (#69408)
* Don't trigger full CI run for changes to changelogs/ and docs/ in collections.

* Add changelog fragment.

* Update changelogs/fragments/68550-ansible-test-docs-changelogs.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit bae5f18f5c)
5 years ago
Felix Fontein 6280bd7af2
Fix ansible-test PATH handling. (#69407)
(cherry picked from commit f1b3e8364e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein b8808efd26
Fix ansible-test module_utils import analysis. (#69406)
Now empty `*.py` files are ignored during module_utils import analysis for change detection.
This eliminates "No imports found" warnings for files which should have no imports.

(cherry picked from commit ab27680318)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein c43b03abe9
Fix shebang sanity test module identification. (#69404)
(cherry picked from commit 9d0113be5c)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein 380be7581e
Address compat issue for collection loading on py26 (#68219) (#69402)
* Address compat issue for collection loading on py26

* Move import_module shim to utils for compat across the codebase

* Enable collection tests on py2.6

* Update changelog fragment

* Simplify code using sys.moduls

* Move compat to module_utils/compat/importlib

* Add back errantly deleted newline

* Remove hack comment

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit da3a90e88e)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Chih-Hsuan Yen c57ca3fbf2
enables to set keys not present in existing config (#69399)
((cherry picked from commit 95525030e2)

Co-authored-by: satunnainen <satunnainen@users.noreply.github.com>
5 years ago
Tadej Borovšak 4670c3bab8
Instruct collection build command to ignore .git file (#69271)
In some advanced git usage scenarios, .git is not a directory. One
such example when developer use worktrees where each worktree contains
a .git symlink to the real .git directory.
5 years ago
Abhijeet Kasurde dff302701a
[2.9] Update developing_modules_best_practices.rst (#69939)
wrong module path for module_utils.basic in developing_modules_best_practices.rst

(cherry picked from commit ff98ecc4d0)

Co-authored-by: usatosi <usatosi@e-mail.jp>
5 years ago
Martin Nečas 3e1d4cb6d7
Backport: ovirt_storage_vm_info fix example (#69940)
* ovirt_storage_vm_info: fix example

* add changelog
5 years ago
Martin Nečas ce9493fdb5
Backport: ovirt_vm fix quotas example (#69942)
* ovirt_vm: fix quotas example

* add changelog
5 years ago
Martin Nečas b665a65fea
ovirt: update operating system options backport (#69449)
* ovirt: update operating system options backport

* add changelog
5 years ago
Matt Davis 05aed52d8e
fix get_data on case_insensitive fs (#69955)
* fix get_data on case_insensitive fs

* implement case-sensitive-forcing versions of various os.path methods that just pass through on case-sensitive systems.

* catch broader IOError for py2/py3 compat

* optimization: factor out case-insensitive comparison

* implement case-sensitive open
5 years ago
Felix Fontein 55eb2766ae
[2.9] ansible-test: make pylint deprecation plugin not choke on tagged versions (#69851)
* ansible-test pylint: do not choke on module.deprecate() / display.deprecated() version which has string components.

* Add changelog fragment.
5 years ago
Travis Burton 5192f68f3a
Update mso_schema_site_anp_epg_domain.py (#69703)
anp, epg are required arguments for module.  fatal error occurs when not specified: "FAILED! => {"changed": false, "msg": "missing required arguments: anp, epg"}"
5 years ago
Felix Fontein 9731787b12
Fix documentation of docker_host_info (it does not delete). (#69745) 5 years ago
Sam Doran f963aba45a
[stable-2.9] Pin Docker version at 19.03.1 (#69635) (#69645)
* [stable-2.9] Pin Docker version at 19.03.1
(cherry picked from commit fe941a4045)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* [stable-2.9] Pin docker-ce-cli version in tests (#69620)

Installing docker-ce has a dependency of docker-ce-cli. If the version of docker-ci-cli is not specified, it installs the latest version.

(cherry picked from commit 889da811d7)
5 years ago
Sandra McCann 7adce02130
Explain module docs loss for devel (#68369) (#69546)
(cherry picked from commit 0d379d4205)
5 years ago
Rick Elrod b4b27d631f Update Ansible release version to v2.9.9.post0. 5 years ago
Rick Elrod 6f83b9aff4 New release v2.9.9 5 years ago
Mark Goddard 5a0d35646d Fix fileglob plugin with non-existent subdirectory
Since Ansible 2.9.8, if the fileglob plugin is passed a path containing
a subdirectory of a non-existent directory, it will fail. For example:

lookup('fileglob', '/'): ok
lookup('fileglob', '/foo'): (non-existent): ok
lookup('fileglob', '/foo/bar'): (non-existent): FAIL

The exact error depends on Python 2 or 3, but here is the error on
Python 2:

    AttributeError: 'NoneType' object has no attribute 'endswith'

And on Python 3:

    TypeError: expected str, bytes or os.PathLike object, not NoneType

This change fixes the issue by skipping paths that are falsey before
passing them to os.path.join().

Fixes: #69450
5 years ago
Matt Clay 457a1115e8 Update Ansible release version to v2.9.8.post0. 5 years ago
Matt Clay ed2a39d68e New release v2.9.8 5 years ago
Brian Coca 972e55327c [stable-2.9] added missing clog for 58461
(cherry picked from commit 96f504cd11)

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
5 years ago
Matt Clay 28e9121d94 Disable failing azure_rm_dnszone test.
The module requires updates to work with the current Azure API.
5 years ago
Matt Clay 8b2957aac3 Revert "2.9: native types: literal_eval all the things (#68938) (#69044)"
This reverts commit 70b4ce5efd.
5 years ago
Jordan Borean 330112a45c Fix win_psmodule and win_psrepository tests 5 years ago
Ganesh Nalawade e40b96ed88
Refactor CLI prompt mode check for network plugins (#63945) (#69210)
* Refactor CLI prompt mode check for network plugins (#63945)

* Refactor CLI prompt mode check for network plugins

*  Move the CLI prompt mode check logic from action plugin
   to the controller side with the cliconf plugins.

*  This refactor also allows the network modules
   to initialise the persistent connection with remote device
   only when it is required.

* Fix review comments

(cherry picked from commit c27e47327f)

* Fix cli context check for network_cli connection (#64697)

* Fix cli context check for network_cli connection

Fixes #64575

*  Check cli context for network_cli connection
   at the start of new task run only.

* Pass task_uuid around to identify start of new task run

* Handle for local connection

(cherry picked from commit ee3f8d28a4)

* Add test for reboot & wait_for_connection on EOS & IOS (#63014)

* Add test for reboot & wait_for_connection

* Add test for ios

* Collection-proof block test

* Add junos test

* Don't try to evaluate cli context unless using the connection

* Prevent infinite recursion

* Update change log

(cherry picked from commit e19b94f43b)
(cherry picked from commit ee3f8d28a4)
(cherry picked from commit e19b94f43b)

devel:
https://github.com/ansible/ansible/pull/63945
https://github.com/ansible/ansible/pull/64697
https://github.com/ansible/ansible/pull/63014

Co-authored-by: Nathaniel Case <ncase@redhat.com>
5 years ago
Chih-Hsuan Yen fbf93db4a8 [2.9] service_facts: fix for systemd 245
* service_facts: fix for systemd 245

Since systemd 245, `systemctl list-unit-files` comes with a new column
"VENDOR PRESET" [1] and breaks the service_facts module:

This patch drops the third column to make it work with old and new
systemd. With the new slice operation, IndexError instead of ValueError
is raised if the output contains less than 2 columns.

Test plan: running `ansible-test integration -v service_facts` on
up-to-date Arch Linux

[1] https://github.com/systemd/systemd/pull/14445

* add changelog

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit bd4fdb1ca2)
5 years ago