Commit Graph

47978 Commits (2cba0dc75c994afa2bc96ada3595f0bdc79b16d8)
 

Author SHA1 Message Date
Martin Krizek 2cba0dc75c
Do not keep empty blocks after tag filtering (#69987) (#69999)
This prevents PlayIterator having to go through empty blocks
that were created in filter_tagged_tasks. This should
be a performance improvement for playbooks that mostly skip
tasks with tags.

ci_complete

(cherry picked from commit ac20466375)
5 years ago
Brian Coca 94df27233f
fixed missing default (#69972) (#69985)
* fixed missing default (#69972)

* fixed missing default

 also deprecated so new options wont have to go through this

(cherry picked from commit 805dff4129)

* remove deprecation
5 years ago
Lauri Tirkkonen 074ddace35
zfs_delegate_admin: add diff,hold,release to list of permissions (#69962)
Co-authored-by: Lauri Tirkkonen <lauri@tuxera.com>
5 years ago
Martin Nečas 34e804a4f2
Backport: ovirt_disk force wait when uploading disk (#69943)
* ovirt_disk: force wait when uploading disk

* add changelog
5 years ago
Martin Nečas 23761b9880
Backport: ovirt_vm fix cd_iso search by name (#69941)
* ovirt_vm: fix cd_iso search by name

* fix pylint

* add changelog
5 years ago
Abhijeet Kasurde 5ee9072613
[2.9] Handle set object retrieved from lookup plugin (#69901)
self.client.resources.api_groups is a dict_keys and is not
handled correctly by default callback plugin while JSON serialization.

This fix will typecast it to list so that it can be JSON serialized for
further processing.

Fixes: ansible-collection/community.kubernetes#111

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Alex Schultz a5c85b477b
Fix IncludedFile equality check (#69524) (#69885)
In the case of a free style strategy, it is possible to end up with
multiple hosts trying to include from the same role, however the tasks
being included may be different with the use of tasks_from.  Previously
if you had two hosts that were included the same role when the
process_include_results function tries to determine if a included needs
to be run on a specific host, it would end up merging two different
tasks into which ever one was processed first.

This change updates the equality check to also check if the task uuid
associated with the IncludedFile is the same. The previous check only
checked if the task's parent uuid was the same. This breaks down when
both includes have the same parent.

    - hosts: all
      strategy: free
      gather_facts: false
      tasks:
        - include_role:
            name: random_sleep
        - block:
          - name: set a fact (1)
            include_role:
              name: set_a_fact
              tasks_from: fact1.yml
          - name: set a fact (2)
            include_role:
              name: set_a_fact
              tasks_from: fact2.yml
        - name: include didn't run
          fail:
            msg: >
              set_a_fact didn't run
              fact1: {{ fact1 | default('not defined')}}
              fact2: {{ fact2 | default('not defined') }}"
          when: (fact1 is not defined or fact2 is not defined)

Closes #69521

(cherry picked from commit 247e43b252)
5 years ago
Jill R c51ce1e47c
Add mod_defaults for AWS collections (#69818)
We need to be able to add 2.9 CI jobs for AWS collections. Modules added
during the 2.10 dev cycle will need mod default entries to support test suites
5 years ago
Nilashish Chakraborty dec1953cf7
Fix for vdc with no interface in N7K (https://github.com/ansible-collections/cisco.nxos/pull/68) (#69806)
Fix for vdc with no interface in N7K

Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
             https://github.com/NilashishC
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog

Co-authored-by: praveenramoorthy <62758226+praveenramoorthy@users.noreply.github.com>
5 years ago
Matt Clay 7f31a7a488 [stable-2.9] Disabled inconsistent pylint checks.
(cherry picked from commit 8152d8bc1a)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Paul Belanger 16f0b7461c
Support `removed_at_date` in ansible-doc (#70002) (#70015)
* Support removed_at_date in ansible-doc

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

Changes:
  * ansible-doc does not support `removed_at_date` and assumes that
    deprecated dict will either have `removed_in` or `version`. This
    results in ansible-doc (and hence "sanity --test=ansible-doc")
    failing for modules having only `removed_at_date`.

  * This patch adds support for `removed_at_date` and also gives it
    precedence over `removed_in` or `version`.

* Add tests and changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 9d6b0f2b03)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>

Co-authored-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
5 years ago
Jill R 41bed21e20
ec2_group: Ensure group-based rule targets have consistent data formats (#69748)
Ensure group-based rule targets have consistent data formats throughout the module.
Backported from https://github.com/ansible-collections/amazon.aws/pull/33
5 years ago
Alex Schultz 4a5f9e87cc
Split regular and handler results into their own queues (#69498) (#69730)
When mixed with the free strategy (or any custom strategy that does not behave in
a lock-step manner), the linear methodology of _wait_on_handler_results may cause
race conditions with regular task result processing if the strategy uses
_process_pending_results directly. This patch addresses that by splitting the queues
used for results and adding a flag to _process_pending_results to determine which
queue to check.

Fixes #69457

(cherry picked from commit a4072ad0e9)

Co-authored-by: James Cammarata <jimi@sngx.net>
5 years ago
Sergey bc550fd935
Don't pass tenant_id for remote group in os_security_group_rule (#69726) 5 years ago
Nilashish Chakraborty 307d86de4b
Fix system default dict generation (#69690)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog
5 years ago
Nathaniel Case d9366cb818
[stable-2.9] Allow the use of paramiko_conn before connection (#61570) (#69642)
* [stable-2.9] Allow the use of _paramiko_conn even if the connection hasn't been started. (#61570)

* Allow the use of _paramiko_conn even if the connection hasn't been started.

I'm not sure what the benefit is of Noneing paramiko_conn on close, but will keep for now

* Fix test

* Try to fix up net_put & net_get

* Add changelog.
(cherry picked from commit 50e09be14f)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* Restore check_prompt and task_uuid
5 years ago
Sam Doran a259d79ad6
[stable-2.9] Fix filedescriptor out of range in select() when running commands (#65058) (#69517)
* Fix filedescriptor out of range in select() when running commands

* Simplify the run_command() code

Now that we're using selectors in run_command(), we can simplify some of
the code.

* Use fileobj.read() instead of os.read()
* No longer use get_buffer_size() as we can just slurp all of the data
  instead.

Also use a simpler conditional check of whether the selector map is
empty

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>.
(cherry picked from commit f200487414)

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
5 years ago
Brian Coca 4f39d9ac65
avoid fatal tb on bad fqcn callback name (#69440) (#69496)
(cherry picked from commit 0aa76503dc)
5 years ago
Nilashish Chakraborty 156b302b4b
Fix issue with replaced (#69477)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog
5 years ago
Daniel Mellado e652706d63
Add missing options for GRE interface (#69426)
This commit adds some missing options related to gre interfaces on
junos_interfaces module.

Cherry-picked from https://github.com/ansible-collections/junipernetworks.junos/pull/37
Fixes: https://github.com/ansible-collections/junipernetworks.junos/issues/36

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
5 years ago
Felix Fontein c333846097
Fix ansible-test import analysis for collections. (#68352) (#69405)
* Fix ansible-test import analysis for collections.

* Ignore plugins/module_utils/__init__.py

(cherry picked from commit 0ca3feb861)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Martin Krizek 54d96eae8c
Ensure --version works with non-ascii project path (#66624) (#69789)
Fixes #66617

(cherry picked from commit 3606dcfe65)
5 years ago
Sam Doran a9f5f45d45
[stable-2.9] RoleRequirement - Include stderr in the error message (#66006) (#69486)
* RoleRequirement - Include stderr in the error message if there's a non-0 return code

* Don't try to concatenate str and bytes

Co-Authored-By: Sam Doran <sdoran@redhat.com>
(cherry picked from commit 1b3ca34)

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

Co-authored-by: Sloane Hertel <shertel@redhat.com>
5 years ago
Felix Fontein 4744f31023
Fix ansible-test egg-info directory detection. (#69403)
(cherry picked from commit 8b63da7b43)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Abhijeet Kasurde 153de5ee49
[2.9] podman_image: use correct option for remove_signatures flag (#68979)
podman_image module uses 'podman push' command with wrong
flag '--remove_signatures' instead of '--remove-signatures'

This patch fixes the given typo.

Fixes: ansible/ansible#67965

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein cf244c094a
[2.9] Prevent Ansible 2.9 to choke on collections using deprecation by date or collection_name for deprecation calls (#69935)
* Prevent Ansible 2.9 to choke on collections using deprecation by date or collection_name for deprecation calls.

* Add changelog fragment.

* Fix YAML.

* Improve C# compatibility.

* Add tests for AnsibleModule.

* Fix var name.

* Fix type.

* Update C# code.

* Show deprecation warning if removed_at_date is used for Python modules.

* Update changelogs/fragments/69935-2.10-deprecation-support.yml

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>

* Prevent crash of validate-modules if 'removed_in' is not in 'deprecated'.

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
5 years ago
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