Commit Graph

50269 Commits (1787a3dbf53eb2ed743a495dd2711610babea13f)
 

Author SHA1 Message Date
Matt Davis d79b23910a
fix sys.modules cleanup and blacklist behavior (#69898)
* fix sys.modules cleanup and blacklist behavior

* fix map-as-generator py2/py3 issue
* clear path_importer_cache between runs

* sanity fix

* don't be stupid with moving target generators
4 years ago
Rick Elrod efe103cdff
Make add_host be idempotent/show changed status (#69897)
Change:
- The `add_host` action now shows an accurate change status.

Test Plan:
- Added a plethora of integration tests.

Tickets:
Fixes #69881

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Brian Coca 062e780a68
starting metadata sunset (#69454)
* starting metadata sunset

 - purged metadata from any requirements
 - fix indent in generic handler for yaml content (whey metadata display was off)
 - make more resilient against bad formed docs
 - removed all metadata from docs template
 - remove metadata from schemas
 - removed mdata tests and from unrelated tests

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Rick Elrod <rick@elrod.me>
4 years ago
Sam Doran f5718a354c
lineinfile - Add alternative backrefs example to docs (#69844)
* lineinfile - Add alternative backrefs example to docs

* Add changelog
4 years ago
Felix Fontein 2dbd5dc2ae
ansible-test: do not accept empty string as valid version number (#69816)
* Work around strange behavior of StrictVersion and SemanticVersion constructors that they accept an falsy value.

* Do not accept empty strings as versions.
4 years ago
Rick Elrod 3b00c161dc
Re-add documentation for yum "install_repoquery" (#69871)
Change:
- This was removed in 2014 in 122a7021bc.
- The option still exists and is enabled by default and can lead to user
  confusion when people aren't expecting packages (or updated
  dependencies for it) to get installed and they do.
- Add the option documentation back with a few notes to make it clear what
  is happening.

Test Plan:
N/A, no code change, just documentation

Tickets:
- Refs #69497

Signed-off-by: Rick Elrod <rick@elrod.me>

* Fix sanity errors

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Nathaniel Case b69e5c55f4
Only show one deprecation warning if version and date are both defined. (#69808)
This prefers date to version on the basis that date will have been added
in 2.10, and version retained for 2.9 compatibility
4 years ago
the-antz 66bd385f6f
Fix documentation for the assemble modules remote_src property. (#69845) 4 years ago
Sam Doran a02960f506 Remove AIX from test matrix 4 years ago
Ganesh Nalawade 646536643f
Use fqcr from command module invocation using shell module (#69790)
* Use fqcr from command module invocation using shell module

Fixes https://github.com/ansible/ansible/issues/69788

Use fully qualified collection reference while invoking
command module from shell module

* Fox review comment
4 years ago
Alex Schultz 247e43b252
Fix IncludedFile equality check (#69524)
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
4 years ago
Toshio Kuratomi 53b95b865f __eq__ should be redefined if __hash__ is defined. 4 years ago
Matt Clay 4ecf22db9a Revert "fixes f5 modules specific redirects (#69865)"
This reverts commit 16f5dbf985.
4 years ago
Sam Doran 7b632788aa Add Power back to test matrix 4 years ago
Sam Doran 7e5a39d1d3 Add AIX back to test matrix 4 years ago
Wojciech Wypior 16f5dbf985
fixes f5 modules specific redirects (#69865)
* fixes f5 modules specific redirects

* adds removed entry
4 years ago
Brian Coca 22da903e9c
return changed for group_by (#32057)
* return changed for group_by

* added tests and fixed 'early registeration'
4 years ago
David Shrewsbury 2d394382cf
Reap collections changelog fragments - 6 (#69491) 4 years ago
Andrew Klychkov 00ead98595
systemd: should fail in check_mode when service not found on host (#68136)
* systemd: should fail in check_mode when service not found on host
4 years ago
Felix Fontein 6a4455ff54
Update plugin_formatter to understand tagged version_added (#69797)
* Update version_added handling for plugin_formatter w.r.t. #69680.

* Update hacking/build_library/build_ansible/command_plugins/plugin_formatter.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Abhijeet Kasurde d757995bb6
service_facts: Update documentation about service status (#69757)
Update documentation about undocumented service status provided
by systemd

Fixes: #69752

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Dongsu Park 598e3392a9
Discover Flatcar Linux properly for hostname (#69627)
To avoid issues with Flatcar Container Linux being unable to be found,
detect Flatcar distro name especially for hostname, just like CoreOS
Container Linux was supported.

See also https://github.com/ansible/ansible/issues/69516
4 years ago
Sam Doran d7f61cbc28
Update 2.10 roadmap dates (#69771) 4 years ago
Evgeni Golov e10e5fc4ad
only ever catch ImportError (#69792)
ModuleNotFoundError is a subclass of ImportError but only exists in
Python 3.6 or newer. Instead of doing hacks to be able to catch that on
older Pythons, just always only catch ImportError, which will also catch
ModuleNotFoundError on Python 3.6 or later
4 years ago
Jack 80f09efd03
do not return the body even if it failed (#69706)
* do not return the body even if it failed

* add some tests for this and rebase

* import test task

* ignore_errors when fails

Co-authored-by: Jack Zhang <jack.zhang@aspiraconnect.com>
4 years ago
Abhijeet Kasurde 723a904f4e
Handle disabled service units (#69349)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Rick Elrod 2abaf320d7
[ansiballz] ensure that '' is not in sys.path (#69342)
Change:
On OpenBSD when using pipelining, we do not set cwd which results in a
permissions fatal. Ensure that `''` - cwd - is not in `sys.path`.

Test Plan:
Tested against local OpenBSD VM

Tickets:
Fixes #69320

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Hideki Saito 79ab798427 Enable logging using setup_loggers() API in dnf-4.2.17-6 or later
- Fixed issue #28061
- https://bugzilla.redhat.com/show_bug.cgi?id=1788212

Signed-off-by: Hideki Saito <saito@fgrep.org>
4 years ago
Felix Fontein b1b79be08b
Fix return value interpretation of PluginLoader.find_plugin_with_context(). (#69772) 4 years ago
Rick Elrod 3ec18ccb77
Allow announce script to work for base and older (#69768)
Change:
- Generalize the announce script changes from 4dd0f4127

Test Plan:
Harcoded 'hashes' to [] and then:
- Ran with --version 2.9.9 --version 2.10.0.dev1
- Ran with --version 2.9.9
- Ran with --version 2.10.1

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Rick Elrod 61a1fe1d7d
Fix network_cli test to use a trap for cleanup (#69762)
Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Evgeni Golov 53f9822e75
make plugins loader Python 3.5 compatible again (#69754)
ModuleNotFoundError was only introduced in Python 3.6
4 years ago
Sam Doran ee1625f906
Remove Power from test matrix (#69767)
We are having failures due to floating IPs not being cleaned
up and hitting the account limit of 50
4 years ago
Martin Krizek 3606dcfe65
Ensure --version works with non-ascii project path (#66624)
Fixes #66617
4 years ago
Marco Lussetti 1dd8247fba
Add SLES to user_guide/playbook_conditionals.yml (#69262) 4 years ago
Adriano C bfc510a0f8
Update other_tools_and_programs.rst (#69499) 4 years ago
Sloane Hertel e40889e711
Add support to install collections from git repositories (#69154)
* Enable installing collections from git repositories

* Add tests for installing individual and multiple collections from git repositories

* Test to make sure recursive dependencies with different syntax are deduplicated

* Add documentation

* add a changelog

* Skip Python 2.6

* Only fail if no collections are located in a git repository

Add support for a 'type' key for collections in requirement.yml files.
Update the changelog and document the supported keys and allowed values for the type.

Add a note that the collection(s) in the repo must contain a galaxy.yml

* Add a warning about embedding credentials in SCM URLs

* Update with review suggestions

* suppress sanity compile failure for Python 2.6
4 years ago
Karl Fogel 225ae65b0f
Make Python path warning say what it means to say (#69669) 4 years ago
Nilashish Chakraborty c3dff34c15
Add entries for missing network modules (#69760)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
Dmitry 925199511e
Add JetBrains platform tools (#69478) 4 years ago
Sandra McCann c884c5fddf
add pointer to namespace and collection name restrictions (#69761) 4 years ago
Sandra McCann 3a4e227efa
remove build errors including guess (#69711)
* remove build errors including guess

* fixed shippable errors
4 years ago
Sandra McCann f110bcd59e
Turn on linkchecker in sphinx for documentation (#69590)
* add make linkcheckerdocs as option to verify external links

* add back anchor checks

* spacing nit

* fix shippable issue

* Update docs/docsite/rst/conf.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
4 years ago
Felix Fontein 0b82d4499e
ansible-test ansible-doc sanity test: also run with --json parameter (#69288) 4 years ago
Felix Fontein 4794b98f2a
Fix version_added test (#69756)
* Fix version_added test for changes in #69680.

* Fix error message.
4 years ago
Rick Elrod 8e19ab178a
connection plugins: try config, then play_context (#69751)
Change:
Rather than only using config, have base connection plugins fall back to
play_context.

Test Plan:
- Tested ansible-connection logic against an IOS device
- Tested -k against a VM
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
John R Barker eea84b6fdd
routing.yml: update collections (#69699)
* routing.yml: update collections

routing.yml had gotten out of sync since `migrate.py` was run.
Update based on where files are today (more updates are needed)
Also validate routing.yml's schema

* Update lib/ansible/config/routing.yml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* rename scripts

* docker_service

* updated ansible_builtin_runtime schema

* Correct schema for plugin_router and import_redirect

* Correct schema for plugin_router and import_redirect

* validation moved to #69742

* netap, slxos, checkpoint

* test moved to separate PR

* even more

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
4 years ago
Abhijeet Kasurde 7b3d9cbcb8
distribution: Added support for openEuler OS (#69324)
Detect os_family for openEuler OS as 'RedHat', instead of 'openEuler'.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Jordan Borean f81f5da20e
Ansible.Basic added generic fragment merger for module options (#69719) 4 years ago
Felix Fontein 40f21dfd3c
Version source tagging (automatic and manual) for version_added and deprecation versions (#69680)
* Track collection for version_added.
Validate *all* version numbers in validate-modules.
For tagged version numbers (i.e. version_added), consider source collection to chose validation.

* Make tagging/untagging functions more flexible.

* Tag all versions in doc fragments.

* Tag all deprecation versions issued by code.

* Make Display.deprecated() understand tagged versions.

* Extend validation to enforce tagged version numbers.

* Tag versions in tests.

* Lint and fix test.

* Mention collection name in collection loader's deprecation/removal messages.

* Fix error IDs.

* Handle tagged dates in Display.deprecated().

* Also require that removed_at_date and deprecated_aliases.date are tagged.

* Also automatically tag/untag removed_at_date; fix sanity module removal version check.

* Improve error message when invalid version number is used (like '2.14' in collections).
4 years ago