Commit Graph

430 Commits (devel)

Author SHA1 Message Date
Brian Coca 949c503f2e
config, integrate dynamic galaxy servers (#83129)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
3 days ago
Abhijeet Kasurde 375d3889de
ansible-doc: make color configurable (#83311)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 days ago
sournoodl a7e666829e
MUNI tech writers: timeout documentation. (#83152)
* Documentation on the timeout keyword

* wording changes

* keyword description wording edit

* removed whitespace at the end of lines.

* Changed to more accurate wording

---------

Co-authored-by: Niko Mlynarčik <536617@mail.muni.cz>
2 weeks ago
Matt Davis 889012e29e
clean up ansible-connection (#82992)
* clean up ansible-connection stuff

* eliminate unnecessary usage of pty/termios
* always use default pickle protocol
* remove unnecessary wire hashing

Co-authored-by: Kate Case <this.is@katherineca.se>
1 month ago
Don Naro dfc559866a
minor fix for misspelling (#83156)
This change fixes a minor spelling error, indivudually ==> individually.
1 month ago
Brian Coca 46137127a2
ansible-config: ensure we get templated default (#82974)
AKA all defaults rendered
2 months ago
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
snipfoo 5f4e332e37
Fix condition for unquoting configuration strings from ini files (#82388)
* Add prefix to `origin` when configuration variables come from ini files

Fixes ansible#82387

This change was suggested by @bcoca in
https://github.com/ansible/ansible/pull/82388#discussion_r1424235728 and
https://github.com/ansible/ansible/pull/82388#discussion_r1424249732

When configuration variables come from an ini file, their `origin` is
now set to `ini: <file>`. Similarly, once supported, YAML configuration
files will have their `origin` as `yaml: <file>`.

Consequently, since unquoting configuration strings should happen if and
only if they come from an ini file, this condition boils down to testing
whether their `origin` starts with `ini:`.

* Do not add prefix to `origin` but explicitly pass `origin_ftype`

So as not to rely on a specific format of the `origin` string,
as suggested by @sivel in
https://github.com/ansible/ansible/pull/82388#issuecomment-1881714871
2 months ago
Matt Martz e0c91af45f
Remove os.environ compat for py2 and deprecate ansible.utils.py3compat (#82794) 3 months ago
Matt Martz 5566a655ae
Updates to interpreter discovery for 2.17 (#82420) 4 months ago
Brian Coca bec27fb4c0
prettyfy ansible-doc (#75116)
* prettify ansibile-doc output

delimiters when no color
avoid triggering color mode for existing tests
all use _format to observe nocolor
more v more info
imporoved conditional display
updated version on -v
normalize role errors
expand role data, dedupe code, fix formatting on warning
fix bug with galaxy info
role list improvements:
 lists all roles (even w/o meta/argspec)
 specs now indented under role
 role only listed once
Updated tests to reflect format changes

Co-authored-by: Felix Fontein <felix@fontein.de>
4 months ago
Martin Krizek f024cf35d7
Remove the yum module, redirect it to dnf (#81895)
Fixes #81728
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>
5 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
7 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>
7 months ago
Matt Clay 9f899f9492
Require `from __future__ import annotations` (#81902) 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>
8 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
8 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
11 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>
12 months ago
David-Ademola e91bf2248f
Update manager.py (#80926) 1 year ago
Jordan Borean 8db9bd7574
Remove deprecated include (#80752)
* Remove deprecated include

* Add tombstone entry for include

* Use string for date

* Use todays date

* Remove uneeded if statement
1 year ago
Matt Clay e837680f4b
Use strings for `removal_date` in runtime metadata (#80815) 1 year ago
Matt Clay 2cd1744be3
Use ansible.module_utils.common.text.converters (#80704)
Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
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
Miklos Sagi b7ef2c1589
ansible-playbook -K breaks when passwords have quotes (#79837)
Now only 'unquote' when ini config file is the source
1 year ago
Matt Clay 833909ac19
Clean up unused imports in core (#79900)
* Clean up unused imports in core

* Add changelog fragment
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
Brian Coca 4115ddd135
plugin loader fix existing config testing (#78859)
create specific function to find config entry to avoid repopulating constantly
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 9b79d6ba35
config error origin (#78407) 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