Commit Graph

242 Commits (e03fcda6da9be47690047de53e3d57fab27eba98)

Author SHA1 Message Date
Sloane Hertel e03fcda6da
Remove deprecated configs for DEFAULT_FACT_PATH, DEFAULT_GATHER_SUBSET, and DEFAULT_GATHER_TIMEOUT (#82978)
Instead, set module_defaults at the play level, which will apply to the
gather_facts keyword as well as any
ansible.builtin.setup/ansible.builtin.gather_facts tasks.

- hosts: all
  gather_facts: yes
  module_defaults:
    ansible.builtin.setup:
      fact_path: /path/to/facts.d/
      gather_subset: '!all,!min,local'
      gather_timeout: 20
  tasks:
    # also applies to:
    - ansible.builtin.setup:
    - ansible.builtin.gather_facts:

If you wish to only apply these to the gather_facts keyword, set as play keywords.
2 months ago
Matt Clay 1c17fe2d53
Drop Python 3.7 support (#82982) 2 months ago
Matt Martz 5566a655ae
Updates to interpreter discovery for 2.17 (#82420) 4 months ago
Brian Coca 55065c0042
Role fixes (#82339)
* Various fixes to roles

  - static property is now properly set
  - role_names and other magic vars now have full list
  - role public/private var loading is now done when adding to play.roles instead of on each var query
  - added tests

Co-authored-by: Felix Fontein <felix@fontein.de>
6 months ago
Brian Coca 1dd0d6fad7
remote log info (#81711)
Both posix and powershell avenues updated to allow for customized string logging on remote

Co-authored-by: Jordan Borean <jborean93@gmail.com>
6 months ago
Brian Coca e2d108db2b
log verbosity (#81692)
Allow users to adjust verbosity to logs at same or higher level than to callback/screen

Co-authored-by: Matt Clay <matt@mystile.com>
7 months ago
Brian Coca 2908a2c32a
corrected become same user config docs (#82059)
fixes #82057
8 months ago
Brian Coca bf29458726
Address nuance in key checking docs (#82058)
* Address nuance in key checking docs

  and add note to ssh plugin to let users know 'final authoritative source'.

* Update lib/ansible/plugins/connection/ssh.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Matt Clay b94ee1cefd
Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
8 months ago
Martin Krizek e756e359e0
Remove deprecated JINJA2_NATIVE_WARNING env var (#81720)
Fixes #81714
8 months ago
Brian Coca ab6a544e86
Import role public (#81772)
revert to previous behavior to push vars to play at compile time
add `public` parameter to allow per import control of exporting (vs just the global config)

Co-authored-by: tchernomax <maxime.deroucy@gmail.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
8 months ago
Abhijeet Kasurde 989ea7a9f0
Misc. fixes in base.yml (#81771)
* Convert Latin short forms to English wording
* Typo fixes
* Sentence rewording

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
9 months ago
Brian Coca 9edf64eaeb
Deprecating paramiko options in base config (#81593)
* Deprecating paramiko options in base config

 they exist in the plugin itself since 2.14

* clog
9 months ago
Martin Krizek 470f41b275
Deprecate STRING_CONVERSION_ACTION (#78860) 10 months ago
Sloane Hertel 48dfe8e215
add Python 3.12 support to ansible-test (#80834)
* update docker containers versions to use newer ansible-test ref in the pre-built venvs

* Allow invoking ansible-test with Python 3.12

* Add python3.12 to the INTERPRETER_PYTHON_FALLBACK

* changelog

* add Python 3.12 as a non-default Python version for the test containers

* Update mypy ignores for Python 3.12

* Add Python 3.12 to CI matrix for unit tests, generic tests, and galaxy

* Update unit test for using the Python 2 collection loader path with Python 3.

Skip the existing test on Python 3.12, since find_module is removed.

Suppress the pre-existing deprecation warnings using the Python 2
codepath with Python 3.

Add a test for Python >= 3.12, which doesn't call find_module.

* Ignore sanity test errors on systems without libselinux present.
11 months ago
Yuri Khan 371b62eab1
Add test for 256-color configuration values (#78613)
* Add test for 256-color configuration values

See #78607.

* color is not restricted to 16 choices

 currently supports up to 256, not listing them all
 TOOD: create examples and point to/list the basic 16

---------

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
Co-authored-by: Matt Clay <matt@mystile.com>
11 months ago
Brian Coca ee12bafe48
deprecate 'smart' connection value (#81218)
Co-authored-by: Jordan Borean <jborean93@gmail.com>
11 months ago
Sloane Hertel e780b5e56d
ansible-galaxy - add config option for the default ansible-galaxy timeout (#81108)
allow configuring the default server timeout via env/ini
12 months ago
Jordan Borean 98d1cf7aa2
Deprecate plural collections_paths option (#81063)
* Deprecate plural collections_paths option

* Fix test assumption
12 months ago
Sloane Hertel ecbbd7e5d1
Remove Python 3.5 support (#80972)
* Remove Python 3.5 support

* changelog

* add requested changes

* Update changelogs/fragments/remove-python3.5.yml

Co-authored-by: Matt Clay <matt@mystile.com>

* remove Python3 < 3.5 error handling

* remove Python3 < 3.5 error handling in TE too

---------

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Maxwell G 734f38b259
Add GALAXY_COLLECTIONS_PATH_WARNINGS option. (#78487)
* Add GALAXY_COLLECTIONS_PATH_WARNING option.

This allows users to disable warnings from `ansible-galaxy collection
install` about `--collections-path` missing from Ansible's configured
collections_paths.
1 year ago
Matt Martz 0ee7cfb128
Implement checks, and backwards compat change, to move forward with UTF-8 only (#80370)
Co-authored-by: Sandra McCann <samccann@redhat.com>
1 year ago
faust 0a2b96f402
typos (#79377) 2 years ago
Abhijeet Kasurde a48c442275
Misc Typo fixes (#79088) 2 years ago
Sloane Hertel eecc4046e8
Fix empty str defaults in config/base.yml (#77733)
* fix empty str default for config/base.yml config options by rendering '' instead of ``''``

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2 years ago
Brian Coca fcea07bbef
Custom salt for ansible-vault encrypt (#79063)
* Custom salt for ansible-vault encrypt

  add VAULT_ENCRYPT_SALT config
  add salt testing


Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Piotr Stawarski <p@stawarski.pl>
2 years ago
Brian Coca 4b0697ee03
make pager and editor configurable, specifically for ansible (#78816)
* make pager and editor configurable, specifically for ansilbe

  fallback on common ways to configure
2 years ago
Martin Krizek 228d25a321
Remove deprecated ANSIBLE_COW_WHITELIST/cow_whitelist (#78831)
Fixes #78819
Fixes #78820
2 years ago
Martin Krizek d514aeb2a1
Remove deprecated ANSIBLE_CALLBACK_WHITELIST/callback_whitelist (#78830)
Fixes #78821
Fixes #78822
2 years ago
Brian Coca 0de4480467
allow multiple types for null representation (#78451)
* allow multiple types for null representation

  '' is not Nonetype
  fixes #76493
2 years ago
Brian Coca fa35aa4865
Galaxy server config updates (#77106)
* ansible-galaxy configurable timeouts

  - also fixed issues with precedence,
    so --ignore-certs now overrides config
  - made galaxy_timeout generic setting,
    if set, it becomes default for server configs,
    but now specific servers can override
  - updated tests or added notes (some tests ignore/override precedence)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Brian Coca 3a5a61b783
hide distro map since it is not configurable (#78068)
make it a private setting for internal use and avoid
 user confusion by not displaying it with normal configuration options
2 years ago
Brian Coca dbbeea0686
more context on multiple facts modules (#77896) 2 years ago
Matt Clay dfde4be444 Add Python 3.11 support.
ci_complete
ci_coverage
2 years ago
Martin Krizek ec00c9c64e
Deprecate FACT_PATH/GATHER_SUBSET/GATHER_TIMEOUT defaults (#77656) 2 years ago
Matt Clay 32d67ce998 Exclude Python 2.6 from interpreter discovery. 2 years ago
htol d7fbde4ea9
Make "~/.ansible" path configurable (#76114)
* replace hardcoded '~/.ansible' to C.ANSIBLE_HOME
* rename previously existing env ANSIBLE_HOME in env-setup script
* modify cache dir monkeypatching in galaxy api unit tests
* update "version_added" to 2.14 for ANSIBLE_HOME
* fix description of collections with proper use of ANSIBLE_HOME

Co-authored-by: htol <github@h-tol.net>
Co-authored-by: stefanwascoding <stefan@syntaxhelden.de>
2 years ago
Sloane Hertel 62fe4718cb
Fix ini section for INVENTORY_UNPARSED_WARNING (#77478) 2 years ago
Jon "The Nice Guy" Spriggs 5b44035983
Hide "[WARNING]: No inventory was parsed" message (#65499)
* Add config option INVENTORY_UNPARSED_WARNING to hide the warning "No inventory was parsed, only implicit localhost is available"
2 years ago
Martin Krizek d4dd4a82c0
Remove deprecated default.plugin_filters_cfg config option (#77429)
* Remove deprecated default.plugin_filters_cfg config option

Fixes #77398

* Fix tests
2 years ago
Martin Krizek a421a38e10
Remove deprecated NETWORK_GROUP_MODULES env var (#77428)
Fixes #77397
2 years ago
Martin Krizek f2387537b6
Remove deprecated DISPLAY_SKIPPED_HOSTS env var (#77427)
Fixes #77396
2 years ago
Martin Krizek ff8a854e57
Remove deprecated LIBVIRT_LXC_NOSECLABEL env var (#77426)
Fixes #77395
2 years ago
Martin Krizek 6d260ad967
Remove COMMAND_WARNINGS and warn (#77411)
* Remove COMMAND_WARNINGS and warn

Fixes #77394
2 years ago
Martin Krizek e080bae766
Remove deprecated ALLOW_WORLD_READABLE_TMPFILES config option (#77410)
Fixes #77393
2 years ago
Sandra McCann f03624e295
clarify how to customize ansible cli output (#77357) 2 years ago
Sloane Hertel f96a661ada
ansible-galaxy - add configuration options for more flexible collection signature verification (#77026)
* Add a toggle to control the number of signatures required to verify the authenticity of a collection

* Make the default number of required valid signatures 1

* Add option to make signature verification strict and fail if there are no valid signatures (e.g. "+1")

* Use a regex to validate --required-valid-signature-count

* Add a toggle to limit the gpg status codes that are considered a failure

* Update documentation and changelog

* Add unit and integration tests for the new options

* Fixes #77146

Fix using user-provided signatures when running 'ansible-galaxy collection verify ns.coll --offline'

Add a test for a user-provided signature when running ansible-galaxy collection verify with --offline

Fix displaying overall gpg failure without extra verbosity

Add a test for displaying gpg failure without verbosity

Improve documentation to be more clear that signature verification only currently applies to collections directly sourced from Galaxy servers
2 years ago
Sloane Hertel 43e55db208
ansible-galaxy - add signature verification of the MANIFEST.json (#76681)
* ansible-galaxy collection install|verify:

  - Support verifying the origin of the MANIFEST.json when the Galaxy server has provided signatures.
  - Allow supplemental signatures to use during verification on the CLI/requirements file.

* ansible-galaxy collection install:

  - Support disabling signature verification. This silences the warning provided by ansible-galaxy if the Galaxy server provided signatures it cannot use because no keyring is configured.
  - Store Galaxy server metadata alongside installed collections for provenance. This is used by 'ansible-galaxy collection verify --offline'.

* Add unit tests for method that gets signatures from a Galaxy server

* Add integration tests for user-provided signature sources

- Test CLI option combinations
- Test installing collections with valid/invalid signature sources
- Test disabling GPG verification when installing collections
- Test verifying collections with valid/invalid signature sources

* Make signature verification advisory-by-default if signatures are provided by the Galaxy server

- Make the default keyring None
- Warn if the keyring is None but the Galaxy server provided signatures
- Error if the keyring is None but the user supplied signatures
- Error if the keyring is not None but is invalid

* changelog

* add ansible-galaxy user documentation for new options

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Andy Mott <amott@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
2 years ago
Felix Fontein ee80e856c2
Remove more whitelist and blacklist occurances (docs only). (#76845) 2 years ago
Brian Coca 04d4900518
config, moved 'choices info to keys (#76569)
* config, moved 'choices' from wall of text, to keys
* updated to ensure all pythons handle the 2 modes correctly
* Update lib/ansible/config/base.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>
2 years ago