| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
* get_origin is already imported warning can be
ignore safely.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
| |
Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
|
|
|
|
|
|
|
| |
(#80449)
validate the full user and perm strings instead of just first character
fixes unhelpful unarchive error for some invalid modes
|
| |
|
|
|
| |
Fixes #80376
|
|
|
|
|
| |
only (#80370)
Co-authored-by: Sandra McCann <samccann@redhat.com>
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
| |
* Fix how to get the gather_timeout setting while getting the
mounts facts on Linux.
Issue: #79844
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve Ansible.Basic.cs tempdir uniqueness
The current tempdir naming scheme can result in the same name if the
remote worker starts at the same time as another. By using the process
id it should add enough uniqueness to avoid this situation.
* Fix sanity issues
* Fix up compile issue on older hosts
|
|
|
|
|
| |
* Ansible.Basic - Improve temporary file cleanup process
* Add comment on struct value used
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* clog frag
* Fix retries so that each explicit call to _call_galaxy is retried for the correct number of attempts. Fixes #80174
* Extend retry logic to common URL related connection errors. Fixes #80170
* Extend retries to downloading artifacts
* Extend param docs for change
* Rework the exception handling
* Don't be overly broad, reduce to TimeoutError, and BadStatusLine for now
* _download_file needs to raise AnsibleError.orig_exc
* Remove unused import
* Add IncompleteRead
* Add socket.timeout for py39
* Add 502 to retry codes
* Move http error code checking first
* Use itertools.tee to replay the backoff_iterator instead of using a callable
* Actually set a CLI default of 60s for timeout, to prevent implicit galaxy from using 10s as default from Request.open
* Import typing
* fix type hints
* Use http.HTTPStatus instead of int HTTP error codes where feasible
* Split exception handling
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* Add missing import
---------
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
|
| |
|
|
|
| |
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix detection of available hashlib algorithms
Detection of hashlib algorithms now works on Python 3.x.
The new implementation works on Python 2.7 and later.
Test coverage is provided by both integration and unit tests.
* Add additional details about hashlib in docs
|
|
|
| |
Convert these strings to comments, since they are not valid docstrings.
|
|
|
|
|
|
|
| |
* Add ignores for intentional pointless statements
* Remove redundant docstring
* Fix function docstring placement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update `collections.abc` imports
- Use `six.moves` for modules and module_utils
- Use `collections.abc` for controller code
This avoids using `ansible.module_utils.common._collections_compat`,
which was added before the vendored `six` was updated to provide these
imports.
* Update _collections_compat to use six.moves
Also update the custom pylint rule to reflect this change.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* AddType - Support compiling with /unsafe C# code
* Update Ansible version in docstring
|
| |
|
|
|
|
|
|
|
| |
* Update mypy and its dependencies.
* Fix requirements.
* Remove unnecessary matching constraints.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
suboptions, and fix warning message in suboptions when two aliases of the same option are used (#79740)
* Normalize deprecation records.
* Fix alias deprecations in suboptions.
* Report in which option an alias warning happened for suboptions.
* Add deprecation tests for suboptions.
* Also test deprecation in list of dicts.
* Adjust unit tests for toplevel alias deprecation field name change.
|
| |
|
|
|
| |
fixes https://github.com/ansible/ansible/issues/75536
|
|
|
|
| |
Commit bb35d41 in branch python2.7-support from 2022-10-10:
https://github.com/python-distro/distro/commit/bb35d41
|
|
|
| |
Signed-off-by: darshanip <darshancoding@gmail.com>
|
| |
|
|
|
|
|
| |
* Don't assume column index for netmask and broadcast. Fixes #79117
* fix typo
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After changes:
```
"ansible_locally_reachable_ips": {
"ipv4": [
"127.0.0.0/8",
"127.0.0.1",
"192.168.0.1",
"192.168.1.0/24"
],
"ipv6": [
"::1",
"fe80::2eea:7fff:feca:fe68",
...
]
},
```
192.168.1.0/24 is a local prefix, where any IP address inside this range
is reachable locally (or outside this host if this prefix is announced via
EGP/IGP).
Signed-off-by: Donatas Abraitis <donatas.abraitis@hostinger.com>
|
|
|
|
|
|
| |
Fixes #76737
Fixes #77673
Co-authored-by: Matt Clay <matt@mystile.com>
|
|
|
|
|
|
| |
* Catch exceptions during stat calls
If such an exception is not caught it causes the complete
local facts gathering to fail.
|
|
|
|
|
|
|
|
|
| |
* Add OSMC to Debian OS_FAMILY_MAP
- os_family fact of the Debian-based OSMC distribution was not detected correctly
* tweak changelog
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
* Recover unix load average into an ansible_loadavg fact
The average load is available out of the box with os.getloadavg().
It adds useful context to the existing ansible_memory_mb and ansible_mounts
facts that provide size and utilization or memory and disk space.
* Add an integration test
|
| |
|
|
|
|
| |
* Allow selection of TLS/SSL ciphers. Fixes #78633
* Never pass None as the password. Fixes #53373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix distro fact handling for Flatcar
The existence of the file /etc/flatcar/update.conf depends on
bootstrap configuration typically provided by the user. For that
reason this file is unsuitable for determining distro facts for
Flatcar Container Linux.
The distribution_release fact is meaningless in the case of Flatcar
since Flatcar doesn't have named releases. The distribution_version
fact, however, IS meaningful and should contain a number such as
"3139.2.0".
- Use /etc/os-release instead of /etc/flatcar/update.conf.
- Drop the distribution_release fact.
- Set the distribution_version fact.
- Update distro test fixture for Flatcar
- Generate the fixture using gen_distribution_version_testcase.py.
- Override result.distribution and result.os_family manually as the
generator script gives wrong values.
- Use a recent Flatcar version.
Signed-off-by: Johanan Liebermann <jliebermann@microsoft.com>
|
| |
|
| |
|