summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use strings for `removal_date` in runtime metadata (#80815)Matt Clay2023-05-161-4/+4
|
* config lookup, new option to show origin of value (#80651)Brian Coca2023-05-112-9/+24
|
* [sanity-mypy] Ignore re-import warning (#80763)Abhijeet Kasurde2023-05-101-1/+1
| | | | | | * get_origin is already imported warning can be ignore safely. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* ansible-test - Avoid use of deprecated utcnow (#80750)Matt Clay2023-05-101-1/+5
| | | The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.
* junit-xml - Remove outdated type ignore hint (#80748)Matt Clay2023-05-091-1/+1
|
* fix error if path had wildcard in it (#74723)PRASOON KARUNAN V2023-05-101-2/+2
| | | | | | | * fix error if path had wildcard in it * add test * add changelog fragment
* setup module, retry facter to handle --puppet errors (#80645)Brian Coca2023-05-081-15/+8
| | | | | | | | | * setup module, retry facter to handle --puppet errors facter versions have changed how they deal with the --puppet flag when puppet is not present, most versions will just ignore it and not error, but initial versions of facter 4 changed the behaviour (later reverted). fixes #80496
* first_found fix no terms option (#76550)Brian Coca2023-05-081-4/+8
| | | | | also fix bug with multiple items clobbering previous settings Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* Prevent setting arbitrary attrs on Jinja2 envs via overrides (#80715)Martin Krizek2023-05-051-1/+4
|
* Fix docstrings RST markup in `ansible-console` CLI module (#80719)Sviatoslav Sydorenko2023-05-041-16/+20
| | | | | | | | | | | | | | | | | | * 📝🐛 Fix RST list @ `ansible-console` manpage Said CLI entrypoint docstring is used to construct the corresponding manpage. `docutils` were producing the following warning with the current RST markup used there, as follows: :36: (WARNING/2) Bullet list ends without a blank line; unexpected unindent. This change puts a portion of the first list entry on a separate line which allows the RST parser stomach it without any problems and produce correct output without gibberish in it. * 🎨📝 Use RST inline code @ ansible-console doc The single backtick syntax was causing things to be interpreted as italics text. The inline code needs double backticks.
* Account for overlays when interacting with Jinja envs (#80705)Martin Krizek2023-05-041-4/+4
| | | | | | | | Instead of using Templar.environment in Templar.do_template for accessing/mutating the environment, myenv local variable should be used because it is the environment used for actual templating. It can either point to Templar.environment or newly created environment overlay. Fixes #80605
* Remove unused code from lib/ansible/collections/ (#80712)Matt Clay2023-05-032-65/+0
|
* Use ansible.module_utils.common.text.converters (#80704)Matt Clay2023-05-03179-183/+183
| | | Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
* Fix typo in comment filter option (#80672)Chris van Meer2023-05-021-1/+1
|
* Better parse virtualenv_command option for pip (#80624)Dmitriy Rabotyagov2023-05-021-1/+14
| | | | | | | | | | Atthe moment if a users wants to protect virtualenv_command by using quotes around 'venv', module will fail out as literal parsing is used at the moment. In order to imrpove things, argparse is leveraged to parse out passed value to the virtualenv_command Closes-Bug: #76372 Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
* Don't include a default for cli as it overrides config with lesser pr… ↵Brian Coca2023-05-011-2/+2
| | | | | | | | (#80650) * Don't include a default for CLI as it overrides config with lesser precedence connection plugins should already use the same config entries (and more) than DEFAULT_TIMEOUT.
* Removes extraneous parentheses; Fixes 80670 (#80671)Samarendra M Hedaoo2023-04-281-1/+1
| | | | | * Added missing parentheses; Fixes 80670 * Removes both parentheses.
* service module : remove flag confugration from openbsd enable/disable ↵Brian Coca2023-04-271-91/+15
| | | | | | | | | | | | service (#80628) fixes #66434 * removed flag setting from enable/disable on openbsd service was changing permanent config on openbsd, which is not expected from the this module * if in check mode, module should not stop at enable/disable * simplify and clean up opensd service enable/disable * does break for those that were using service for configuring flags
* [ansible-galaxy] Fix installing signed collections (#80661)Sloane Hertel2023-04-273-32/+9
| | | | | | | | | * Fix installing signed collections by using the fqcn, version, source, and type as a unique identifier. Define __hash__ and __eq__ methods to handle Candidate/Requirement comparison excluding signatures which aren't fully populated until install time. * Remove PinnedCandidateRequests since it is redundant now. * Fix verifying against a signed remote when the keyring isn't configured
* _symbolic_mode_to_octal- fix raising ValueError for invalid symbolic modes ↵Sloane Hertel2023-04-271-4/+4
| | | | | | | (#80449) validate the full user and perm strings instead of just first character fixes unhelpful unarchive error for some invalid modes
* Remove deprecated FileLock class (#80438)Martin Krizek2023-04-271-100/+0
|
* ActionBase: remove deprecated _remote_checksum (#80440)Martin Krizek2023-04-271-32/+0
|
* Remove deprecated default.fact_caching_prefix ini config option (#80441)Martin Krizek2023-04-271-6/+0
|
* source module compression setting directly from config (#80647)Brian Coca2023-04-261-1/+2
| | | | | * source module compression setting directly from config no need to proxy via play_context, which can fall out of date w/o constant variable updates.
* Add TTY check and argument to disable it (#50603) (#68260)Landson Guo2023-04-271-2/+7
| | | | | | | | | | | | | | | | | | | | | | | * Add TTY check and argument to disable it (#50603) * Fix formatting * add changelog * rename flag and updated help description * add tests for tty check * replace deprecated uses of assertRaisesRegexp to assertRaisesRegex * fix yaml syntax * shorten line 79 * Revert "replace deprecated uses of assertRaisesRegexp to assertRaisesRegex" This reverts commit cea5fe16554ab5f4aa960f9a21fcbb09c8b8dc8f. * change back to assertRaisesRegexp
* Fix gather parallel (#80597)Brian Coca2023-04-262-13/+41
| | | | | | | | * fix meaning of parallel in gather_facts * Update docs with note about parallel not always being faster * add 'smarter' usage of gahter_timeout for parallel tasks * restore async when needed, not always * added typing * parallelism tests
* Templar: remove deprecated shared_loader_obj param (#80439)Martin Krizek2023-04-261-8/+1
|
* service_facts, get more info for rcctl services (#80630)Brian Coca2023-04-251-7/+30
| | | uses rcctl get function to get all settables for a service
* PlayIterator: remove deprecated methods (#80437)Martin Krizek2023-04-251-15/+0
|
* dnf5: use new API to check package signatures (#80609)Martin Krizek2023-04-251-19/+6
|
* Fix calling v2_playbook_on_notify callback (#80585)Martin Krizek2023-04-241-1/+1
| | | Co-authored-by: Matt Martz <matt@sivel.net>
* Add GALAXY_COLLECTIONS_PATH_WARNINGS option. (#78487)Maxwell G2023-04-212-1/+13
| | | | | | | * 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.
* Use target of /usr/bin/dnf for dnf version detection (#80550)Martin Krizek2023-04-211-50/+36
| | | Fixes #80376
* apt key and repository example security patch (#80381)hexagon62023-04-202-4/+4
|
* note in systemd that systemctl can change behaviour due to diff order… ↵Brian Coca2023-04-201-0/+2
| | | | (#80570)
* uri module, fix example (#80554)Brian Coca2023-04-201-2/+2
|
* Update validate_argument_spec.py (#80547)7840vz2023-04-181-1/+1
| | | | | | | | | | ##### SUMMARY Fix example with file lookup, filter 'from_yaml' is required. ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr
* Fix PolicyRcD.__exit__ docstring (#80528)Rodrigo Candido Gryzinski2023-04-181-1/+1
|
* Implement checks, and backwards compat change, to move forward with UTF-8 ↵Matt Martz2023-04-179-8/+65
| | | | | only (#80370) Co-authored-by: Sandra McCann <samccann@redhat.com>
* argspec - fix validating type for required options that are None (#79677)Sloane Hertel2023-04-172-2/+2
| | | | | * Only bypass type validation for null parameters if the default is None. A default is mutually exclusive with required. * Prevent coercing None to str type. Fail the type check instead.
* ansible-galaxy - fix installing dir sources with a trailing path separator ↵Sloane Hertel2023-04-171-0/+7
| | | | | (#79110) * strip trailing path separator from type=dir sources
* Extend OpenBSDStrategy to also update current hostname. (#80521)Rogier Krieger2023-04-141-1/+20
| | | Fixes #80520
* feature: add support for symbolic links when passing "dir" (#80460)kloud-byun2023-04-141-1/+1
| | | * update the include_vars action plugin to always follow symbolic links when traversing directories
* Validate task attributes with first finalized attrs after loop (#80476)Sloane Hertel2023-04-132-5/+13
| | | | | | | | | * Validate task attributes `run_once` and `action` with finalized attrs after individual loop results * Validate task attribute `ignore_unreachable` using individual loop results Once there's a way to post validate only certain fields, we can use self._task.post_validate() instead This replaces the fix introduced in https://github.com/ansible/ansible/pull/80051.
* --syntax-check is only applicable to ansible-playbook. Fixes #80506 (#80507)Matt Martz2023-04-122-2/+2
|
* Last handler defined runs, fix for roles (#79558)Martin Krizek2023-04-122-84/+92
| | | | | | | | | Fixes #73643 * clear_notification method and simplify ifs * Deduplicate code * Limit number of Templar creations * Fix sanity * Preserve handler callbacks order as they were notified
* fetch_url: remove auto disabling decompress when gzip is not available (#80474)Martin Krizek2023-04-111-6/+2
|
* get_action_args_with_defaults: remove deprecated redirected_names arg (#80473)Martin Krizek2023-04-111-16/+3
|
* Templar: do not add dict to globals (#80475)Martin Krizek2023-04-111-4/+1
| | | | All required Jinja2 versions (>=3.0) already do this, see https://github.com/pallets/jinja/commit/f9d804ead73de76b29bb5a793e6d4335c5649e56
* Symbolic modes with X or =[ugo] always use original mode (#80132)Sean Reifschneider2023-04-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Symbolic modes with X or =[ugo] always use original mode (Fixes #80128) Here's what's happening, by way of this mode example: u=,u=rX At the first step in the loop, the "u" bits of are set to 0. On the next step in the loop, the current stat of the filesystem object is used to determine X, not the "new_mode" in the previous iteration of the loop. So while most operations kind of operate left to right, "X" is always going back to the original file to determine whether to set x bit. The Linux "chmod" (the only one I've tested) doesn't operate this way. In it, "X" operates on the current state the loop understands it is in, based on previous operations (and starting with the file permissions). This is an issue with "X" and any of the "=[ugo]" settings, because they are lookups. For example, if a file is 755 and you do "ug=rx,o=u", file module produces 0557 and chmod produces 0555. This really becomes a problem when you want to recursively change a directory of files, and the files are currently 755, but you want to change the directory to 750 and the files to 640. In chmod you can do "a=,ug=rX,u+w" (or "a=,u=rwX,g=rX"), and have it apply equally to the directory and the files. I can't come up with a single way in the ansible file module to deterministically, recursively, set a directory to 750 and the contents to 640 no matter what the current permissions are, as the code currently is. The fix is to pass in "new_mode" to _get_octal_mode_from_symbolic_perms in lib/ansible/module_utils/basic.py inside _symbolic_mode_to_octal. And then take "new_mode" as an argument and use it instead of the filesystem object stat.st_mode value. * Fixing my new unit test, fixing bug in test comments