status
stringclasses 1
value | repo_name
stringlengths 9
24
| repo_url
stringlengths 28
43
| issue_id
int64 1
104k
| updated_files
stringlengths 8
1.76k
| title
stringlengths 4
369
| body
stringlengths 0
254k
β | issue_url
stringlengths 37
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[ns, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed | ansible/ansible | https://github.com/ansible/ansible | 79,638 | ["changelogs/fragments/paramiko_config.yml", "lib/ansible/plugins/connection/paramiko_ssh.py", "test/integration/targets/connection_paramiko_ssh/test_connection.inventory"] | inventory variable replace failed | ### Summary
Variables in inventory after version 2.13. x can not be replaced with actual values when execute task, because of this MR: https://github.com/ansible/ansible/pull/76590
configοΌ
primaryIp: 'aa.aa.aa.aa'
standbyIp: 'bb.bb.bb.bb'
user_name: xx
inventory:
[xx]
primary ansible_ssh_user={{user_name}} ansible_ssh_host={{primaryIp}}
standby ansible_ssh_user={{user_name}} ansible_ssh_host={{standbyIp}}
expected result:

Actual Results:

### Issue Type
Bug Report
### Component Name
lib/ansible/executor/task_executor.py
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.6]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/ansible/lib64/python3.9/site-packages/ansible
ansible collection location = /home/xxx/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/ansible/bin/ansible
python version = 3.9.9 (main, Sep 21 2022, 09:00:34) [GCC 10.3.1]
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = memory
COMMAND_WARNINGS(/etc/ansible/ansible.cfg) = False
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 20
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_MANAGED_STR(/etc/ansible/ansible.cfg) = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
DEFAULT_NO_TARGET_SYSLOG(/etc/ansible/ansible.cfg) = True
DEFAULT_POLL_INTERVAL(/etc/ansible/ansible.cfg) = 15
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 60
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = paramiko
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_legacy_silent
PARAMIKO_HOST_KEY_AUTO_ADD(/etc/ansible/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = True
SYSTEM_WARNINGS(/etc/ansible/ansible.cfg) = False
CONNECTION:
==========
paramiko_ssh:
____________
host_key_auto_add(/etc/ansible/ansible.cfg) = True
host_key_checking(/etc/ansible/ansible.cfg) = False
look_for_keys(/etc/ansible/ansible.cfg) = False
ssh_args(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=1800s
ssh:
___
host_key_checking(/etc/ansible/ansible.cfg) = False
pipelining(/etc/ansible/ansible.cfg) = True
scp_if_ssh(/etc/ansible/ansible.cfg) = smart
ssh_args(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=1800s
timeout(/etc/ansible/ansible.cfg) = 60
SHELL:
=====
sh:
__
remote_tmp(/etc/ansible/ansible.cfg) = ~/.ansible/tmp
```
### OS / Environment
EulerOS
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
any
```
configοΌ
primaryIp: 'aa.aa.aa.aa'
standbyIp: 'bb.bb.bb.bb'
user_name: xx
inventory:
[xx]
primary ansible_ssh_user={{user_name}} ansible_ssh_host={{primaryIp}}
standby ansible_ssh_user={{user_name}} ansible_ssh_host={{standbyIp}}
### Expected Results
ssh normal:

### Actual Results
```console
version after 2.13.x:
ansible_ssh_host can not be replaced with actual IPοΌssh {{primaryIp}} or {{standbyip}}, so failed with:
<{{standbyIp}}> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: {{user_name}} on PORT 22 TO {{standbyIp}}
fatal: [primary]: UNREACHABLE! => {
"changed": false,
"msg": "[Errno -2] Name or service not known",
"unreachable": true
}
Traceback (most recent call last):
File "/opt/ansible/lib64/python3.9/site-packages/ansible/plugins/connection/paramiko_ssh.py", line 345, in _connect_uncached
ssh.connect(
File "/opt/ansible/lib64/python3.9/site-packages/paramiko/client.py", line 340, in connect
to_try = list(self._families_and_addresses(hostname, port))
File "/opt/ansible/lib64/python3.9/site-packages/paramiko/client.py", line 203, in _families_and_addresses
addrinfos = socket.getaddrinfo(
File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
fatal: [standby]: UNREACHABLE! => {
"changed": false,
"msg": "[Errno -2] Name or service not known",
"unreachable": true
}
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79638 | https://github.com/ansible/ansible/pull/79704 | 694f12d01b17e4aba50bda55546edada6e79b5a8 | a1bff416edf9b9c8bd5c3b002277eed5b5323953 | 2022-12-30T03:18:46Z | python | 2023-03-07T16:09:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,588 | ["changelogs/fragments/collections_paths-deprecation.yml", "lib/ansible/config/base.yml", "test/integration/targets/ansible-galaxy-collection-scm/tasks/main.yml", "test/integration/targets/ansible-galaxy-collection/tasks/install.yml", "test/integration/targets/ansible/ansible-test\u00e9.cfg", "test/integration/targets/ansible/runme.sh"] | Duplicate env var? ANSIBLE_COLLECTIONS_PATH(S?) | ### Summary
I notice there is a confusing, nearly duplicate definition for a pair of "collection_paths" env vars:
1. ANSIBLE_COLLECTIONS_PATHS, and
2. ANSIBLE_COLLECTIONS_PATH.
> [ANSIBLE_COLLECTIONS_PATHS](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#envvar-ANSIBLE_COLLECTIONS_PATHS)
> Colon separated paths in which Ansible will search for collections content. Collections must be in nested subdirectories, not directly in these directories. For example, if COLLECTIONS_PATHS includes '{{ ANSIBLE_HOME ~ "/collections" }}', and you want to add my.collection to that directory, it must be saved as '{{ ANSIBLE_HOME} ~ "/collections/ansible_collections/my/collection" }}'.
>
> See also [COLLECTIONS_PATHS](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths)
>
> [ANSIBLE_COLLECTIONS_PATH](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#envvar-ANSIBLE_COLLECTIONS_PATH)
> Colon separated paths in which Ansible will search for collections content. Collections must be in nested subdirectories, not directly in these directories. For example, if COLLECTIONS_PATHS includes '{{ ANSIBLE_HOME ~ "/collections" }}', and you want to add my.collection to that directory, it must be saved as '{{ ANSIBLE_HOME} ~ "/collections/ansible_collections/my/collection" }}'.
>
> See also [COLLECTIONS_PATHS](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths)
>
>
>
>
### Issue Type
Feature Request
### Component Name
lib/ansible/config/base.yml
### Ansible Version
```console
Latest (7)
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
Just some confusing docs.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79588 | https://github.com/ansible/ansible/pull/81063 | a7d2a4e03209cff1e97e59fd54bb2b05fdbdbec6 | 98d1cf7aa2519dd1c33cb3f3d94082e832f840c4 | 2022-12-13T14:48:24Z | python | 2023-06-22T18:41:59Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,584 | ["test/integration/targets/rpm_key/tasks/rpm_key.yaml"] | rpm_key integration test should also test for deleting by key ID | ### Summary
The rpm_key.yaml integration test tests various methods for installing and removing rpm keys, but does not test removing the key by key ID. The key ID for EPEL7 is gpg-pubkey-352c64e5-52ae6884
### Issue Type
Feature Idea
### Component Name
https://github.com/ansible/ansible/blob/devel/test/integration/targets/rpm_key/tasks/rpm_key.yaml
### Additional Information
<!--- Paste example playbooks or commands between quotes below -->
- name: remove EPEL GPG key from keyring to confirm that already-deleted keys do not fail
rpm_key:
state: absent
key: gpg-pubkey-352c64e5-52ae6884
- name: remove EPEL GPG key from keyring (idempotent)
rpm_key:
state: absent
key: gpg-pubkey-352c64e5-52ae6884
register: idempotent_test
- name: check idempontence
assert:
that: "not idempotent_test.changed"
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79584 | https://github.com/ansible/ansible/pull/79729 | 1852f9fab47b2dd53aeef8618ffb82d34b8274c1 | 40dd762e688cb9e767bedc486b993f0b3cb343d1 | 2022-12-12T22:25:41Z | python | 2023-01-17T15:03:30Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,577 | ["changelogs/fragments/adoc_fix_list.yml", "lib/ansible/plugins/list.py"] | ansible-doc list filters show description "get components from URL" for all ansible.builtin filters | ### Summary
Doing `ansible-doc -t filter --list` lists all `ansible.builtin` filters with the same description `get components from URL`:
```
ansible.builtin.b64decode get components from URL
ansible.builtin.b64encode get components from URL
ansible.builtin.basename get components from URL
ansible.builtin.bool get components from URL
ansible.builtin.checksum get components from URL
[and so on...]
```
### Issue Type
Bug Report
### Component Name
ansible-doc
### Ansible Version
```console
$ ansible --version
ansible [core 2.14.1]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/ansible/lib64/python3.9/site-packages/ansible
ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/ansible/bin/ansible
python version = 3.9.14 (main, Nov 7 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] (/opt/ansible/bin/python3)
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
irrelevant
```
### OS / Environment
EL9
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
ansible-doc -t filter --list
```
### Expected Results
Each filter should list the correct description for each filter.
### Actual Results
```console
ansible.builtin.b64decode get components from URL
ansible.builtin.b64encode get components from URL
ansible.builtin.basename get components from URL
ansible.builtin.bool get components from URL
ansible.builtin.checksum get components from URL
ansible.builtin.combinations get components from URL
ansible.builtin.combine get components from URL
ansible.builtin.comment get components from URL
ansible.builtin.dict2items get components from URL
ansible.builtin.difference get components from URL
and so on
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79577 | https://github.com/ansible/ansible/pull/79591 | f6c0e22f98e3ad1e0a98837053ed03a27d8a1fcf | b7e948e6230fc744af6ac3c5c6f42fa1516eeeb8 | 2022-12-12T06:34:32Z | python | 2022-12-15T15:06:13Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,523 | ["changelogs/fragments/79546-apt-fix-setting-locale.yml", "lib/ansible/modules/apt.py"] | apt module breaks with strange cache error using python3 | ### Summary
This is the successor of #75262 as I am not able to comment there anymore.
How is the state of the annoing bug? It is still not fixed and prevents all plays to run!
### Issue Type
Bug Report
### Component Name
lib/ansible/modules/apt.py
### Ansible Version
```console
$ ansible --version
> ansible --version
ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859-1.
ikki: ?1 !1021
> LC_ALL=C.UTF-8 ansible --version
ansible [core 2.14.0]
config file = /home/klaus/.ansible.cfg
configured module search path = ['/home/klaus/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/klaus/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.8 (main, Nov 4 2022, 09:21:25) [GCC 12.2.0] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
> ansible-config dump --only-changed -t all
ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859-1.
```
### OS / Environment
Devuan
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: I need patch here
package:
name: patch
state: present
```
### Expected Results
It works
### Actual Results
```console
TASK [debianfix : I need patch here] ***************************************************************************
fatal: [chil]: FAILED! => {"changed": false, "msg": "<class 'apt_pkg.Cache'> returned a result with an exception set"}
```
### Code of Conduct
- [ ] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79523 | https://github.com/ansible/ansible/pull/79546 | 527abba86010629e21f8227c4234c393e4ee8122 | 11e43e9d6e9809ca8fdf56f814b89da3dc0d5659 | 2022-12-03T16:53:26Z | python | 2022-12-08T19:06:08Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,463 | ["changelogs/fragments/galaxy_check_type.yml", "lib/ansible/galaxy/collection/concrete_artifact_manager.py", "test/units/galaxy/test_collection_install.py"] | `ansible-galaxy collection install -r requirements.yml` fails with "No such file or directory" | ### Summary
`ansible-galaxy collection install -r requirements.yml` fails with "No such file or directory" , while using `ansible-galaxy collection install <filename>` works.
### Issue Type
Bug Report
### Component Name
ansible-galaxy
### Ansible Version
```console
$ ansible-galaxy --version
ansible-galaxy [core 2.14.0]
config file = /<censored>/ansible.cfg
configured module search path = ['/opt/app-root/src/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/app-root/lib64/python3.9/site-packages/ansible
ansible collection location = /opt/app-root/src/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/app-root/bin/ansible-galaxy
python version = 3.9.13 (main, Nov 9 2022, 13:16:24) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)] (/opt/app-root/bin/python3.9)
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = /<censored>/ansible.cfg
DEFAULT_REMOTE_USER(/<censored>/ansible.cfg) = <censored>
GALAXY_SERVER_LIST(/<censored>/ansible.cfg) = ['automation_hub']
INVENTORY_IGNORE_EXTS(/<censored>/ansible.cfg) = ['~', '.orig', '.bak', '.ini', '.cfg', '.retry', '.pyc', '.pyo', '.md', 'files.d']
CONNECTION:
==========
paramiko_ssh:
____________
remote_user(/<censored>/ansible.cfg) = <censored>
ssh_args(/<censored>/ansible.cfg) = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
ssh:
___
remote_user(/<censored>/ansible.cfg) = <censored>
ssh_args(/<censored>/ansible.cfg) = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
```
### OS / Environment
RHEL 8
(Run inside a container.)
### Steps to Reproduce
Using a simple example collection, that has no dependencies.
The censored path is in our internal LAN and is reachable.
requirements.yml
```yaml (paste below)
collections:
- name: https://<censored>/ansible.posix-1.4.0.tar
type: file
```
```bash
$ ansible-galaxy collection install -r requirements.yml
ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'https://<censored>/ansible.posix-1.4.0.tar
```
But with the same file:
```bash
$ ansible-galaxy collection install https://<censored>/ansible.posix-1.4.0.tar
Downloading https://<censored>/ansible.posix-1.4.0.tar to /opt/app-root/src/.ansible/tmp/ansible-local-11wq05v0n3/tmpmz8aw1bb/ansible.posix-1.-2whncpha
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'ansible.posix:1.4.0' to '/opt/app-root/src/.ansible/collections/ansible_collections/ansible/posix'
ansible.posix:1.4.0 was installed successfully
```
### Expected Results
I expected `ansible-galaxy collection install -r requirements.yml` to work.
### Actual Results
```console
$ ansible-galaxy collection install -r requirements.yml
ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'https://<censored>/ansible.posix-1.4.0.tar
But with the same file:
```bash
$ ansible-galaxy collection install https://<censored>/ansible.posix-1.4.0.tar
Downloading https://<censored>/ansible.posix-1.4.0.tar to /opt/app-root/src/.ansible/tmp/ansible-local-11wq05v0n3/tmpmz8aw1bb/ansible.posix-1.-2whncpha
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'ansible.posix:1.4.0' to '/opt/app-root/src/.ansible/collections/ansible_collections/ansible/posix'
ansible.posix:1.4.0 was installed successfully
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79463 | https://github.com/ansible/ansible/pull/81423 | f894ce89b4db25a5bd50da2d48ab77ace3491487 | 95fdd555b38f4fa885f46454675b293e8021cd85 | 2022-11-24T11:34:08Z | python | 2023-08-03T20:59:59Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,462 | ["lib/ansible/modules/setup.py"] | Misleading setup module example | ### Summary
The second uncommented example at
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/setup_module.html
is like this:
```
- name: Collect only selected facts
ansible.builtin.setup:
filter:
```
However, elsewhere in the page and checking the logs on a target node it seems that all facts are collected and those are then filtered. So contrary to the task name all facts are collected.
Perhaps better name would be `Provide only selected facts` or such.
Thanks.
### Issue Type
Documentation Report
### Component Name
lib/ansible/modules/setup.py
### Ansible Version
```console
2.14
```
### Configuration
```console
N/A
```
### OS / Environment
N/A
### Additional Information
N/A
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79462 | https://github.com/ansible/ansible/pull/79495 | 11e43e9d6e9809ca8fdf56f814b89da3dc0d5659 | bc13099e56410a933a48ce734dd575920e102866 | 2022-11-24T10:32:46Z | python | 2022-12-08T19:06:37Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,459 | ["changelogs/fragments/79459-fix-meta-task-check.yml", "lib/ansible/playbook/task.py", "test/integration/targets/tasks/playbook.yml", "test/integration/targets/tasks/runme.sh", "test/integration/targets/tasks/tasks/main.yml"] | Unexpected exception when a task is named "meta" | ### Summary
When a task is named with the word meta (like `- name: "meta"`), the task fails with the following error :
```
ERROR! Unexpected Exception, this is probably a bug: '_raw_params'
```
### Issue Type
Bug Report
### Component Name
all
### Ansible Version
```console
$ ansible --version
ansible 2.10.8
config file = /home/utilisateur/ansible/prj_chainage_traitement/ansible.cfg
configured module search path = ['/home/utilisateur/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
```
### OS / Environment
Linux Debian 11.1
### Steps to Reproduce
The following playbook reproduces this issue :
```yaml
- hosts: localhost
gather_facts: no
connection: localhost
tasks:
- name: "meta"
debug:
msg: "abcdefgh"
```
### Expected Results
You should obtain :
```
TASK [meta]
ok: [localhost] => {
"msg": "abcdefgh"
}
```
When name is changed (ex.: `- name: "meta"`), there is no error.
Ansible should generate an error when the user tries to name a task `meta`.
### Actual Results
The following error is returned :
```console
PLAY [localhost] ***********
ERROR! Unexpected Exception, this is probably a bug: '_raw_params'
to see the full traceback, use -vvv
```
With verbose mode, a Python exception is returned :
```
PLAY [localhost] *******************
META: ran handlers
ERROR! Unexpected Exception, this is probably a bug: '_raw_params'
the full traceback was:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 123, in <module>
exit_code = cli.run()
File "/usr/lib/python3/dist-packages/ansible/cli/playbook.py", line 129, in run
results = pbex.run()
File "/usr/lib/python3/dist-packages/ansible/executor/playbook_executor.py", line 169, in run
result = self._tqm.run(play=play)
File "/usr/lib/python3/dist-packages/ansible/executor/task_queue_manager.py", line 281, in run
play_return = strategy.run(iterator, play_context)
File "/usr/lib/python3/dist-packages/ansible/plugins/strategy/linear.py", line 224, in run
host_tasks = self._get_next_task_lockstep(hosts_left, iterator)
File "/usr/lib/python3/dist-packages/ansible/plugins/strategy/linear.py", line 97, in _get_next_task_lockstep
host_tasks[host.name] = iterator.get_next_task_for_host(host, peek=True)
File "/usr/lib/python3/dist-packages/ansible/executor/play_iterator.py", line 253, in get_next_task_for_host
display.debug(" ^ task is: %s" % task)
File "/usr/lib/python3/dist-packages/ansible/playbook/task.py", line 156, in __repr__
return "TASK: meta (%s)" % self.args['_raw_params']
KeyError: '_raw_params'
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79459 | https://github.com/ansible/ansible/pull/79464 | 01ff57bdff35e0e97b16caa2c420fe01039d13e1 | 3bda4eae6f1273a42f14b3dedc0d4f5928b290f6 | 2022-11-24T09:36:31Z | python | 2022-11-29T15:43:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,432 | ["docs/docsite/rst/os_guide/windows_winrm.rst"] | client certificate authentication towards Windows 11 with TLS 1.3 | ### Summary
As already explained in this Issue [#77768](https://github.com/ansible/ansible/issues/77768) a connection to a Windows 11 machine through WinRM certification auth is not working and throughs an error.
### Issue Type
Bug Report
### Component Name
apt
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.10]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/Qf6Kw9Jt5nbI/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/Qf6Kw9Jt5nbI/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
BECOME:
======
CACHE:
=====
CALLBACK:
========
CLICONF:
=======
CONNECTION:
==========
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
VARS:
====
```
### OS / Environment
Ansible controller: Ubuntu 20.04
Target machine: Windows 11
```powershell
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 22621 0
```
Client machine for PSSession: Windows 11
```powershell
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 22000 0
```
### Steps to Reproduce
## Ansible controller
Tested with server cert validation:
```yml
ansible_connection: winrm
ansible_winrm_server_cert_validation: validate
ansible_winrm_cert_pem: ../../files/mgmtcerts/{{ lookup('env','UPN_USER') }}.pem
ansible_winrm_cert_key_pem: ../../files/mgmtcerts/{{ lookup('env','UPN_USER') }}-private.pem
ansible_winrm_ca_trust_path: ../../files/mgmtcerts/server.pem
ansible_winrm_transport: certificate
```
Tested without server cert validation:
```yml
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
ansible_winrm_cert_pem: ../../files/mgmtcerts/{{ lookup('env','UPN_USER') }}.pem
ansible_winrm_cert_key_pem: ../../files/mgmtcerts/{{ lookup('env','UPN_USER') }}-private.pem
# ansible_winrm_ca_trust_path: ../../files/mgmtcerts/server.pem
ansible_winrm_transport: certificate
```
Ini:
```yml
[test]
dev-gc01 ansible_host=winvm0
```
## Windows
[docs.ansible.com](https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#certificate)
### Test Powershell connection on Windows client
Tested Powershell remote session from a windows client to the same target machine and it worked:
1. Import Server certificate as trusted CA
2. Import User certificate in personal store
3. Add hostname of target Windows to hosts file with ip address.
4. Execute Powershell command to connect to Windows OS
```powershell
Enter-PSSession -ComputerName winvm0 -UseSSL -CertificateThumbprint <usercert thumbprint>
[winvm0]: PS C:\Users\test\Documents> hostname
winvm0
```
### Expected Results
```bash
TASK [Gathering Facts] *********************************************************
ok: [dev-gc01]
```
### Actual Results
```console
fatal: [dev-gc01]: UNREACHABLE! => {"changed": false, "msg": "certificate: HTTPSConnectionPool(host='winvm0', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(\"bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])\")))", "unreachable": true}
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79432 | https://github.com/ansible/ansible/pull/79434 | 1bda6750f5f4fb8b01de21d1949b02d7547ff838 | 493ef4a559362d874b22d362fe3423a4410c6f70 | 2022-11-21T16:26:20Z | python | 2022-11-21T20:46:48Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,430 | ["changelogs/fragments/79431-fix-password-lookup-rewrites.yml", "lib/ansible/plugins/lookup/password.py", "test/units/plugins/lookup/test_password.py"] | password lookup rewrites file when using `encrypt` | ### Summary
The password lookup rewrites the password file with the same content if the `encrypt` option is used. This happens on every invocation, not only if the `salt` or `ident` values are added to the file.
This bug was introduced in commit 1bd7dcf339d and is caused by this code in `lib/ansible/plugins/lookup/password.py`:
```
ident = params['ident']
if encrypt and not ident:
changed = True
try:
ident = BaseHash.algorithms[encrypt].implicit_ident
except KeyError:
ident = None
```
While this bug seems minor as only the file modification time is changed and the actual file contents remain the same, it's quite annoying if the files are stored on an encrypted overlay filesystem like encfs as there the encrypted file content changes. It also confuses backup and sync tools which monitor the modification time.
### Issue Type
Bug Report
### Component Name
password
### Ansible Version
```console
$ ansible --version
ansible [core 2.15.0.dev0] (devel 1bda6750f5) last updated 2022/11/21 15:47:49 (GMT +200)
config file = /home/gaudenz/.ansible.cfg
configured module search path = ['/home/gaudenz/.ansible/plugins/library']
ansible python module location = /home/gaudenz/projects/ansible/ansible-core/lib/ansible
ansible collection location = /home/gaudenz/projects/ansible/ansible-core/collections:/usr/share/ansible/collections
executable location = /home/gaudenz/projects/ansible/ansible-core/bin/ansible
python version = 3.10.8 (main, Nov 4 2022, 09:21:25) [GCC 12.2.0] (/usr/bin/python)
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_HOME(env: ANSIBLE_HOME) = /home/gaudenz/projects/ansible/ansible-core
CONFIG_FILE() = /home/gaudenz/.ansible.cfg
DEFAULT_MODULE_PATH(/home/gaudenz/.ansible.cfg) = ['/home/gaudenz/.ansible/plugins/library']
DEFAULT_ROLES_PATH(/home/gaudenz/.ansible.cfg) = ['/home/gaudenz/.ansible/roles']
DEFAULT_TRANSPORT(/home/gaudenz/.ansible.cfg) = ssh
EDITOR(env: EDITOR) = vim
HOST_KEY_CHECKING(/home/gaudenz/.ansible.cfg) = False
CONNECTION:
==========
paramiko_ssh:
____________
host_key_checking(/home/gaudenz/.ansible.cfg) = False
ssh:
___
host_key_checking(/home/gaudenz/.ansible.cfg) = False
```
### OS / Environment
Debian testing
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```
$ ansible -m debug -a 'msg={{ lookup("password", "mypassword encrypt=sha512_crypt length=10") }}' localhost && ls -l --full-time mypassword && md5sum mypassword
localhost | SUCCESS => {
"msg": "$6$Ec9Z80iDXuPXULzQ$419PY89EUBGUmpbyPKpoFCoM.VfrDahpUM91EOexZRQfsVmasGZk5fDoMAMS6ymGY2cQAp7It9iAzI2lnpkCn0"
}
-rw------- 1 gaudenz gaudenz 33 2022-11-21 15:54:03.976492618 +0100 mypassword
037a9e24e504f7c50a40e6f6c562ff5f mypassword
$ ansible -m debug -a 'msg={{ lookup("password", "mypassword encrypt=sha512_crypt length=10") }}' localhost && ls -l --full-time mypassword && md5sum mypassword
localhost | SUCCESS => {
"msg": "$6$Ec9Z80iDXuPXULzQ$419PY89EUBGUmpbyPKpoFCoM.VfrDahpUM91EOexZRQfsVmasGZk5fDoMAMS6ymGY2cQAp7It9iAzI2lnpkCn0"
}
-rw------- 1 gaudenz gaudenz 33 2022-11-21 15:54:11.916522686 +0100 mypassword
037a9e24e504f7c50a40e6f6c562ff5f mypassword
```
### Expected Results
The second invocation should not change the file modification time.
### Actual Results
```console
The second invocation changes the file modification time without actually changing the file content.
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79430 | https://github.com/ansible/ansible/pull/79431 | 3936b5c471068d86c3e51a454a1de2f0d2942845 | c33a782a9c1e6d1e6b900c0eed642dfd3defac1c | 2022-11-21T14:58:45Z | python | 2022-11-29T15:26:30Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,411 | ["changelogs/fragments/ansible-test-test-plugin-error-message.yml", "test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py"] | ansible-test error about missing config should state where config goes | ### Summary
As a new contributor to AWS modules, I assumed that the default permissions used by the cli would be used by the tests.
When I run `ansible-test integration lambda -v` I get:
```
WARNING: Excluding tests marked "cloud/aws" which require config
(see "/home/dev/ansible/ansible/test/lib/ansible_test/config/cloud-config-aws.ini.template"): lambda
```
This message is not clear.
e.g. do I just edit that file in-place? Do I edit it and then rename it to remove `.template` from the name?
The answer is neither of those.
Apparently you're supposed to copy the modified file somewhere else. This is not obvious to new users.
So I propose that the error message be changed to say:
```
WARNING: Excluding tests marked "cloud/aws" which require config
(see "/home/dev/ansible/ansible/test/lib/ansible_test/config/cloud-config-aws.ini.template" which must be copied to something/integration/test and modified): lambda
```
(Where `something` is the real directory)
Additional changes:
* the `.template` files should have a comment inside saying what to do with them. i.e. which folder to put them in. Or there should be a README next to the .template files stating that.
* the AWS one specifically should have a comment stating what to do for fields like `security_token` when your credentials don't have such a token.
### Issue Type
Feature Idea
### Component Name
ansible-test
### Additional Information
See here: https://github.com/ansible-collections/amazon.aws/issues/924
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79411 | https://github.com/ansible/ansible/pull/79881 | 91807695c363c765197a982a0266ed3d59e3fac5 | d48d1c23df171074e799717e824a8c5ace470643 | 2022-11-18T08:13:48Z | python | 2023-02-02T08:21:38Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,404 | ["changelogs/fragments/local_bad_user.yml", "lib/ansible/plugins/connection/local.py"] | KeyError: 'getpwuid(): uid not found: 1000' (again - Ansible 2.9.27) | ### Summary
As previous report, I try to use Ansible through container (Kubernetes - GKE) through Jenkins.
So I have a custom image with Ansible:
```
[root@8a6fe05d3b73 /]# ansible --version
ansible 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Oct 19 2021, 05:14:06) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
```
Then, I start a Pod with UID `1000` (Jenkins default UID) and try to run Kubespray `v2.17.1` (https://github.com/kubernetes-sigs/kubespray/tree/v2.17.1). And it fails with logs:
```
PLAY [localhost]
***************************************************************
Thursday 17 November 2022 16:03:39 +0000 (0:00:00.136) 0:00:00.136
*****
/usr/lib/python3.6/site-packages/requests/__init__.py:91:
RequestsDependencyWarning: urllib3 (1.26.8) or chardet (3.0.4) doesn't
match a supported version!
RequestsDependencyWarning)
TASK [Check 2.9.0 <= Ansible version < 2.11.0]
*********************************
An exception occurred during task execution. To see the full traceback, use
-vvv. The error was: KeyError: 'getpwuid(): uid not found: 1000'
fatal: [localhost]: FAILED! => {"msg": "Unexpected failure during module
execution.", "stdout": ""}
PLAY RECAP
*********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1
skipped=0 rescued=0 ignored=0
Thursday 17 November 2022 16:03:39 +0000 (0:00:00.043) 0:00:00.180
*****
===============================================================================
Check 2.9.0 <= Ansible version < 2.11.0 ---------------------------------
0.04s
```
The related play code (https://github.com/kubernetes-sigs/kubespray/blob/v2.17.1/ansible_version.yml):
```
---
- hosts: localhost
gather_facts: false
become: no
vars:
minimal_ansible_version: 2.9.0
minimal_ansible_version_2_10: 2.10.11
maximal_ansible_version: 2.11.0
ansible_connection: local
tags: always
tasks:
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
assert:
msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
that:
- ansible_version.string is version(minimal_ansible_version, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
tags:
- check
- name: "Check Ansible version > {{ minimal_ansible_version_2_10 }} when using ansible 2.10"
assert:
msg: "When using Ansible 2.10, the minimum supported version is {{ minimal_ansible_version_2_10 }}"
that:
- ansible_version.string is version(minimal_ansible_version_2_10, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
when:
- ansible_version.string is version('2.10.0', ">=")
tags:
- check
- name: "Check that python netaddr is installed"
assert:
msg: "Python netaddr is not present"
that: "'127.0.0.1' | ipaddr"
tags:
- check
# CentOS 7 provides too old jinja version
- name: "Check that jinja is not too old (install via pip)"
assert:
msg: "Your Jinja version is too old, install via pip"
that: "{% set test %}It works{% endset %}{{ test == 'It works' }}"
tags:
- check
```
### Issue Type
Bug Report
### Component Name
core
### Ansible Version
```console
$ ansible --version
ansible 2.9.27
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Oct 19 2021, 05:14:06) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed
```
### OS / Environment
- Kubernetes
- uname: `Linux 8a6fe05d3b73 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`
- /etc/os-release
```
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
```
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
https://github.com/kubernetes-sigs/kubespray/blob/v2.17.1/ansible_version.yml:
```yaml (paste below)
- hosts: localhost
gather_facts: false
become: no
vars:
minimal_ansible_version: 2.9.0
minimal_ansible_version_2_10: 2.10.11
maximal_ansible_version: 2.11.0
ansible_connection: local
tags: always
tasks:
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
assert:
msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
that:
- ansible_version.string is version(minimal_ansible_version, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
tags:
- check
- name: "Check Ansible version > {{ minimal_ansible_version_2_10 }} when using ansible 2.10"
assert:
msg: "When using Ansible 2.10, the minimum supported version is {{ minimal_ansible_version_2_10 }}"
that:
- ansible_version.string is version(minimal_ansible_version_2_10, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
when:
- ansible_version.string is version('2.10.0', ">=")
tags:
- check
- name: "Check that python netaddr is installed"
assert:
msg: "Python netaddr is not present"
that: "'127.0.0.1' | ipaddr"
tags:
- check
# CentOS 7 provides too old jinja version
- name: "Check that jinja is not too old (install via pip)"
assert:
msg: "Your Jinja version is too old, install via pip"
that: "{% set test %}It works{% endset %}{{ test == 'It works' }}"
tags:
- check
```
### Expected Results
To work ^^
### Actual Results
```console
ansible-playbook 2.9.27
config file = /home/jenkins/agent/workspace/kubespray/ansible.cfg
configured module search path = ['/home/jenkins/agent/workspace/kubespray/library']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.6.8 (default, Oct 19 2021, 05:14:06) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
Using /home/jenkins/agent/workspace/kubespray/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/jenkins/agent/workspace/kubespray/hosts as it did not pass its verify_file() method
auto declined parsing /home/jenkins/agent/workspace/kubespray/hosts as it did not pass its verify_file() method
Parsed /home/jenkins/agent/workspace/kubespray/hosts inventory source with ini plugin
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0010-swapoff.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0040-set_facts.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0060-resolvconf.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0061-systemd-resolved.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0062-networkmanager-unmanaged-devices.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0063-networkmanager-dns.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0070-system-packages.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0080-system-configurations.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0090-etchosts.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0100-dhclient-hooks.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0110-dhclient-hooks-undo.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0120-growpart-azure-centos-7.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/container-engine/cri-o/tasks/crio_repo.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/container-engine/docker/tasks/pre-upgrade.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/container-engine/docker/tasks/systemd.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/etcd/handlers/backup.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/etcd/handlers/backup.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/node/tasks/facts.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/node/tasks/pre_upgrade.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/node/tasks/install.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/node/tasks/loadbalancer/nginx-proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/node/tasks/loadbalancer/haproxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/node/tasks/kubelet.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/tokens/tasks/check-tokens.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/tokens/tasks/gen_tokens.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/control-plane/tasks/pre-upgrade.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/control-plane/tasks/encrypt-at-rest.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/control-plane/tasks/kubeadm-setup.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/control-plane/tasks/kubeadm-backup.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/network_plugin/cilium/tasks/check.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/network_plugin/calico/tasks/check.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/network_plugin/calico/tasks/pre.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/network_plugin/calico/tasks/repos.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/network_plugin/kube-router/tasks/annotate.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/ansible/tasks/cleanup_dns.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/ansible/tasks/coredns.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/ansible/tasks/nodelocaldns.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/ansible/tasks/netchecker.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/ansible/tasks/dashboard.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/krew/tasks/krew.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/krew/tasks/krew.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes-apps/cloud_controller/oci/tasks/credentials-check.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/download/tasks/prep_download.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/fallback_ips.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubespray-defaults/tasks/no_proxy.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0010-swapoff.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0040-set_facts.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0050-create_directories.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0060-resolvconf.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0061-systemd-resolved.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0062-networkmanager-unmanaged-devices.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0063-networkmanager-dns.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0070-system-packages.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0080-system-configurations.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0090-etchosts.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0100-dhclient-hooks.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0110-dhclient-hooks-undo.yml
statically imported: /home/jenkins/agent/workspace/kubespray/roles/kubernetes/preinstall/tasks/0120-growpart-azure-centos-7.yml
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Attempting to use 'actionable' callback.
Skipping callback 'actionable', as we already have a stdout callback.
Attempting to use 'aws_resource_actions' callback.
Attempting to use 'cgroup_memory_recap' callback.
Attempting to use 'cgroup_perf_recap' callback.
Attempting to use 'context_demo' callback.
Attempting to use 'counter_enabled' callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Attempting to use 'debug' callback.
Skipping callback 'debug', as we already have a stdout callback.
Attempting to use 'dense' callback.
Skipping callback 'dense', as we already have a stdout callback.
Attempting to use 'dense' callback.
Skipping callback 'dense', as we already have a stdout callback.
Attempting to use 'foreman' callback.
Attempting to use 'full_skip' callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Attempting to use 'grafana_annotations' callback.
Attempting to use 'hipchat' callback.
Attempting to use 'jabber' callback.
Attempting to use 'json' callback.
Skipping callback 'json', as we already have a stdout callback.
Attempting to use 'junit' callback.
Attempting to use 'log_plays' callback.
Attempting to use 'logdna' callback.
Attempting to use 'logentries' callback.
Attempting to use 'logstash' callback.
Attempting to use 'mail' callback.
Attempting to use 'minimal' callback.
Skipping callback 'minimal', as we already have a stdout callback.
Attempting to use 'nrdp' callback.
Attempting to use 'null' callback.
Skipping callback 'null', as we already have a stdout callback.
Attempting to use 'oneline' callback.
Skipping callback 'oneline', as we already have a stdout callback.
Attempting to use 'osx_say' callback.
Attempting to use 'profile_roles' callback.
Attempting to use 'profile_tasks' callback.
Loading callback plugin profile_tasks of type aggregate, v2.0 from /usr/lib/python3.6/site-packages/ansible/plugins/callback/profile_tasks.py
Attempting to use 'say' callback.
Attempting to use 'selective' callback.
Skipping callback 'selective', as we already have a stdout callback.
Attempting to use 'skippy' callback.
Skipping callback 'skippy', as we already have a stdout callback.
Attempting to use 'slack' callback.
Attempting to use 'splunk' callback.
Attempting to use 'stderr' callback.
Skipping callback 'stderr', as we already have a stdout callback.
Attempting to use 'sumologic' callback.
Attempting to use 'syslog_json' callback.
Attempting to use 'timer' callback.
Attempting to use 'tree' callback.
Attempting to use 'unixy' callback.
Skipping callback 'unixy', as we already have a stdout callback.
Attempting to use 'yaml' callback.
Skipping callback 'yaml', as we already have a stdout callback.
PLAYBOOK: cluster.yml **********************************************************
Positional arguments: cluster.yml
verbosity: 5
private_key_file: /home/jenkins/agent/workspace/kubespray/ssh.key
remote_user: management-user
connection: smart
timeout: 10
become: True
become_method: sudo
tags: ('all',)
inventory: ('/home/jenkins/agent/workspace/kubespray/hosts',)
extra_vars: ('managed_zone_name=company-zone', 'managed_zone=company.com', 'zone=europe-west1-b', 'project_id=company-gcp-project', 'configurator_release=./', 'kube_version=v1.19.3', "{ 'supplementary_addresses_in_ssl_keys': ['1.2.3.4', 'env.company.com']}", 'podsecuritypolicy_enabled=true')
forks: 5
19 plays in cluster.yml
PLAY [localhost] ***************************************************************
META: ran handlers
Thursday 17 November 2022 18:07:04 +0000 (0:00:00.099) 0:00:00.099 *****
/usr/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
TASK [Check 2.9.0 <= Ansible version < 2.11.0] *********************************
task path: /home/jenkins/agent/workspace/kubespray/ansible_version.yml:12
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 147, in run
res = self._execute()
File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 620, in _execute
self._connection = self._get_connection(cvars, templar)
File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 913, in _get_connection
ansible_playbook_pid=to_text(os.getppid())
File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 573, in get
obj = obj(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/ansible/plugins/connection/local.py", line 47, in __init__
self.default_user = getpass.getuser()
File "/usr/lib64/python3.6/getpass.py", line 169, in getuser
return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 1000'
fatal: [localhost]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Thursday 17 November 2022 18:07:04 +0000 (0:00:00.047) 0:00:00.146 *****
===============================================================================
Check 2.9.0 <= Ansible version < 2.11.0 --------------------------------- 0.05s
/home/jenkins/agent/workspace/kubespray/ansible_version.yml:12
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79404 | https://github.com/ansible/ansible/pull/79414 | 38fe34244ca166418a882cc6e191ccff3a8fc9d1 | 5f3a6b78db093f8d1b062bbd70ac6bf375fdca04 | 2022-11-17T18:04:36Z | python | 2022-11-29T15:08:32Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,397 | ["changelogs/fragments/strftime_docs.yml", "lib/ansible/plugins/filter/strftime.yml"] | Add more complex examples for to_datetime filter docs | ### Summary
I am attempting to subtract two dates that are in ISO 8601 Nano format (ex: 2022-11-15T03:23:13.686956868Z) and the [documentation](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#handling-dates-and-times) doesn't have any examples for that or the ISO 8601 Micro format (ex: 2021-12-15T16:06:24.400087Z), which are the most formats I encounter from ansible module outputs.
Can the section be expanded? Assuming that to_datetime filter can handle these ISO formats
### Issue Type
Documentation Report
### Component Name
to_datetime
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.6]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.9.7 (default, Sep 13 2021, 08:18:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
RHEL 8
### Additional Information
Flesh out documentation to cover how to manipulate dates for common date formats
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79397 | https://github.com/ansible/ansible/pull/79417 | b148fd8dd74c8599f809f71117a86577ccfb0638 | 505b29b2a981eabb2dd84bc66d37704bab91c3f9 | 2022-11-17T00:36:04Z | python | 2022-11-23T17:27:09Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,390 | ["examples/plugin_filters.yml", "lib/ansible/plugins/loader.py", "test/integration/targets/plugin_filtering/filter_lookup.yml", "test/integration/targets/plugin_filtering/filter_modules.yml", "test/integration/targets/plugin_filtering/filter_ping.yml", "test/integration/targets/plugin_filtering/filter_stat.yml", "test/integration/targets/plugin_filtering/no_blacklist_module.ini", "test/integration/targets/plugin_filtering/no_rejectlist_module.yml", "test/integration/targets/plugin_filtering/runme.sh"] | Wrong categorie in plugin filter configuration section | ### Summary
Hello!
I was reading the ansible documentation latest and 2.8 to understand how to create a plugin_filters.yml
In the documentation, I found the `module_rejectlist` keywork to list unwanted module by I have get some errors:
plugin_filters.yml:
```yaml
---
filter_version: '1.0'
module_rejectlist:
# Deprecated
- docker
# We only allow pip, not easy_install
- easy_install
```
Output got:
```bash
$> ansible-playbook connection.yaml
Traceback (most recent call last):
File "/home/master/.local/bin//ansible-playbook", line 5, in <module>
from ansible.cli.playbook import main
File "/home/master/.local/lib/python3.8/site-packages/ansible/cli/__init__.py", line 52, in <module>
from ansible.inventory.manager import InventoryManager
File "/home/master/.local/lib/python3.8/site-packages/ansible/inventory/manager.py", line 38, in <module>
from ansible.plugins.loader import inventory_loader
File "/home/master/.local/lib/python3.8/site-packages/ansible/plugins/loader.py", line 1187, in <module>
_PLUGIN_FILTERS = _load_plugin_filter()
File "/home/master/.local/lib/python3.8/site-packages/ansible/plugins/loader.py", line 1112, in _load_plugin_filter
filters['ansible.modules'] = frozenset(filter_data['module_blacklist'])
KeyError: 'module_blacklist'
```
In fact, after some research, I understood that I should have a 'module_blacklist' list, and not 'module_rejectlist'
Maybe you could change this in the documentation :)
Have a nice day
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/user_guide/plugin_filtering_config.rst
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.6]
config file = /home/master/Digora/Automation/ansible.cfg
configured module search path = ['/usr/share/my_modules']
ansible python module location = /home/master/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/master/.ansible/collections:/usr/share/ansible/collections
executable location = /home/master/.local/bin//ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
COLOR_CHANGED(/home/master/Digora/Automation/ansible.cfg) = yellow
COLOR_DEBUG(/home/master/Digora/Automation/ansible.cfg) = dark gray
COLOR_DEPRECATE(/home/master/Digora/Automation/ansible.cfg) = purple
COLOR_DIFF_ADD(/home/master/Digora/Automation/ansible.cfg) = green
COLOR_DIFF_LINES(/home/master/Digora/Automation/ansible.cfg) = cyan
COLOR_DIFF_REMOVE(/home/master/Digora/Automation/ansible.cfg) = red
COLOR_ERROR(/home/master/Digora/Automation/ansible.cfg) = red
COLOR_HIGHLIGHT(/home/master/Digora/Automation/ansible.cfg) = white
COLOR_OK(/home/master/Digora/Automation/ansible.cfg) = green
COLOR_SKIP(/home/master/Digora/Automation/ansible.cfg) = cyan
COLOR_UNREACHABLE(/home/master/Digora/Automation/ansible.cfg) = red
COLOR_VERBOSE(/home/master/Digora/Automation/ansible.cfg) = blue
COLOR_WARN(/home/master/Digora/Automation/ansible.cfg) = bright purple
DEFAULT_ASK_PASS(/home/master/Digora/Automation/ansible.cfg) = True
DEFAULT_EXECUTABLE(/home/master/Digora/Automation/ansible.cfg) = /bin/sh
DEFAULT_FORKS(/home/master/Digora/Automation/ansible.cfg) = 10
DEFAULT_GATHERING(/home/master/Digora/Automation/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/home/master/Digora/Automation/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOCAL_TMP(/home/master/Digora/Automation/ansible.cfg) = /home/master/.ansible/tmp/ansible-local-1608385bihgyh
DEFAULT_LOG_PATH(/home/master/Digora/Automation/ansible.cfg) = /var/log/ansible.log
DEFAULT_MANAGED_STR(/home/master/Digora/Automation/ansible.cfg) = /!\ Generate by Ansible. Do not edit this file manually. All change will be lost /!\
DEFAULT_MODULE_PATH(/home/master/Digora/Automation/ansible.cfg) = ['/usr/share/my_modules']
DEFAULT_MODULE_UTILS_PATH(/home/master/Digora/Automation/ansible.cfg) = ['/usr/share/my_module_utils']
DEFAULT_NO_LOG(/home/master/Digora/Automation/ansible.cfg) = False
DEFAULT_POLL_INTERVAL(/home/master/Digora/Automation/ansible.cfg) = 15
DEFAULT_REMOTE_PORT(/home/master/Digora/Automation/ansible.cfg) = 22
DEFAULT_REMOTE_USER(/home/master/Digora/Automation/ansible.cfg) = digora-ansible
DEFAULT_ROLES_PATH(/home/master/Digora/Automation/ansible.cfg) = ['/etc/ansible/roles,./roles']
DEFAULT_STRATEGY(/home/master/Digora/Automation/ansible.cfg) = free
DEFAULT_TIMEOUT(/home/master/Digora/Automation/ansible.cfg) = 10
DEFAULT_TRANSPORT(/home/master/Digora/Automation/ansible.cfg) = smart
DEPRECATION_WARNINGS(/home/master/Digora/Automation/ansible.cfg) = True
DIFF_ALWAYS(/home/master/Digora/Automation/ansible.cfg) = False
DISPLAY_SKIPPED_HOSTS(/home/master/Digora/Automation/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/home/master/Digora/Automation/ansible.cfg) = False
PLUGIN_FILTERS_CFG(/home/master/Digora/Automation/ansible.cfg) = /etc/ansible/plugin_filters.yml
CALLBACK:
========
default:
_______
display_skipped_hosts(/home/master/Digora/Automation/ansible.cfg) = True
CONNECTION:
==========
paramiko_ssh:
____________
look_for_keys(/home/master/Digora/Automation/ansible.cfg) = False
remote_user(/home/master/Digora/Automation/ansible.cfg) = digora-ansible
ssh:
___
port(/home/master/Digora/Automation/ansible.cfg) = 22
reconnection_retries(/home/master/Digora/Automation/ansible.cfg) = 5
remote_user(/home/master/Digora/Automation/ansible.cfg) = digora-ansible
timeout(/home/master/Digora/Automation/ansible.cfg) = 10
SHELL:
=====
sh:
__
remote_tmp(/home/master/Digora/Automation/ansible.cfg) = ~/.ansible/tmp
```
### OS / Environment
$> cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
### Additional Information
No Additional Information
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79390 | https://github.com/ansible/ansible/pull/79391 | 942bcf6e7a911430694e08dd604d62576ca7d6f2 | 1bda6750f5f4fb8b01de21d1949b02d7547ff838 | 2022-11-16T13:33:43Z | python | 2022-11-18T19:26:35Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,368 | ["changelogs/fragments/79368-galaxy-manifest-reuse-licenses.yml", "lib/ansible/galaxy/collection/__init__.py"] | galaxy.yml `manifest: {}` excludes REUSE licenses by default | ### Summary
Multiple community collections have adopted the REUSE licensing standard. The cornerstone of REUSE is a LICENSES directory in the repository root. Additionally, some of these collections have `*.license` files within sub-directories and `.reuse/dep5` file. Unfortunately, the manifest directives exclude *all* of those by default. It's *very* important that the default manifest directories include licensing information. This specification is well established across the OSS landscape, so I think it's reasonable to handle it by default.
### Issue Type
Bug Report
### Component Name
ansible-galaxy collection build
### Ansible Version
```console
$ ansible --version
ansible [core 2.14.0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/gotmax/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.10/site-packages/ansible
ansible collection location = /home/gotmax/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.8 (main, Nov 9 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-2)] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_NOCOWS(env: ANSIBLE_NOCOWS) = True
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_STDOUT_CALLBACK(env: ANSIBLE_STDOUT_CALLBACK) = community.general.yaml
```
### OS / Environment
Fedora 36
### Steps to Reproduce
1. Download the community.general 6.0.0 sources
2. `ansible-galaxy build .`
3. Add `manifest: {}` to the galaxy.yml
4. Rebuild
5. Compare the outputs
### Expected Results
The aforementioned licensing related files listed above should be included. The default directives list should be changed to something like:
```
include meta/*.yml
include *.txt *.md *.rst *.license COPYING LICENS
recursive-include LICENSES **
recursive-include .reuse **
recursive-include tests **
recursive-include docs **.rst **.yml **.yaml **.json **.j2 **.txt **.license
recursive-include roles **.yml **.yaml **.json **.j2 **.license
recursive-include playbooks **.yml **.yaml **.json **.license
recursive-include changelogs **.yml **.yaml **.license
recursive-include plugins */**.py **.license
recursive-include plugins/become **.yml **.yaml **.license
recursive-include plugins/cache **.yml **.yaml **.license
recursive-include plugins/callback **.yml **.yaml **.license
recursive-include plugins/cliconf **.yml **.yaml **.license
recursive-include plugins/connection **.yml **.yaml **.license
recursive-include plugins/filter **.yml **.yaml **.license
recursive-include plugins/httpapi **.yml **.yaml **.license
recursive-include plugins/inventory **.yml **.yaml **.license
recursive-include plugins/lookup **.yml **.yaml **.license
recursive-include plugins/netconf **.yml **.yaml **.license
recursive-include plugins/shell **.yml **.yaml **.license
recursive-include plugins/strategy **.yml **.yaml **.license
recursive-include plugins/test **.yml **.yaml **.license
recursive-include plugins/vars **.yml **.yaml **.license
recursive-include plugins/modules **.ps1 **.yml **.yaml **.license
recursive-include plugins/module_utils **.ps1 **.psm1 **.cs **.license
exclude galaxy.yml galaxy.yaml MANIFEST.json FILES.json <namespace>-<name>-*.tar.gz
recursive-exclude tests/output **
global-exclude /.* /__pycache__
```
---
``` diff
--- old
+++ new
@@ -1,27 +1,29 @@
include meta/*.yml
-include *.txt *.md *.rst COPYING LICENSE
+include *.txt *.md *.rst *.license COPYING LICENSE
+recursive-include LICENSES **
+recursive-include .reuse **
recursive-include tests **
-recursive-include docs **.rst **.yml **.yaml **.json **.j2 **.txt
-recursive-include roles **.yml **.yaml **.json **.j2
-recursive-include playbooks **.yml **.yaml **.json
-recursive-include changelogs **.yml **.yaml
-recursive-include plugins */**.py
-recursive-include plugins/become **.yml **.yaml
-recursive-include plugins/cache **.yml **.yaml
-recursive-include plugins/callback **.yml **.yaml
-recursive-include plugins/cliconf **.yml **.yaml
-recursive-include plugins/connection **.yml **.yaml
-recursive-include plugins/filter **.yml **.yaml
-recursive-include plugins/httpapi **.yml **.yaml
-recursive-include plugins/inventory **.yml **.yaml
-recursive-include plugins/lookup **.yml **.yaml
-recursive-include plugins/netconf **.yml **.yaml
-recursive-include plugins/shell **.yml **.yaml
-recursive-include plugins/strategy **.yml **.yaml
-recursive-include plugins/test **.yml **.yaml
-recursive-include plugins/vars **.yml **.yaml
-recursive-include plugins/modules **.ps1 **.yml **.yaml
-recursive-include plugins/module_utils **.ps1 **.psm1 **.cs
+recursive-include docs **.rst **.yml **.yaml **.json **.j2 **.txt **.license
+recursive-include roles **.yml **.yaml **.json **.j2 **.license
+recursive-include playbooks **.yml **.yaml **.json **.license
+recursive-include changelogs **.yml **.yaml **.license
+recursive-include plugins */**.py **.license
+recursive-include plugins/become **.yml **.yaml **.license
+recursive-include plugins/cache **.yml **.yaml **.license
+recursive-include plugins/callback **.yml **.yaml **.license
+recursive-include plugins/cliconf **.yml **.yaml **.license
+recursive-include plugins/connection **.yml **.yaml **.license
+recursive-include plugins/filter **.yml **.yaml **.license
+recursive-include plugins/httpapi **.yml **.yaml **.license
+recursive-include plugins/inventory **.yml **.yaml **.license
+recursive-include plugins/lookup **.yml **.yaml **.license
+recursive-include plugins/netconf **.yml **.yaml **.license
+recursive-include plugins/shell **.yml **.yaml **.license
+recursive-include plugins/strategy **.yml **.yaml **.license
+recursive-include plugins/test **.yml **.yaml **.license
+recursive-include plugins/vars **.yml **.yaml **.license
+recursive-include plugins/modules **.ps1 **.yml **.yaml **.license
+recursive-include plugins/module_utils **.ps1 **.psm1 **.cs **.license
# manifest.directives from galaxy.yml inserted here
exclude galaxy.yml galaxy.yaml MANIFEST.json FILES.json <namespace>-<name>-*.tar.gz
recursive-exclude tests/output **
```
### Actual Results
> diff <(tar tf ../6.0.0_manifest_comp/before/community-general-6.0.0.tar.gz|sort) <(tar tf ../6.0.0_manifest_comp/after/community-general-6.0.0.tar.gz | sort)
``` diff
1,15d0
< .azure-pipelines/
< .azure-pipelines/azure-pipelines.yml
< .azure-pipelines/README.md
< .azure-pipelines/scripts/
< .azure-pipelines/scripts/aggregate-coverage.sh
< .azure-pipelines/scripts/combine-coverage.py
< .azure-pipelines/scripts/process-results.sh
< .azure-pipelines/scripts/publish-codecov.py
< .azure-pipelines/scripts/report-coverage.sh
< .azure-pipelines/scripts/run-tests.sh
< .azure-pipelines/scripts/time-command.py
< .azure-pipelines/templates/
< .azure-pipelines/templates/coverage.yml
< .azure-pipelines/templates/matrix.yml
< .azure-pipelines/templates/test.yml
17d1
< CHANGELOG.rst.license
20d3
< changelogs/changelog.yaml.license
22,24d4
< changelogs/fragments/
< changelogs/fragments/.keep
< changelogs/.gitignore
89,108d68
< .github/
< .github/BOTMETA.yml
< .github/dependabot.yml
< .github/ISSUE_TEMPLATE/
< .github/ISSUE_TEMPLATE/bug_report.yml
< .github/ISSUE_TEMPLATE/config.yml
< .github/ISSUE_TEMPLATE/documentation_report.yml
< .github/ISSUE_TEMPLATE/feature_request.yml
< .github/patchback.yml
< .github/settings.yml
< .github/workflows/
< .github/workflows/codeql-analysis.yml
< .github/workflows/docs-pr.yml
< .github/workflows/reuse.yml
< .gitignore
< LICENSES/
< LICENSES/BSD-2-Clause.txt
< LICENSES/GPL-3.0-or-later.txt
< LICENSES/MIT.txt
< LICENSES/PSF-2.0.txt
922d881
< .pre-commit-config.yaml
924,925d882
< .reuse/
< .reuse/dep5
928d884
< tests/.gitignore
1114,1115d1069
< tests/integration/targets/django_manage/files/base_test/startproj/
< tests/integration/targets/django_manage/files/base_test/startproj/.keep
2512d2465
< tests/integration/targets/terraform/.gitignore
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79368 | https://github.com/ansible/ansible/pull/79403 | a954918b6095adf52c663bdcc340c55762189393 | 942bcf6e7a911430694e08dd604d62576ca7d6f2 | 2022-11-12T22:04:28Z | python | 2022-11-17T23:13:01Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,364 | ["changelogs/fragments/79364_replace.yml", "lib/ansible/modules/replace.py", "test/integration/targets/replace/tasks/main.yml"] | ansible.builtin.replace : bad escape error causes with an unknown escape string on Python >= 3.7 | ### Summary
When an unknown escape string is specified in the ansible.builtin.replace module, it causes an error with these traceback when running on Python >= 3.7. It worked fine on Python 3.6.
```
The full traceback is:
Traceback (most recent call last):
File "/usr/lib64/python3.9/sre_parse.py", line 1039, in parse_template
this = chr(ESCAPES[this][1])
KeyError: '\\D'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sugimura/.ansible/tmp/ansible-tmp-1668126379.2704046-690797-60735267105511/AnsiballZ_replace.py", line 107, in <module>
_ansiballz_main()
File "/home/sugimura/.ansible/tmp/ansible-tmp-1668126379.2704046-690797-60735267105511/AnsiballZ_replace.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/sugimura/.ansible/tmp/ansible-tmp-1668126379.2704046-690797-60735267105511/AnsiballZ_replace.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.replace', init_globals=dict(_module_fqn='ansible.modules.replace', _modlib_path=modlib_path),
File "/usr/lib64/python3.9/runpy.py", line 210, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_replace_payload_6ihxs5_t/ansible_replace_payload.zip/ansible/modules/replace.py", line 316, in <module>
File "/tmp/ansible_replace_payload_6ihxs5_t/ansible_replace_payload.zip/ansible/modules/replace.py", line 286, in main
File "/usr/lib64/python3.9/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib64/python3.9/re.py", line 327, in _subx
template = _compile_repl(template, pattern)
File "/usr/lib64/python3.9/re.py", line 318, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "/usr/lib64/python3.9/sre_parse.py", line 1042, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \D at position 0
```
### Issue Type
Bug Report
### Component Name
replace
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/sugimura/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.7 (default, Sep 13 2021, 08:18:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
$ (nothing)
```
### OS / Environment
RHEL 8.6
Ansible Core 2.13.3 is installed via AAP 2.2.1 bundled installer.
$ rpm -q ansible-core
ansible-core-2.13.3-1.el8ap.x86_64
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
---
- name: Test replace module error
hosts: localhost
gather_facts: no
tasks:
- name: Test replace with bad escape
replace:
path: /dev/null
after: ^
before: $
regexp: \.
replace: '\D'
```
I saved the above playbook as `replace.yml`, and I ran it as follows.
```
$ ansible-playbook replace.yml -vvv
ansible-playbook [core 2.13.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/sugimura/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.9.7 (default, Sep 13 2021, 08:18:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 3.0.3
libyaml = True
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: replace.yml ******************************************************************************************************************************************************************
1 plays in replace.yml
PLAY [Test replace module error] *******************************************************************************************************************************************************
META: ran handlers
TASK [Test replace with bad escape] ****************************************************************************************************************************************************
task path: /home/sugimura/xxxxxxxx/replace.yml:7
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: sugimura
<127.0.0.1> EXEC /bin/sh -c 'echo ~sugimura && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/sugimura/.ansible/tmp `"&& mkdir "` echo /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929 `" && echo ansible-tmp-1668126469.1875505-690831-187512971117929="` echo /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929 `" ) && sleep 0'
Using module file /usr/lib/python3.9/site-packages/ansible/modules/replace.py
<127.0.0.1> PUT /home/sugimura/.ansible/tmp/ansible-local-690827gvas_1rf/tmp55447ur9 TO /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/ /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.9 /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/usr/lib64/python3.9/sre_parse.py", line 1039, in parse_template
this = chr(ESCAPES[this][1])
KeyError: '\\D'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py", line 107, in <module>
_ansiballz_main()
File "/home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.replace', init_globals=dict(_module_fqn='ansible.modules.replace', _modlib_path=modlib_path),
File "/usr/lib64/python3.9/runpy.py", line 210, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_replace_payload__eoyxji2/ansible_replace_payload.zip/ansible/modules/replace.py", line 316, in <module>
File "/tmp/ansible_replace_payload__eoyxji2/ansible_replace_payload.zip/ansible/modules/replace.py", line 286, in main
File "/usr/lib64/python3.9/re.py", line 221, in subn
return _compile(pattern, flags).subn(repl, string, count)
File "/usr/lib64/python3.9/re.py", line 327, in _subx
template = _compile_repl(template, pattern)
File "/usr/lib64/python3.9/re.py", line 318, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "/usr/lib64/python3.9/sre_parse.py", line 1042, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \D at position 0
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/usr/lib64/python3.9/sre_parse.py\", line 1039, in parse_template\n this = chr(ESCAPES[this][1])\nKeyError: '\\\\D'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py\", line 107, in <module>\n _ansiballz_main()\n File \"/home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/sugimura/.ansible/tmp/ansible-tmp-1668126469.1875505-690831-187512971117929/AnsiballZ_replace.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible.modules.replace', init_globals=dict(_module_fqn='ansible.modules.replace', _modlib_path=modlib_path),\n File \"/usr/lib64/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib64/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_replace_payload__eoyxji2/ansible_replace_payload.zip/ansible/modules/replace.py\", line 316, in <module>\n File \"/tmp/ansible_replace_payload__eoyxji2/ansible_replace_payload.zip/ansible/modules/replace.py\", line 286, in main\n File \"/usr/lib64/python3.9/re.py\", line 221, in subn\n return _compile(pattern, flags).subn(repl, string, count)\n File \"/usr/lib64/python3.9/re.py\", line 327, in _subx\n template = _compile_repl(template, pattern)\n File \"/usr/lib64/python3.9/re.py\", line 318, in _compile_repl\n return sre_parse.parse_template(repl, pattern)\n File \"/usr/lib64/python3.9/sre_parse.py\", line 1042, in parse_template\n raise s.error('bad escape %s' % this, len(this))\nre.error: bad escape \\D at position 0\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP *****************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
### Expected Results
When I ran the same playbook against the platform-python (Python 3.6.8), it worked without errors. If such an unknown escape string should not be processed, it is better to handle the error properly without showing tracebacks.
```
$ /usr/libexec/platform-python -V
Python 3.6.8
$ ansible-playbook replace.yml -e ansible_python_interpreter=/usr/libexec/platform-python -vvv
ansible-playbook [core 2.13.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/sugimura/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.9.7 (default, Sep 13 2021, 08:18:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 3.0.3
libyaml = True
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: replace.yml ******************************************************************************************************************************************************************
1 plays in replace.yml
PLAY [Test replace module error] *******************************************************************************************************************************************************
META: ran handlers
TASK [Test replace with bad escape] ****************************************************************************************************************************************************
task path: /home/sugimura/xxxxxxxx/replace.yml:7
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: sugimura
<127.0.0.1> EXEC /bin/sh -c 'echo ~sugimura && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/sugimura/.ansible/tmp `"&& mkdir "` echo /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905 `" && echo ansible-tmp-1668126675.0094352-690895-49572636992905="` echo /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905 `" ) && sleep 0'
Using module file /usr/lib/python3.9/site-packages/ansible/modules/replace.py
<127.0.0.1> PUT /home/sugimura/.ansible/tmp/ansible-local-690891h5qw1fvl/tmprpzce9tj TO /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905/AnsiballZ_replace.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905/ /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905/AnsiballZ_replace.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/libexec/platform-python /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905/AnsiballZ_replace.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/sugimura/.ansible/tmp/ansible-tmp-1668126675.0094352-690895-49572636992905/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"invocation": {
"module_args": {
"after": "^",
"attributes": null,
"backup": false,
"before": "$",
"encoding": "utf-8",
"group": null,
"mode": null,
"owner": null,
"path": "/dev/null",
"regexp": "\\.",
"replace": "\\D",
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"unsafe_writes": false,
"validate": null
}
},
"msg": "",
"rc": 0
}
META: ran handlers
META: ran handlers
PLAY RECAP *****************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
### Actual Results
```console
See the `Steps to Reproduce` above.
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79364 | https://github.com/ansible/ansible/pull/81244 | d373ec572b2a0c6bdcdd0f8a2e6e8e77083ef492 | c3015c5eb1740416d1902200b669181f5d0840fd | 2022-11-11T00:38:53Z | python | 2023-07-13T19:25:08Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,306 | ["changelogs/fragments/79658-improving-return-and-docs.yaml", "lib/ansible/modules/apt_repository.py", "test/integration/targets/apt_repository/tasks/apt.yml"] | Clarify apt_repository filename default | ### Summary
The [`filename` parameter docs](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_repository_module.html#parameter-filename) don't give enough info to tell how the file name is generated.
I believe my `repo: deb https://packagecloud.io/linz/prod/ubuntu/ {{ ansible_distribution_release }} main` is hanging indefinitely ~~, and I suspect this has something to do with the file name being a duplicate, resulting in a background prompt which is never printed or dismissed, but it's hard to tell based on the [code](https://github.com/ansible/ansible/blob/f3be331c9cb2f2c6edeb0bdf28a1e8a9681d727c/lib/ansible/modules/apt_repository.py#L235-L258)~~ (Based on copying the code into a Python interpreter it looks like the generated file name is `packagecloud_io_linz_prod_ubuntu.list`, which looks fine.).
### Issue Type
Documentation Report
### Component Name
lib/ansible/modules/apt_repository.py
### Ansible Version
```console
N/A
```
### Configuration
```console
N/A
```
### OS / Environment
N/A
### Additional Information
N/A
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79306 | https://github.com/ansible/ansible/pull/79658 | 402ae0aa5ddfe354fa49a434edffdef082651870 | 32672c63268e36f4b6125d3609c67275b6114045 | 2022-11-04T00:58:45Z | python | 2023-02-06T18:56:21Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,264 | ["docs/docsite/rst/reference_appendices/faq.rst"] | Docs request: ssh_args in Ansible Configuration Settings | ### Summary
In the FAQ there's a section talking about `ssh_args`: https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-get-ansible-to-notice-a-dead-target-in-a-timely-manner
However, when you go to the config reference: https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings
There is no mention of `ssh_args`. Can we add `ssh_args` to the Ansible Configuration Settings page?
It seems in 2.4 it was documented, not sure why it went away: https://docs.ansible.com/ansible/2.4/intro_configuration.html#ssh-args
### Issue Type
Documentation Report
### Component Name
unsure
### Ansible Version
```console
$ ansible --version
"latest" in docs
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
n/a
```
### OS / Environment
n/a
### Additional Information
n/a
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79264 | https://github.com/ansible/ansible/pull/79308 | 183c34db6570472ced06e38c8be79c78150e1f4b | f9451dfaf89bbab83e6ec19fc7e3954c83ec4f13 | 2022-10-31T17:54:22Z | python | 2022-11-10T10:35:02Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,225 | ["changelogs/fragments/ansible-test-integration-target-prefixes.yml", "test/integration/targets/ansible-test-integration-targets/ansible_collections/ns/col/tests/integration/target-prefixes.something", "test/integration/targets/ansible-test-integration-targets/ansible_collections/ns/col/tests/integration/targets/one-part_test/aliases", "test/integration/targets/ansible-test-integration-targets/ansible_collections/ns/col/tests/integration/targets/two_part_test/aliases", "test/integration/targets/ansible-test-integration-targets/test.py", "test/lib/ansible_test/_internal/target.py"] | ansible-test network-integration doesn't support network prefixes including underscore | ### Summary
When using ansible-test network-integration command, no matching target is found if the target-prefixes.network file is referencing a target containing an underscore.
### Issue Type
Bug Report
### Component Name
ansible-test
### Ansible Version
```console
ansible --version
ansible [core 2.13.5.post0] (stable-2.13 b44cb7aa99) last updated 2022/10/23 22:23:42 (GMT +200)
config file = None
configured module search path = ['/home/warkdev/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/warkdev/ansible/lib/ansible
ansible collection location = /home/warkdev/.ansible/collections:/usr/share/ansible/collections
executable location = /home/warkdev/ansible/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Linux ansible-dev 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux
### Steps to Reproduce
- Create a simple collection with a very simple integration test case.
- Add a target, as a_b_facts to test the corresponding module.
- Add a dummy network inventory (won't be used).
- Add the following target-prefixes.network file:
```
a_b
```
Try to run the following command:
```
ansible-test network-integration --inventory inventory.networking a_b_.*
```
Notice that the target isn't detected as a network target since the code is expecting only "a" as prefix for a network target.
The suspicious line is located here: https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_internal/target.py#L627
### Expected Results
Matching test starting by network prefix a_b should be running
### Actual Results
```console
ansible-test network-integration --inventory inventory.networking a_b_.* -vvv
RLIMIT_NOFILE: (1024, 1048576)
Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
FATAL: Target pattern not matched: a_b_.*
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79225 | https://github.com/ansible/ansible/pull/80021 | fe2732b91e538e0278104d71417ddfd0aae01eed | e6cffce0eb58ba54c097f4ce7111bb97e6805051 | 2022-10-26T10:52:39Z | python | 2023-02-21T01:54:34Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,174 | ["changelogs/fragments/ansible-galaxy-role-search-rc.yml", "docs/docsite/rst/porting_guides/porting_guide_core_2.15.rst", "lib/ansible/cli/galaxy.py"] | "ansible-galaxy collection list ns.col" has return code 0 when collection is not installed | ### Summary
To reproduce, run these commands where `ns.col` is the name of a collection you do not have installed and the value of `-p` is a valid collection path that exists:
`ansible-galaxy collection list ns.col -p collections/`
`$?`
The output of $? on devel is 0, but since the collection wasn't found it should be 1. The same issue exists for listing specific roles that do not exist.
To fix:
1. [This method](https://github.com/ansible/ansible/blob/stable-2.14/lib/ansible/cli/galaxy.py#L1494-L1502) needs to return the correct exit code from `execute_list_role` and `execute_list_collection`.
2. `execute_list_collection` and `execute_list_role` will need to be fixed to return 1 if a collection/role was requested and not found.
For example, on [this line ](https://github.com/ansible/ansible/blob/stable-2.14/lib/ansible/cli/galaxy.py#L1680) add
```python
if not collection_found and collection_name:
return 1
```
3. Add a new test to [this file](https://github.com/ansible/ansible/blob/stable-2.14/test/integration/targets/ansible-galaxy-collection/tasks/list.yml), similar to [this one](https://github.com/ansible/ansible/blob/stable-2.14/test/integration/targets/ansible-galaxy-collection/tasks/list.yml#L111-L116) that lists a single collection that does not exist. Then add an assert task following it to test that the command result's rc is 1.
4. Add a `bugfixes` [changelog fragment](https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment).
### Issue Type
Bug Report
### Component Name
ansible-galaxy
### Ansible Version
```console
$ ansible --version
ansible [core 2.15.0.dev0]
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
N/A
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```bash (paste below)
ansible-galaxy collection list ns.col -p collections/
$?
```
### Expected Results
1
### Actual Results
```console
0
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79174 | https://github.com/ansible/ansible/pull/79195 | f3f7d442389208ed5b249902c01d7d888f7c0546 | da3a7618baa500899d11bb9a80863fdb1f80e3f1 | 2022-10-20T13:53:07Z | python | 2022-10-25T16:00:56Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,101 | ["changelogs/fragments/dont_move_non_files.yml", "lib/ansible/modules/copy.py", "test/integration/targets/copy/tasks/main.yml", "test/integration/targets/copy/tasks/src_remote_file_is_not_file.yml"] | ansible.builtin.copy deletes /dev/null instead of copying when called as root | ### Summary
When calling `ansible -m ansible.builtin.copy -a 'src=/dev/null dest=/tmp/xxx remote_src=true' localhost -b`, ansible complains that the _target_ file doesn't exist, and then, if the target file exists, removes the source `/dev/null` instead of copying it onto the target.
### Issue Type
Bug Report
### Component Name
ansible.builtin.copy
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.6]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/elavarde/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
ansible collection location = /home/elavarde/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 2.10.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
BECOME:
======
CACHE:
=====
CALLBACK:
========
CLICONF:
=======
CONNECTION:
==========
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
VARS:
====
```
### OS / Environment
RHEL 8
### Steps to Reproduce
```
ansible -m ansible.builtin.copy -a 'src=/dev/null dest=/tmp/xxx remote_src=true' localhost -b
touch /tmp/xxx
ansible -m ansible.builtin.copy -a 'src=/dev/null dest=/tmp/xxx remote_src=true' localhost -b
```
### Expected Results
I expected the target file to be emptied by copy (similarly to what `cp /dev/null somefile` does). This works also if the _target_ file pre-exists and I call the command _without_ become.
### Actual Results
```console
$ ansible -m ansible.builtin.copy -a 'src=/dev/null dest=/tmp/xxx remote_src=true' localhost -b
localhost | FAILED! => {
"changed": false,
"msg": "path /tmp/xxx does not exist",
"path": "/tmp/xxx"
}
$ touch /tmp/xxx
$ ansible -m ansible.builtin.copy -a 'src=/dev/null dest=/tmp/xxx remote_src=true' localhost -b
[WARNING]: Error deleting remote temporary files (rc: 1, stderr: /bin/sh: /dev/null: Permission denied })
Process WorkerProcess-1:
localhost | CHANGED => {
"changed": true,
"checksum": null,
"dest": "/tmp/xxx",
"gid": 1000,
"group": "elavarde",
"md5sum": null,
"mode": "0664",
"owner": "elavarde",
"secontext": "unconfined_u:object_r:user_tmp_t:s0",
"size": 0,
"src": "/dev/null",
"state": "file",
"uid": 1000
}
Traceback (most recent call last):
File "/usr/lib64/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/site-packages/ansible/executor/process/worker.py", line 138, in run
sys.stdout = sys.stderr = open(os.devnull, 'w')
PermissionError: [Errno 13] Permission denied: '/dev/null'
$ ls -la /dev/null
ls: cannot access '/dev/null': No such file or directory
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79101 | https://github.com/ansible/ansible/pull/79102 | cb2e434dd2359a9fe1c00e75431f4abeff7381e8 | f66016df0e22e1234417dc3538bea75299b4e9eb | 2022-10-11T14:59:50Z | python | 2022-10-17T17:07:04Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,095 | ["docs/docsite/rst/installation_guide/intro_installation.rst"] | Documentation required for minimal privileges of service account for managed node | ### Summary
I wanted to view βmanaged node requirementsβ. My original need is below:
β A managed node is AFAIK usually accessed via some user account over ssh.
What are the minimal privileges, or any other requirements of that account within that managed node.?
Will have multiple platform implications.
_Originally posted by @pjgoodall in https://github.com/ansible/ansible/issues/79080#issuecomment-1273905891_
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/installation_guide/intro_installation.rst
### Ansible Version
```console (paste below)
$ ansible --version
2.13
```
### Configuration
```console (paste below)
$ ansible-config dump --only-changed
```
### OS / Environment
N/A
### Additional Information
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
| https://github.com/ansible/ansible/issues/79095 | https://github.com/ansible/ansible/pull/79189 | 465480f755b7f4bad72090bbb350c1bd993505ae | 757efa4a457a20731dcdaa38f86a02e14b446ede | 2022-10-10T23:37:50Z | python | 2022-10-24T20:53:43Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,083 | ["changelogs/fragments/79083-jinja2_native-preserve-quotes-in-strings.yml", "lib/ansible/template/native_helpers.py", "test/integration/targets/jinja2_native_types/runme.sh", "test/integration/targets/jinja2_native_types/test_casting.yml", "test/integration/targets/jinja2_native_types/test_concatentation.yml", "test/integration/targets/jinja2_native_types/test_preserving_quotes.yml"] | enabling jinja2 native leads to quotes nested in quotes being stripped | ### Summary
Enabling jinja2 native leads to quotes nested in other quotes (single quotes in double quotes or vice versa) being stripped. This stripping is additionally done in a seemingly inconsistent and unpredictable way.
### Issue Type
Bug Report
### Component Name
jinja2
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.3]
config file = /home/yannik/projects/closed/ansible.cfg
configured module search path = ['/home/yannik/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
ansible collection location = /home/yannik/projects/closed/vendor_collections
executable location = /usr/local/bin/ansible
python version = 3.10.7 (main, Sep 7 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_NOCOWS(/home/yannik/projects/xxx/ansible.cfg) = True
```
### OS / Environment
fedora 36
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- hosts: all
tasks:
- copy:
content: |
{{ myvar }}
dest: out1
vars:
myvar: '"hello {{ ansible_host }}"'
- copy:
content: |
{{ myvar }}
dest: out2
vars:
myvar: '"hello"'
- copy:
content: |
{{ myvar }}
dest: out3
vars:
myvar: ' "hello"'
- copy:
content: |
a = {{ myvar }}
dest: out4
vars:
myvar: '"hello {{ ansible_host }}"'
- copy:
content: |
a = {{ myvar }}
dest: out5
vars:
myvar: '"hello"'
- copy:
content: |
a = {{ myvar }}
dest: out6
vars:
myvar: ' "hello"'
```
```
ansible-playbook -i localhost, test.yml
cat ~/out*
```
### Expected Results
This is the result with jinja2 native disabled, and which I would generally expect:
```
"hello localhost"
"hello"
"hello"
a = "hello localhost"
a = "hello"
a = "hello"
```
### Actual Results
```console
hello localhost
hello
"hello"
a = hello localhost
a = "hello"
a = "hello"
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79083 | https://github.com/ansible/ansible/pull/79119 | f9cb6796755cda8d221a4b5f6851f0e50a4af91e | d34b5786858f699ef36da6785464021889eaa672 | 2022-10-08T22:12:34Z | python | 2022-10-12T17:16:06Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,039 | ["docs/docsite/rst/reference_appendices/faq.rst"] | Docs: Add code-block wrappers to code examples in faq.rst | ### This issue has been assigned to Shellylo
### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `faq.rst ` file in the `docs/reference_appendices/` directory, there are 15 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep faq.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files) _
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/faq.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79039 | https://github.com/ansible/ansible/pull/79047 | 25a770de37f6ad4099dff490a44b6ec70db3d4b4 | 35700f57cc62a15d7f04a82eaae2193c65fb8570 | 2022-10-05T12:27:22Z | python | 2022-10-05T16:46:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,038 | ["docs/docsite/rst/reference_appendices/general_precedence.rst"] | Docs: Add code-block wrappers to code examples in general_precedence.rst |
### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `general_precedence.rst ` file in the `docs/reference_appendices/` directory, there are 5 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep general_precedence.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/general_precedence.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79038 | https://github.com/ansible/ansible/pull/79042 | 63b5fc4b8dfc22bf3fde03fe14c2b09353845e65 | 3a788314a2362e548a9bbe47b48456a9a0f1364f | 2022-10-05T12:16:41Z | python | 2022-10-05T15:41:34Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,036 | ["docs/docsite/rst/reference_appendices/YAMLSyntax.rst"] | Docs: Add code-block wrappers to code examples in YAMLSyntax.rst | ### Note: This issue has been assigned to shade34321.
### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
In the `YAMLSyntax.rst` file in the `docs/reference_appendices/` directory, there are 19 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep YAMLSyntax.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/YAMLSyntax.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79036 | https://github.com/ansible/ansible/pull/79040 | 3fc337146383451d9348f00bf8abbb0dd1aa2dab | 25a770de37f6ad4099dff490a44b6ec70db3d4b4 | 2022-10-05T11:47:04Z | python | 2022-10-05T16:28:53Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,033 | ["docs/docsite/rst/plugins/lookup.rst", "docs/docsite/rst/plugins/strategy.rst"] | Docs: Add code-block wrappers to code examples in strategy.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `strategy.rst ` file in the `docs/docsite/rst/plugins/` directory, there is one instance of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep strategy.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
-
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/plugins/strategy.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79033 | https://github.com/ansible/ansible/pull/79048 | 35700f57cc62a15d7f04a82eaae2193c65fb8570 | 680bf029b1c2430fab6988bc6cd8138d2d06a023 | 2022-10-05T11:29:20Z | python | 2022-10-05T16:55:41Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,032 | ["docs/docsite/rst/plugins/lookup.rst", "docs/docsite/rst/plugins/strategy.rst"] | Docs: Add code-block wrappers to code examples in lookup.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `lookup.rst` file in the `docs/docsite/rst/plugins/` directory, there are 5 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep lookup.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/plugins/lookup.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79032 | https://github.com/ansible/ansible/pull/79048 | 35700f57cc62a15d7f04a82eaae2193c65fb8570 | 680bf029b1c2430fab6988bc6cd8138d2d06a023 | 2022-10-05T11:23:43Z | python | 2022-10-05T16:55:41Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,031 | ["docs/docsite/rst/inventory/implicit_localhost.rst"] | Docs: Add code-block wrappers to code examples in implicit_localhost.rst | ### Summary
*Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `implicit_localhost.rst ` file in the `docs/docsite/rst/inventory/` directory, there are 2 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" .
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep developing_collections_distributing.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/inventory/implicit_localhost.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79031 | https://github.com/ansible/ansible/pull/79086 | ad5d9843d651dd35287e2ad1ed0f57439e864e7e | 8ecfb7c6d8384365cf34c893f6e6faad421f3bc3 | 2022-10-05T11:05:55Z | python | 2022-10-10T04:03:03Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,030 | ["docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst"] | Docs: Add code-block wrappers to code examples in network_debug_troubleshooting.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `network_debug_troubleshooting.rst ` file in the Network Advanced Topics Guide (`docs/docsite/rst/network/user_guide/`), there are 2 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" .
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep developing_collections_distributing.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is wrapped in a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79030 | https://github.com/ansible/ansible/pull/79034 | ff6e4da36addccb06001f7b05b1a9c04ae1d7984 | 57f22529cbb9bbcb56ae3e8d597fb508dec409a1 | 2022-10-05T10:57:48Z | python | 2022-10-05T11:46:08Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,029 | ["docs/docsite/rst/playbook_guide/playbooks_filters.rst"] | Docs: Add code-block wrappers to code examples in playbooks_filters.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In theΒ `./playbooks_filters.rst` file in the Playbook Guide (`docs/docsite/rst/playbook_guide `), there is one instance where a lead-in sentence ends withΒ `::`. Use the followingΒ `grep`Β command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" .
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep developing_collections_distributing.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/playbook_guide/playbooks_filters.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79029 | https://github.com/ansible/ansible/pull/79093 | a48c4422759605a95e74d0a7e8456ad35f72caa8 | dfef3260a52a0d1038ed0c6840a5d40a4dbfeeb3 | 2022-10-05T10:46:33Z | python | 2022-10-10T21:59:23Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,028 | ["docs/docsite/rst/scenario_guides/guide_alicloud.rst"] | Docs: Add code-block wrappers to code examples in guide_alicloud.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In theΒ `guide_alicloud.rst` file in the Scenario Guides (`docs/docsite/rst/scenario_guides`), there are 2 instances where a lead-in sentence ends withΒ `::`. Use the followingΒ `grep`Β command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" .
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/scenario_guides/guide_alicloud.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79028 | https://github.com/ansible/ansible/pull/79037 | 57f22529cbb9bbcb56ae3e8d597fb508dec409a1 | 63b5fc4b8dfc22bf3fde03fe14c2b09353845e65 | 2022-10-05T10:41:06Z | python | 2022-10-05T12:39:06Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,023 | ["changelogs/fragments/79023-fix-flush_handlers-fqcn.yml", "lib/ansible/plugins/strategy/linear.py", "test/integration/targets/handlers/runme.sh", "test/integration/targets/handlers/test_fqcn_meta_flush_handlers.yml"] | meta flush_handlers doesn't work in role | ### Summary
Triggering handlers with `ansible.builtin.meta: flush_handlers` in a role results in an error
### Issue Type
Bug Report
### Component Name
meta
### Ansible Version
```console
$ ansible --version
ansible [core 2.14.0b2]
config file = /home/twouters/.ansible.cfg
configured module search path = ['/home/twouters/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/twouters/ansible-2.14/lib/python3.10/site-packages/ansible
ansible collection location = /home/twouters/.ansible/collections:/usr/share/ansible/collections
executable location = /home/twouters/ansible-2.14/bin/ansible
python version = 3.10.7 (main, Sep 6 2022, 21:22:27) [GCC 12.2.0] (/home/twouters/ansible-2.14/bin/python)
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Arch Linux and Debian but probably irrelevant
### Steps to Reproduce
```
$ tree -Ap
[drwx------] .
βββ [drwxr-xr-x] testrole
β βββ [drwxr-xr-x] handlers
β β βββ [-rw-r--r--] main.yml
β βββ [drwxr-xr-x] tasks
β βββ [-rw-r--r--] main.yml
βββ [-rw-r--r--] test.yml
3 directories, 3 files
```
```
$ cat test.yml
- hosts: localhost
pre_tasks:
- ansible.builtin.command: /bin/true
notify: do nothing
handlers:
- name: do nothing
ansible.builtin.debug:
msg: hello
roles:
- testrole
```
```
$ cat testrole/tasks/main.yml
---
- ansible.builtin.command: /bin/true
notify: noop
- ansible.builtin.meta: flush_handlers
- ansible.builtin.command: /bin/true
```
```
$ cat testrole/handlers/main.yml
---
- name: noop
ansible.builtin.debug:
msg: world
```
### Expected Results
I expect the play to succeed and trigger the handler
```
$ ansible-playbook test.yml -l localhost
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
PLAY [localhost] ***************************************************************************************
TASK [Gathering Facts] *********************************************************************************
ok: [localhost]
TASK [ansible.builtin.command] *************************************************************************
changed: [localhost]
RUNNING HANDLER [do nothing] ***************************************************************************
ok: [localhost] => {
"msg": "hello"
}
TASK [testrole : ansible.builtin.command] **************************************************************
changed: [localhost]
TASK [testrole : ansible.builtin.meta] *****************************************************************
RUNNING HANDLER [testrole : noop] **********************************************************************
ok: [localhost] => {
"msg": "world"
}
TASK [testrole : ansible.builtin.command] **************************************************************
changed: [localhost]
PLAY RECAP *********************************************************************************************
localhost : ok=6 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
### Actual Results
```console
$ ansible-playbook test.yml -l localhost [WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
PLAY [localhost] ***************************************************************************************
TASK [Gathering Facts] *********************************************************************************
ok: [localhost]
TASK [ansible.builtin.command] *************************************************************************
changed: [localhost]
RUNNING HANDLER [do nothing] ***************************************************************************
ok: [localhost] => {
"msg": "hello"
}
TASK [testrole : ansible.builtin.command] **************************************************************
changed: [localhost]
TASK [testrole : ansible.builtin.meta] *****************************************************************
ERROR! BUG: There seems to be a mismatch between tasks in PlayIterator and HostStates.
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79023 | https://github.com/ansible/ansible/pull/79057 | f8f1c6a6b5d97df779ff4d427cebe41427533dd9 | e1daaae42af1a4e465edbdad4bb3c6dd7e7110d5 | 2022-10-04T15:45:20Z | python | 2022-10-06T13:26:49Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,021 | ["changelogs/fragments/79021-dont-squash-in-validate.yml", "lib/ansible/playbook/base.py", "lib/ansible/playbook/block.py", "lib/ansible/playbook/task.py", "test/integration/targets/keyword_inheritance/aliases", "test/integration/targets/keyword_inheritance/roles/whoami/tasks/main.yml", "test/integration/targets/keyword_inheritance/runme.sh", "test/integration/targets/keyword_inheritance/test.yml", "test/integration/targets/omit/75692.yml"] | become not applied on roles | ### Summary
Become is not applied on roles when playbook has `become: true` set.
### Issue Type
Bug Report
### Component Name
become
### Ansible Version
```console
$ ansible --version
ansible [core 2.14.0b2]
config file = /home/twouters/.ansible.cfg
configured module search path = ['/home/twouters/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/twouters/ansible-2.14/lib/python3.10/site-packages/ansible
ansible collection location = /home/twouters/.ansible/collections:/usr/share/ansible/collections
executable location = /home/twouters//ansible-2.14/bin/ansible
python version = 3.10.7 (main, Sep 6 2022, 21:22:27) [GCC 12.2.0] (/home/twouters/ansible-2.14/bin/python)
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Arch Linux and Debian but probably irrelevant
### Steps to Reproduce
```
$ tree -Ap
[drwx------] .
βββ [drwxr-xr-x] testrole
β βββ [drwxr-xr-x] tasks
β βββ [-rw-r--r--] main.yml
βββ [-rw-r--r--] test.yml
2 directories, 2 files
```
```
$ cat test.yml
---
- hosts: localhost
become: true
gather_facts: no
pre_tasks:
- ansible.builtin.command: whoami
register: whoami
- ansible.builtin.assert:
that: whoami.stdout == "root"
roles:
- testrole
```
```
$ cat testrole/tasks/main.yml
---
- ansible.builtin.command: whoami
register: whoami
- ansible.builtin.assert:
that: whoami.stdout == "root"
```
### Expected Results
All assertions pass and become is applied to all tasks
```
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
PLAY [localhost] ***************************************************************************************
TASK [ansible.builtin.command] *************************************************************************
changed: [localhost]
TASK [ansible.builtin.assert] **************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [testrole : ansible.builtin.command] **************************************************************
changed: [localhost]
TASK [testrole : ansible.builtin.assert] ***************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
PLAY RECAP *********************************************************************************************
localhost : ok=4 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
### Actual Results
```console
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
does not match 'all'
PLAY [localhost] ***************************************************************************************
TASK [ansible.builtin.command] *************************************************************************
changed: [localhost]
TASK [ansible.builtin.assert] **************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [testrole : ansible.builtin.command] **************************************************************
changed: [localhost]
TASK [testrole : ansible.builtin.assert] ***************************************************************
fatal: [localhost]: FAILED! => {
"assertion": "whoami.stdout == \"root\"",
"changed": false,
"evaluated_to": false,
"msg": "Assertion failed"
}
PLAY RECAP *********************************************************************************************
localhost : ok=3 changed=2 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79021 | https://github.com/ansible/ansible/pull/79049 | 11c1777d56664b1acb56b387a1ad6aeadef1391d | 420564c5bcf752a821ae0599c3bd01ffba40f3ea | 2022-10-04T14:40:56Z | python | 2022-10-06T13:55:56Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,006 | ["docs/docsite/rst/playbook_guide/playbooks_intro.rst", "docs/docsite/rst/playbook_guide/playbooks_loops.rst", "docs/docsite/rst/playbook_guide/playbooks_python_version.rst", "docs/docsite/rst/playbook_guide/playbooks_reuse.rst"] | Docs: Replace latin terms with english in the playbook_guide directory | ### Summary
Our [style guide](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#avoid-using-latin-phrases) notes that we should not use Latin terms (e.g, via, etc) in our documentation. This issue specifically asks to replace these with the noted English equivalents from that style guide table for all occurrences in the docs/docsite/rst/playbook_guide/ directory .
Use `grep -R -e 'etc\.' -e 'i\.e ' -e 'e\.g\. ' -e 'via ' -e 'vs\(\.\)\? ' -e versus ` in the docs/docsite/rst/playbook_guide/ directory to find these.
List of all effected files are in a follow-on comment.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/playbook_guide/index.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79006 | https://github.com/ansible/ansible/pull/79009 | 173ddde126da34f522f80009ceb8bb25b62a5c92 | f0cc70f9e1d4991957f3a55eb9ef1c5617e4cd2b | 2022-10-03T20:15:09Z | python | 2022-10-04T02:35:15Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,003 | ["docs/docsite/rst/os_guide/windows_faq.rst", "docs/docsite/rst/os_guide/windows_performance.rst", "docs/docsite/rst/os_guide/windows_usage.rst", "docs/docsite/rst/os_guide/windows_winrm.rst"] | Docs: Replace latin terms with english in the os_guide directory | ### Summary
Our [style guide](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#avoid-using-latin-phrases) notes that we should not use Latin terms (e.g, via, etc) in our documentation. This issue specifically asks to replace these with the noted English equivalents from that style guide table for all occurrences in the docs/docsite/rst/os_guide/ directory .
Use `grep -R -e 'etc\.' -e 'i\.e ' -e 'e\.g\. ' -e 'via ' -e 'vs\(\.\)\? ' -e versus ` in the docs/docsite/rst/os_guide/ directory to find these.
List of all effected files are in a follow-on comment.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/os_guide/index.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79003 | https://github.com/ansible/ansible/pull/79007 | 78c9fb415954ca630f028fe7a7d154658fc41422 | 55925958ea8ea48273c7ade660ceea0e9e24f348 | 2022-10-03T20:11:55Z | python | 2022-10-03T20:51:44Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,002 | ["docs/docsite/rst/scenario_guides/guide_azure.rst", "docs/docsite/rst/scenario_guides/guide_packet.rst", "docs/docsite/rst/scenario_guides/guide_rax.rst", "docs/docsite/rst/scenario_guides/guide_scaleway.rst"] | Docs: Replace Latin terms with English in the scenario_guides directory | ### Summary
Our [style guide](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#avoid-using-latin-phrases) notes that we should not use Latin terms (e.g, via, etc) in our documentation. This issue specifically asks to replace these with the noted English equivalents from that style guide table for all occurrences in the docs/docsite/rst/scenario_guides/ directory .
Use `grep -R -e 'etc\.' -e 'i\.e ' -e 'e\.g\. ' -e 'via ' -e 'vs\(\.\)\? ' -e versus ` in the docs/docsite/rst/scenario_guides/ directory to find these.
List of all effected files are in a follow-on comment.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/scenario_guides/index.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79002 | https://github.com/ansible/ansible/pull/79008 | 4d3c12ae9ead67aee1328dacded55d8cf8cad796 | 367cdae3b279a5281a56808827af27c8883a4ad4 | 2022-10-03T20:07:19Z | python | 2022-10-04T09:35:45Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 79,001 | ["docs/docsite/rst/reference_appendices/faq.rst", "docs/docsite/rst/reference_appendices/general_precedence.rst", "docs/docsite/rst/reference_appendices/glossary.rst", "docs/docsite/rst/reference_appendices/python_3_support.rst", "docs/docsite/rst/reference_appendices/special_variables.rst"] | Docs: Replace Latin terms in the reference_appendices/ directory with English terms | ### Summary
Our [style guide](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#avoid-using-latin-phrases) notes that we should not use Latin terms (e.g, via, etc) in our documentation. This issue specifically asks to replace these with the noted English equivalents from that style guide table for all occurrences in the docs/docsite/rst/porting_guides/ directory .
Use `grep -R -e 'etc\.' -e 'i\.e ' -e 'e\.g\. ' -e 'via ' -e 'vs\(\.\)\? ' -e versus ` in the docs/docsite/rst/porting_guides/ directory to find these.
List of all effected files are in a follow-on comment.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/index.rst
### Ansible Version
```console
$ ansible --version
none
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/79001 | https://github.com/ansible/ansible/pull/79010 | 8f4133b514f1b4c8b528771804b31ff47a4e0f84 | 4d3c12ae9ead67aee1328dacded55d8cf8cad796 | 2022-10-03T20:03:36Z | python | 2022-10-04T09:33:40Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,999 | ["docs/docsite/rst/network/getting_started/first_inventory.rst", "docs/docsite/rst/network/getting_started/index.rst", "docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst"] | Docs: replace Latin terms in network (not platform) files | ### Summary
Our [style guide](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#avoid-using-latin-phrases) notes that we should not use Latin terms (e.g, via, etc) in our documentation. This issue specifically asks to replace these with the noted English equivalents from that style guide table for all occurrences in the docs/docsite/rst/network/ directory that are not `platform*` files.
Use `grep -R -e 'etc\.' -e 'i\.e ' -e 'e\.g\. ' -e 'via ' -e 'vs\(\.\)\? ' -e versus --exclude=platform* ` in the docs/docsite/rst/network/ directory to find these.
List of all effected files are in a follow-on comment. NOTE: these are NOT the platform_* files i to limit the scope of the PR that fixes these.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/network/user_guide/index.rst
### Ansible Version
```console
$ ansible --version
none
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78999 | https://github.com/ansible/ansible/pull/79013 | f0cc70f9e1d4991957f3a55eb9ef1c5617e4cd2b | 8d665a1a8ef513913fe4d9cf5a2cd107991780a4 | 2022-10-03T19:49:08Z | python | 2022-10-04T08:47:24Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,988 | ["lib/ansible/modules/file.py"] | File module changes mode of src when state is link | ### Summary
The file module is supposed to only affect `dest:`, but in cases where `state: link` and a `mode:` is supplied, the mode of `src:` β if it exists β is changed.
One could argue whether documenting the current behavior is sufficient vs. whether it's better to "fix" the file module, but it isn't clear what "fix" would mean: (1) ignore `mode:` when `state: link`; (2) fail if `state: link` and a `mode:` is given if (a) `src:` does not exist and/or (b) mode of existing `src:` does not match `mode:`. There are plenty of wrong answers available.
### Issue Type
Documentation Report
### Component Name
file
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.6]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/utoddl/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/venv-python38-ansible-core-212/lib/python3.8/site-packages/ansible
ansible collection location = /home/utoddl/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/venv-python38-ansible-core-212/bin/ansible
python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
BECOME_PLUGIN_PATH(env: ANSIBLE_BECOME_PLUGINS) = ['/usr/share/ansible/plugins/become']
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = memory
DEFAULT_ACTION_PLUGIN_PATH(env: ANSIBLE_ACTION_PLUGINS) = ['/usr/share/ansible/plugins/action']
DEFAULT_CACHE_PLUGIN_PATH(env: ANSIBLE_CACHE_PLUGINS) = ['/usr/share/ansible/plugins/cache']
DEFAULT_CALLBACK_PLUGIN_PATH(env: ANSIBLE_CALLBACK_PLUGINS) = ['/usr/share/ansible/plugins/callback']
DEFAULT_CONNECTION_PLUGIN_PATH(env: ANSIBLE_CONNECTION_PLUGINS) = ['/usr/share/ansible/plugins/connection']
DEFAULT_FILTER_PLUGIN_PATH(env: ANSIBLE_FILTER_PLUGINS) = ['/usr/share/ansible/plugins/filter']
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 5
DEFAULT_GATHERING(env: ANSIBLE_GATHERING) = smart
DEFAULT_GATHER_SUBSET(env: ANSIBLE_GATHER_SUBSET) = ['!all', 'virtual', 'network']
DEFAULT_HOST_LIST(env: ANSIBLE_INVENTORY) = ['β¦']
DEFAULT_INVENTORY_PLUGIN_PATH(env: ANSIBLE_INVENTORY_PLUGINS) = ['/usr/share/ansible/plugins/inventory']
DEFAULT_LOG_PATH(env: ANSIBLE_LOG_PATH) = /var/log/ansible.log
DEFAULT_LOOKUP_PLUGIN_PATH(env: ANSIBLE_LOOKUP_PLUGINS) = ['/usr/share/ansible/plugins/lookup']
DEFAULT_POLL_INTERVAL(/etc/ansible/ansible.cfg) = 15
DEFAULT_STDOUT_CALLBACK(env: ANSIBLE_STDOUT_CALLBACK) = yaml
DEFAULT_STRATEGY_PLUGIN_PATH(env: ANSIBLE_STRATEGY_PLUGINS) = ['/usr/share/ansible/plugins/strategy']
DEFAULT_TERMINAL_PLUGIN_PATH(env: ANSIBLE_TERMINAL_PLUGINS) = ['/usr/share/ansible/plugins/terminal']
DEFAULT_TEST_PLUGIN_PATH(env: ANSIBLE_TEST_PLUGINS) = ['/usr/share/ansible/plugins/test']
DEFAULT_TIMEOUT(env: ANSIBLE_TIMEOUT) = 30
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = smart
DEFAULT_VARS_PLUGIN_PATH(env: ANSIBLE_VARS_PLUGINS) = ['/usr/share/ansible/plugins/vars']
DEFAULT_VAULT_IDENTITY(env: ANSIBLE_VAULT_IDENTITY) = mw
DEFAULT_VAULT_IDENTITY_LIST(env: ANSIBLE_VAULT_IDENTITY_LIST) = [β¦]
DISPLAY_SKIPPED_HOSTS(env: ANSIBLE_DISPLAY_SKIPPED_HOSTS) = True
HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False
INTERPRETER_PYTHON(env: ANSIBLE_PYTHON_INTERPRETER) = auto
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
TRANSFORM_INVALID_GROUP_CHARS(env: ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS) = silently
BECOME:
======
CACHE:
=====
CALLBACK:
========
default:
_______
display_skipped_hosts(env: ANSIBLE_DISPLAY_SKIPPED_HOSTS) = True
CLICONF:
=======
CONNECTION:
==========
paramiko_ssh:
____________
host_key_checking(env: ANSIBLE_HOST_KEY_CHECKING) = False
ssh:
___
host_key_checking(env: ANSIBLE_HOST_KEY_CHECKING) = False
pipelining(env: ANSIBLE_SSH_PIPELINING) = False
timeout(env: ANSIBLE_TIMEOUT) = 30
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
sh:
__
remote_tmp(/etc/ansible/ansible.cfg) = /tmp/${USER}/.ansible/tmp
VARS:
====
```
### OS / Environment
Red Hat Enterprise Linux release 8.6 (Ootpa)
### Additional Information
Without this change, users may reasonably expect symbolic links themselves to have the specified mode β for example 0777 or -rwxrwxrwx β when in fact the target of the link (i.e. `src:`) will become world-writable / clobberable.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78988 | https://github.com/ansible/ansible/pull/79182 | bcdc2286e853240372b241fd2a178c66f3bc494c | 465480f755b7f4bad72090bbb350c1bd993505ae | 2022-10-03T14:53:03Z | python | 2022-10-24T12:13:52Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,976 | ["docs/docsite/rst/dev_guide/developing_collections_distributing.rst"] | Docs: Add code-block wrappers to code examples in developing_collections_distributing.rst | ### This issue has been assigned to doczkal
### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In theΒ `developing_collections_distributing.rst `Β file in the Developer Guide (`docs/docsite/rst/dev_guide`), there is one instance where a lead-in sentence ends withΒ `::`. Use the followingΒ `grep`Β command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep developing_collections_distributing.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/developing_collections_distributing.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78976 | https://github.com/ansible/ansible/pull/78977 | 9afb37eda605d79348a19d49cd0a615a6691aa3a | 1b922b42dd5e18aeff789f2ee6fcb0a43485ac12 | 2022-10-01T15:34:34Z | python | 2022-10-03T08:45:44Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,971 | ["docs/docsite/rst/dev_guide/module_lifecycle.rst"] | Docs: Add code-block wrappers to code examples in module_lifecycle.rst | ### Issue has been assigned to IMvision12
### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In theΒ `module_lifecycle.rst `Β file in the Developer Guide (`docs/docsite/rst/dev_guide`), there is one instance where a lead-in sentence ends withΒ `::`. Use the followingΒ `grep`Β command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep module_lifecycle.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/module_lifecycle.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78971 | https://github.com/ansible/ansible/pull/78974 | 3dc0c2135ed451e7fe0839740ad539b73ee4bdc9 | 93c2cb2b8e1df8a5e31c2119f4c13bc8f97ed775 | 2022-10-01T14:14:22Z | python | 2022-10-01T15:37:57Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,967 | ["docs/docsite/rst/dev_guide/style_guide/basic_rules.rst", "docs/docsite/rst/dev_guide/style_guide/index.rst"] | Docs: Add code-block wrappers to code examples in style_guide | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `/style_guide` directory in the Developer Guide (`docs/docsite/rst/dev_guide`), there are 2 instances where files contain lead-in sentences ending with `::`.
```
docs/docsite/rst/dev-guide/style_guide/index.rst
docs/docsite/rst/dev-guide//style_guide/basic_rules.rst
```
Use the following `grep` command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" .
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/style_guide/index.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78967 | https://github.com/ansible/ansible/pull/78970 | 446406a0c844c365fb12fbf03579ee286847d964 | 3dc0c2135ed451e7fe0839740ad539b73ee4bdc9 | 2022-10-01T13:22:19Z | python | 2022-10-01T15:11:07Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,965 | ["docs/docsite/rst/dev_guide/testing/sanity/ignores.rst"] | Docs: Add code-block wrappers to code examples in ignores.rst. | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `ignores.rst ` file in the Developer Guide (`docs/docsite/rst/dev_guide/testing/sanity/`), there are 2 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep ignores.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev_guide/testing/sanity/ignores.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78965 | https://github.com/ansible/ansible/pull/78979 | 93c2cb2b8e1df8a5e31c2119f4c13bc8f97ed775 | 9afb37eda605d79348a19d49cd0a615a6691aa3a | 2022-10-01T13:02:34Z | python | 2022-10-01T18:40:28Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,964 | ["docs/docsite/rst/dev_guide/developing_modules_general_windows.rst"] | Docs: Add code-block wrappers to code examples: developing_modules_general_windows.rst. | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `developing_modules_general_windows.rst ` file in the Developer Guide (`docs/docsite/rst/dev_guide`), there are 2 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep developing_modules_general_windows.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/developing_modules_general_windows.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78964 | https://github.com/ansible/ansible/pull/78985 | 1b922b42dd5e18aeff789f2ee6fcb0a43485ac12 | 56c48d1c4507754be9bb1b557ed6681306492180 | 2022-10-01T12:47:13Z | python | 2022-10-03T08:51:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,963 | ["docs/docsite/rst/dev_guide/testing.rst"] | Docs: Add code-block wrappers to code examples: testing.rst. | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `testing.rst ` file in the Developer Guide (`docs/docsite/rst/dev_guide`), there are 2 instances of lead-in sentences ending with `::`. Use the following `grep` command to identify the files and line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep testing.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/testing.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78963 | https://github.com/ansible/ansible/pull/78969 | 1db75a41bff0eedc0fafaaef0180b1c7c6912b2a | 446406a0c844c365fb12fbf03579ee286847d964 | 2022-10-01T12:42:23Z | python | 2022-10-01T14:59:43Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,962 | ["docs/docsite/rst/dev_guide/testing_pep8.rst"] | Docs: Add code-block wrappers to code examples: testing_pep8.rst | ### This issue has a PR
### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In theΒ `testing_pep8.rst `Β file in the Developer Guide (`docs/docsite/rst/dev_guide`), there is one instance where a lead-in sentence ends withΒ `::`. Use the followingΒ grepΒ command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep testing_pep8.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/testing_pep8.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78962 | https://github.com/ansible/ansible/pull/78972 | 538b99781f81b87ff2cd18ee6eae1db49a29c37a | 01484cdc68e2c8634bab5d8ffc2043e8d7471ee6 | 2022-10-01T12:34:29Z | python | 2022-10-01T14:37:40Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,961 | ["docs/docsite/rst/dev_guide/developing_module_utilities.rst"] | Docs: Add code-block wrappers to code examples: developing_module_utilities.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In theΒ `developing_module_utilities.rst `Β file in the Developer Guide (docs/docsite/rst/dev_guide), there is one instance where a lead-in sentence ends withΒ `::`.
Use the followingΒ grepΒ command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep developing_module_utilities.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev-guide/developing_module_utilities.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78961 | https://github.com/ansible/ansible/pull/78968 | 01484cdc68e2c8634bab5d8ffc2043e8d7471ee6 | 1db75a41bff0eedc0fafaaef0180b1c7c6912b2a | 2022-10-01T12:28:30Z | python | 2022-10-01T14:51:02Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,960 | ["docs/docsite/rst/dev_guide/testing_documentation.rst"] | Docs: Add code-block wrappers to code examples: testing_documentation.rst | ### Summary
**Problem**:
Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`.
Translation programs then attempt to translate this code, which we don't want.
**Solution:**
Enclose code in a `.. code-block:: <lexer>` element, so that translation processes know to skip this content.
For a list of allowed values for _`<lexer>`_ , refer to [Syntax highlighting - Pygments](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#syntax-highlighting-pygments).
**Scope:**
In the `testing_documentation.rst` file in the Developer Guide (`docs/docsite/rst/dev_guide`), there is 1 instance where a lead-in sentence ends with `::`. Use the following `grep` command to identify the line numbers:
```
$ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . | grep testing_documentation.rst
```
**Example:**
Before:
```
Before running ``ansible-playbook``, run the following command to enable logging::
export ANSIBLE_LOG_PATH=~/ansible.log
```
After:
```
Before running ``ansible-playbook``, run the following command to enable logging:
.. code-block:: shell
export ANSIBLE_LOG_PATH=~/ansible.log
```
This problem has been addressed in some other guides; view these merged PRs to help get you started:
- Network Guide: [#75850](https://github.com/ansible/ansible/pull/75850/files)
- Developer Guide: [#75849](https://github.com/ansible/ansible/pull/75849/files)
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev_guide/testing_documentation.rst
### Ansible Version
```console
n/a
```
### Configuration
```console
n/a
```
### OS / Environment
n/a
### Additional Information
When example code is enclosed within a code-block element, translation programs do not attempt to translate the code.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78960 | https://github.com/ansible/ansible/pull/78966 | 5b239acb77cc72758c87eb322d7766fd2b621fbb | 538b99781f81b87ff2cd18ee6eae1db49a29c37a | 2022-10-01T12:07:13Z | python | 2022-10-01T13:37:42Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,932 | ["changelogs/fragments/79017-ansible-vault-string-encryption-ending-with-newline.yml", "lib/ansible/cli/vault.py"] | ansible-vault encrypt_string output is missing a new line, causing broken output on copy | ### Summary
```
$ ansible-vault encrypt_string secret
Encryption successful
!vault |
$ANSIBLE_VAULT;1.1;AES256
61633966613365393435663962393261376338336136313065376437373838636336623565363239
6630383564363634636364613830613561316333623739380a653764333864666363663539363363
65316331636165353761626461386166633330623835316362393361343333396234663638653666
3163373561623331340a633161373437343563333135343933376634643638613332643964313135
3430%
```
If you look at the end of the printed data, it contains a `%`, which is a character that is added by the terminal in order to inform user that the executed command did not end-up with a newline.
Now you can easily guess that when user will copy/paste that yaml block, their will have a surprise, as decoding will not work,.... because of the extra `%` at the end.
This bug can easily be avoided by ensuring that we add a newline at the end of the dumped data, as this will not affect the validity of the dumped YAML, but will avoid having the terminal add the `%` character at the end of the last line, a character which will render the entire block invalid for decryption.
### Issue Type
Bug Report
### Component Name
encrypt
### Ansible Version
```console
$ ansible --version
ansible [core 2.14.0b1]
config file = /Users/ssbarnea/.ansible.cfg
configured module search path = ['/Users/ssbarnea/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/ssbarnea/.pyenv/versions/3.11-dev/lib/python3.11/site-packages/ansible
ansible collection location = /Users/ssbarnea/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/ssbarnea/.pyenv/versions/3.11-dev/bin/ansible
python version = 3.11.0rc2+ (heads/3.11:8e2bda8227, Sep 19 2022, 10:59:25) [Clang 14.0.0 (clang-1400.0.29.102)] (/Users/ssbarnea/.pyenv/versions/3.11-dev/bin/python3.11)
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
-
```
### OS / Environment
MacOS
### Steps to Reproduce
Just configure a ANSIBLE_VAULT_PASSWORD_FILE=.vault_pass and put a password inside the vault file, so you can easily encrypt and decypt.
Try to encrypt a secret like `ansible-vault encrypt_string secret`, select the output and paste it inside a playbook for use.
### Expected Results
Be able to copy/paste the output and be able to use it.
### Actual Results
```console
Vault format unhexlify error: Odd-length string
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78932 | https://github.com/ansible/ansible/pull/79017 | 56285b1d2bd6dd4ae8ec63fcabcbdba76c4a1cf5 | b5db71e3189418738785ab82509b97f9bc82d6d6 | 2022-09-29T20:34:10Z | python | 2022-10-04T15:05:37Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,925 | ["docs/docsite/rst/community/collection_contributors/collection_integration_about.rst", "docs/docsite/rst/community/collection_contributors/collection_integration_add.rst", "docs/docsite/rst/community/collection_contributors/collection_integration_updating.rst", "docs/docsite/rst/dev_guide/developing_modules_general_windows.rst", "docs/docsite/rst/plugins/inventory.rst", "docs/docsite/rst/tips_tricks/sample_setup.rst"] | Docs: various files - replace boolean yes/no with true/false | ### Summary
Based on the [steering committee vote to use true/false for booleans,](https://github.com/ansible-community/community-topics/discussions/120) we are going through the guides to adapt to this change.
This issue requests these changes to the files listed in a followon comment.
Changes are: change `yes` to `true` and `no` to `false`
must be lowercase. Please open one PR to handle these changes. It should impact 6 files. NOTE - ansibot does not like PRs over 50 files.
The following grep was used to create the list.
`grep -R '\: \(yes\|no\)$' --exclude-dir=locales`
NOTE: there are multiple issues open to change these booleans so please limit your changes to the list below so we do not have clashing PRs.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev_guide/developing_modules_general_windows.rstt
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78925 | https://github.com/ansible/ansible/pull/78980 | 6d0aeac1e166842f2833f4fb64c727cc7f818118 | 56285b1d2bd6dd4ae8ec63fcabcbdba76c4a1cf5 | 2022-09-29T14:38:19Z | python | 2022-10-04T14:29:26Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,924 | ["docs/docsite/rst/reference_appendices/YAMLSyntax.rst", "docs/docsite/rst/reference_appendices/faq.rst", "docs/docsite/rst/reference_appendices/general_precedence.rst", "docs/docsite/rst/reference_appendices/test_strategies.rst"] | Docs: reference_appendices: replace boolean yes/no with true/false | ### Summary
Based on the [steering committee vote to use true/false for booleans,](https://github.com/ansible-community/community-topics/discussions/120) we are going through the guides to adapt to this change.
This issue requests these changes in the `docs/docsite/rst/reference_appendices/` files.
Changes are: change `yes` to `true` and `no` to `false`
must be lowercase. Please open one PR to handle thse changes. It should impact 7 files. NOTE - ansibot does not like PRs over 50 files.
The following grep will help you find these occurrences from the `docs/docsite/rst/reference_appendices/` directory:
`grep -R '\: \(yes\|no\)$' --exclude-dir=locales`
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/faq.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
no
```
### OS / Environment
no
### Additional Information
no
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78924 | https://github.com/ansible/ansible/pull/78950 | fbd98cd8246e8554269b2c766db2b2228cc30bd9 | 78c9fb415954ca630f028fe7a7d154658fc41422 | 2022-09-29T14:27:08Z | python | 2022-10-03T20:49:43Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,922 | ["docs/docsite/rst/scenario_guides/guide_aci.rst", "docs/docsite/rst/scenario_guides/guide_azure.rst", "docs/docsite/rst/scenario_guides/guide_gce.rst", "docs/docsite/rst/scenario_guides/guide_rax.rst", "docs/docsite/rst/scenario_guides/guide_scaleway.rst"] | Docs: scenario guides: Replace yes/no booleans with true/false | ### Summary
Based on the [steering committee vote to use true/false for booleans,](https://github.com/ansible-community/community-topics/discussions/120) we are going through the guides to adapt to this change.
This issue requests these changes in the `docs/docsite/rst/scenario_guides/` files.
Changes are: change `yes` to `true` and `no` to `false`
must be lowercase. Please open one PR to handle these changes. It should impact 16 files. NOTE - ansibot does not like PRs over 50 files.
The following grep will help you find these occurrences from the `docs/docsite/rst/scenario_guides/` directory:
`grep -R '\: \(yes\|no\)$' --exclude-dir=locales`
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/scenario_guides/index.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78922 | https://github.com/ansible/ansible/pull/78934 | 5137cb16e915bd8d0a06bdc659cbc0f65ea9a6b2 | 5b333c9665182e20c2dfbed64006ced12e897ccb | 2022-09-29T14:10:23Z | python | 2022-10-03T20:40:12Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,914 | ["docs/docsite/rst/porting_guides/porting_guide_5.rst"] | Docs: Replace occurrences of "See http://" with a descriptive label in porting guides | ### Summary
Accessibility guidelines recommend we do not use "See http://<website>" in documentation, but instead provide context around this for screen readers etc.
In this issue, we've identified 4 files that use this convention in the porting guides. For each occurrence, replace it with an RST link to [external web page](https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#links-to-external-web-pages) .
Specifically, use the format \`descriptive phrase \<url\>\`_
List of affected RST pages are in a follow-on comment. You can choose to fix one at a time, using the Edit on GitHub link at the top of the RST page, or in one PR to fix them both.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/porting_guides/porting_guide_5.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78914 | https://github.com/ansible/ansible/pull/78954 | ba3264253859b95d621727259615546c0927ca63 | 5137cb16e915bd8d0a06bdc659cbc0f65ea9a6b2 | 2022-09-28T19:49:43Z | python | 2022-10-03T20:35:06Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,912 | ["changelogs/fragments/78913-template-missing-filter-test.yml", "lib/ansible/template/__init__.py", "test/integration/targets/templating/tasks/main.yml", "test/integration/targets/templating/templates/invalid_test_name.j2"] | Change to filter/test plugin loading / templating breaks certain playbook constructs | ### Summary
When referencing to the test `==`, ansible-core crashes with a very unhelpful error:
```
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: line 0
```
Passing `-vvv` gives a better hint: `KeyError: 'invalid plugin name: ansible.builtin.=='`. (See below for the full stacktrace.)
git bisect exposed 4260b71cc77b7a44e061668d0d408d847f550156 as the culprit.
### Issue Type
Bug Report
### Component Name
filter/test plugin loading
### Ansible Version
```console
devel
```
### Configuration
```console
-
```
### OS / Environment
-
### Steps to Reproduce
```
ansible -vvv localhost -m debug -a 'msg={{ [1] | selectattr("failed", "==", true) }}'
```
### Expected Results
Some error like
```
localhost | FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'int object' has no attribute 'failed'. 'int object' has no attribute 'failed'"
}
```
### Actual Results
```console
The full traceback is:
Traceback (most recent call last):
File "/path/to/ansible/lib/ansible/template/__init__.py", line 438, in __getitem__
plugin = self._pluginloader.get(key)
File "/path/to/ansible/lib/ansible/plugins/loader.py", line 830, in get
return self.get_with_context(name, *args, **kwargs).object
File "/path/to/ansible/lib/ansible/plugins/loader.py", line 1131, in get_with_context
raise KeyError('invalid plugin name: {0}'.format(key))
KeyError: 'invalid plugin name: ansible.builtin.=='
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/path/to/ansible/lib/ansible/executor/task_executor.py", line 525, in _execute
self._task.post_validate(templar=templar)
File "/path/to/ansible/lib/ansible/playbook/task.py", line 291, in post_validate
super(Task, self).post_validate(templar)
File "/path/to/ansible/lib/ansible/playbook/base.py", line 525, in post_validate
value = templar.template(getattr(self, name))
File "/path/to/ansible/lib/ansible/template/__init__.py", line 755, in template
d[k] = self.template(
File "/path/to/ansible/lib/ansible/template/__init__.py", line 729, in template
result = self.do_template(
File "/path/to/ansible/lib/ansible/template/__init__.py", line 992, in do_template
res = self.environment.concat(rf)
File "/path/to/ansible/lib/ansible/template/native_helpers.py", line 44, in ansible_eval_concat
head = list(islice(nodes, 2))
File "<template>", line 17, in root
File "/path/to/ansible/lib/ansible/template/__init__.py", line 264, in wrapper
return list(ret)
File "/usr/lib/python3.10/site-packages/jinja2/filters.py", line 1765, in select_or_reject
if func(item):
File "/usr/lib/python3.10/site-packages/jinja2/filters.py", line 1750, in <lambda>
return lambda item: modfunc(func(transfunc(item)))
File "/usr/lib/python3.10/site-packages/jinja2/filters.py", line 1745, in func
return context.environment.call_test(name, item, args, kwargs)
File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 589, in call_test
return self._filter_test_common(
File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 510, in _filter_test_common
func = env_map.get(name) # type: ignore
File "/usr/lib/python3.10/_collections_abc.py", line 819, in get
return self[key]
File "/path/to/ansible/lib/ansible/template/__init__.py", line 440, in __getitem__
raise TemplateSyntaxError('Could not load "%s": %s' % (key, to_native(e)), 0)
jinja2.exceptions.TemplateSyntaxError: Could not load "==": 'invalid plugin name: ansible.builtin.=='
line 0
localhost | FAILED! => {
"changed": false
}
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78912 | https://github.com/ansible/ansible/pull/78913 | 367cdae3b279a5281a56808827af27c8883a4ad4 | 6d0aeac1e166842f2833f4fb64c727cc7f818118 | 2022-09-28T18:53:10Z | python | 2022-10-04T13:44:00Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,899 | ["docs/docsite/rst/dev_guide/developing_module_utilities.rst", "docs/docsite/rst/dev_guide/testing/sanity/mypy.rst", "docs/docsite/rst/dev_guide/testing_validate-modules.rst", "docs/docsite/rst/playbook_guide/playbooks_filters.rst"] | Docs: Replace occurrences of "See http://" with a descriptive label in 4 files | ### Summary
Accessibility guidelines recommend we do not use "See http://<website>" in documentation, but instead provide context around this for screen readers etc.
In this issue, we've identified 4 files that use this convention in the documentation. For each occurrence, replace it with an RST link to [external web page](https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#links-to-external-web-pages) .
Specifically, use the format \`descriptive phrase \<url\>\`_
List of affected RST pages are in a follow-on comment. You can choose to fix one at a time, using the Edit on GitHub link at the top of the RST page, or in one PR to fix them both.
### Issue Type
Documentation Report
### Component Name
rst/dev_guide/testing/sanity/mypy.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78899 | https://github.com/ansible/ansible/pull/78959 | fb8c2daf46d3a9293ee9ea6555279aca0fb62b9a | f7c01bc866b1e531f0eacc57ab98294b4745a221 | 2022-09-27T20:47:03Z | python | 2022-10-03T19:01:27Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,882 | ["changelogs/fragments/ansible-test-pylint-2.15.5.yml", "test/lib/ansible_test/_data/requirements/sanity.pylint.in", "test/lib/ansible_test/_data/requirements/sanity.pylint.txt"] | pylint sanity test crashes for vmware.vmware_rest | ### Summary
The pylint sanity test crashes for vmware.vmware_rest. The error can be seen in https://3d7932ae3c3d1cd1ac23-1794bc1134f138a3d06a8b52731b06da.ssl.cf1.rackcdn.com/357/83be7ae7fe3768158f0cdfee3198013dcbfd4d69/check/ansible-test-sanity-docker-devel/c998f25/job-output.txt. This has been the case since 4d25233ece21c545254149ffe78291c734076609 was merged; before this commit the test passed, with that commit it no longer does.
Reported by @mariolenz
### Issue Type
Bug Report
### Component Name
ansible-test pylint sanity test
### Ansible Version
```console
devel
```
### Configuration
```console
-
```
### OS / Environment
-
### Steps to Reproduce
Install ansible-core from devel branch, and run `ansible-test sanity --docker -v --test pylint` in a checkout of https://github.com/ansible-collections/vmware.vmware_rest
### Expected Results
Sanity tests pass (or at least do not crash).
### Actual Results
```console
2022-09-26 16:13:26.168048 | controller | Checking 12 file(s) in context "collection" with config: /root/ansible/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg
2022-09-26 16:13:26.168224 | controller | Run command: /root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/bin/python -m pylint --jobs 0 --reports n --max-line-length 160 --max-complexity 20 --rcfile /root/ansible/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg --output-format json --load-plugins deprecated,pylint.extensions.mccabe,string_format,unwanted manual/source/conf.py plugins/doc_fragments/__init__.py plugins/doc_fragments/moid.py plugins/lookup/cluster_moid.py plugins/lookup/datacenter_moid.py plugins/lookup/datastore_moid.py plugins/lookup/folder_moid.py plugins/lookup/host_moid.py plugins/lookup/network_moid.py plugins/lookup/resource_pool_moid.py plugins/lookup/vm_moid.py plugins/plugin_utils/lookup.py --collection-name vmware.vmware_rest --collection-version 2.2.1-dev2
2022-09-26 16:13:26.540327 | controller | FATAL: Command "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/bin/python -m pylint --jobs 0 --reports n --max-line-length 160 --max-complexity 20 --rcfile /root/ansible/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg --output-format json --load-plugins deprecated,pylint.extensions.mccabe,string_format,unwanted manual/source/conf.py plugins/doc_fragments/__init__.py plugins/doc_fragments/moid.py plugins/lookup/cluster_moid.py plugins/lookup/datacenter_moid.py plugins/lookup/datastore_moid.py plugins/lookup/folder_moid.py plugins/lookup/host_moid.py plugins/lookup/network_moid.py plugins/lookup/resource_pool_moid.py plugins/lookup/vm_moid.py plugins/plugin_utils/lookup.py --collection-name vmware.vmware_rest --collection-version 2.2.1-dev2" returned exit status 1.
2022-09-26 16:13:26.540374 | controller | >>> Standard Error
2022-09-26 16:13:26.540384 | controller | Traceback (most recent call last):
2022-09-26 16:13:26.540392 | controller | File "<frozen runpy>", line 198, in _run_module_as_main
2022-09-26 16:13:26.540399 | controller | File "<frozen runpy>", line 88, in _run_code
2022-09-26 16:13:26.540407 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/pylint/__main__.py", line 10, in <module>
2022-09-26 16:13:26.540414 | controller | pylint.run_pylint()
2022-09-26 16:13:26.540421 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/pylint/__init__.py", line 35, in run_pylint
2022-09-26 16:13:26.540428 | controller | PylintRun(argv or sys.argv[1:])
2022-09-26 16:13:26.540474 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/pylint/lint/run.py", line 207, in __init__
2022-09-26 16:13:26.540481 | controller | linter.check(args)
2022-09-26 16:13:26.540488 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 666, in check
2022-09-26 16:13:26.540495 | controller | check_parallel(
2022-09-26 16:13:26.540502 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/pylint/lint/parallel.py", line 141, in check_parallel
2022-09-26 16:13:26.540510 | controller | jobs, initializer=initializer, initargs=[dill.dumps(linter)]
2022-09-26 16:13:26.540518 | controller | ^^^^^^^^^^^^^^^^^^
2022-09-26 16:13:26.540525 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 364, in dumps
2022-09-26 16:13:26.540532 | controller | dump(obj, file, protocol, byref, fmode, recurse, **kwds)#, strictio)
2022-09-26 16:13:26.540539 | controller | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-26 16:13:26.540546 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 336, in dump
2022-09-26 16:13:26.540553 | controller | Pickler(file, protocol, **_kwds).dump(obj)
2022-09-26 16:13:26.540560 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 620, in dump
2022-09-26 16:13:26.540576 | controller | StockPickler.dump(self, obj)
2022-09-26 16:13:26.540584 | controller | File "/usr/lib/python3.11/pickle.py", line 487, in dump
2022-09-26 16:13:26.540591 | controller | self.save(obj)
2022-09-26 16:13:26.540598 | controller | File "/usr/lib/python3.11/pickle.py", line 603, in save
2022-09-26 16:13:26.540605 | controller | self.save_reduce(obj=obj, *rv)
2022-09-26 16:13:26.540612 | controller | File "/usr/lib/python3.11/pickle.py", line 717, in save_reduce
2022-09-26 16:13:26.540618 | controller | save(state)
2022-09-26 16:13:26.540625 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.540632 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.540638 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.540645 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1251, in save_module_dict
2022-09-26 16:13:26.540652 | controller | StockPickler.save_dict(pickler, obj)
2022-09-26 16:13:26.540659 | controller | File "/usr/lib/python3.11/pickle.py", line 972, in save_dict
2022-09-26 16:13:26.540665 | controller | self._batch_setitems(obj.items())
2022-09-26 16:13:26.540672 | controller | File "/usr/lib/python3.11/pickle.py", line 998, in _batch_setitems
2022-09-26 16:13:26.540679 | controller | save(v)
2022-09-26 16:13:26.540686 | controller | File "/usr/lib/python3.11/pickle.py", line 603, in save
2022-09-26 16:13:26.540693 | controller | self.save_reduce(obj=obj, *rv)
2022-09-26 16:13:26.540700 | controller | File "/usr/lib/python3.11/pickle.py", line 717, in save_reduce
2022-09-26 16:13:26.540707 | controller | save(state)
2022-09-26 16:13:26.540713 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.540720 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.540727 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.540734 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1251, in save_module_dict
2022-09-26 16:13:26.540740 | controller | StockPickler.save_dict(pickler, obj)
2022-09-26 16:13:26.540753 | controller | File "/usr/lib/python3.11/pickle.py", line 972, in save_dict
2022-09-26 16:13:26.540760 | controller | self._batch_setitems(obj.items())
2022-09-26 16:13:26.540767 | controller | File "/usr/lib/python3.11/pickle.py", line 998, in _batch_setitems
2022-09-26 16:13:26.540774 | controller | save(v)
2022-09-26 16:13:26.540780 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.540787 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.540794 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.540801 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1251, in save_module_dict
2022-09-26 16:13:26.540807 | controller | StockPickler.save_dict(pickler, obj)
2022-09-26 16:13:26.540814 | controller | File "/usr/lib/python3.11/pickle.py", line 972, in save_dict
2022-09-26 16:13:26.540821 | controller | self._batch_setitems(obj.items())
2022-09-26 16:13:26.540828 | controller | File "/usr/lib/python3.11/pickle.py", line 998, in _batch_setitems
2022-09-26 16:13:26.540834 | controller | save(v)
2022-09-26 16:13:26.540841 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.540848 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.540854 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.540861 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1251, in save_module_dict
2022-09-26 16:13:26.540868 | controller | StockPickler.save_dict(pickler, obj)
2022-09-26 16:13:26.540875 | controller | File "/usr/lib/python3.11/pickle.py", line 972, in save_dict
2022-09-26 16:13:26.540882 | controller | self._batch_setitems(obj.items())
2022-09-26 16:13:26.540889 | controller | File "/usr/lib/python3.11/pickle.py", line 1003, in _batch_setitems
2022-09-26 16:13:26.540895 | controller | save(v)
2022-09-26 16:13:26.540902 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.540909 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.540915 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.540922 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1963, in save_function
2022-09-26 16:13:26.540932 | controller | _save_with_postproc(pickler, (_create_function, (
2022-09-26 16:13:26.540939 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1140, in _save_with_postproc
2022-09-26 16:13:26.540946 | controller | pickler.save_reduce(*reduction, obj=obj)
2022-09-26 16:13:26.540958 | controller | File "/usr/lib/python3.11/pickle.py", line 692, in save_reduce
2022-09-26 16:13:26.540965 | controller | save(args)
2022-09-26 16:13:26.540972 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.540979 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.540985 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.540992 | controller | File "/usr/lib/python3.11/pickle.py", line 902, in save_tuple
2022-09-26 16:13:26.540999 | controller | save(element)
2022-09-26 16:13:26.541005 | controller | File "/usr/lib/python3.11/pickle.py", line 560, in save
2022-09-26 16:13:26.541012 | controller | f(self, obj) # Call unbound method with explicit self
2022-09-26 16:13:26.541019 | controller | ^^^^^^^^^^^^
2022-09-26 16:13:26.541025 | controller | File "/root/.ansible/test/venv/sanity.pylint/3.11/9aabe968/lib/python3.11/site-packages/dill/_dill.py", line 1187, in save_code
2022-09-26 16:13:26.541032 | controller | obj.co_firstlineno, obj.co_lnotab, obj.co_endlinetable,
2022-09-26 16:13:26.541039 | controller | ^^^^^^^^^^^^^^^^^^^
2022-09-26 16:13:26.541046 | controller | AttributeError: 'code' object has no attribute 'co_endlinetable'. Did you mean: 'co_linetable'?[0m
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78882 | https://github.com/ansible/ansible/pull/79194 | a76bbb18a5a80cda0d9683677aa8d5cd8a2e6093 | 645b6b858151a67eddcb63a6b5f726072271e6d9 | 2022-09-26T16:51:14Z | python | 2022-10-24T22:29:20Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,822 | ["changelogs/fragments/78821-78822-remove-callback_whitelist.yml", "lib/ansible/config/base.yml"] | Remove deprecated CALLBACKS_ENABLED.ini.0 | ### Summary
The config option `CALLBACKS_ENABLED.ini.0` should be removed from `lib/ansible/config/base.yml`. It was scheduled for removal in 2.15.
### Issue Type
Bug Report
### Component Name
`lib/ansible/config/base.yml`
### Ansible Version
2.15
### Configuration
N/A
### OS / Environment
N/A
### Steps to Reproduce
N/A
### Expected Results
N/A
### Actual Results
N/A | https://github.com/ansible/ansible/issues/78822 | https://github.com/ansible/ansible/pull/78830 | 76b746655a36807fa9198064ca9fe7c6cc00083a | d514aeb2a1fdf7ac966dbd58445d273fc579106c | 2022-09-20T17:07:13Z | python | 2022-09-21T20:08:53Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,821 | ["changelogs/fragments/78821-78822-remove-callback_whitelist.yml", "lib/ansible/config/base.yml"] | Remove deprecated CALLBACKS_ENABLED.env.0 | ### Summary
The config option `CALLBACKS_ENABLED.env.0` should be removed from `lib/ansible/config/base.yml`. It was scheduled for removal in 2.15.
### Issue Type
Bug Report
### Component Name
`lib/ansible/config/base.yml`
### Ansible Version
2.15
### Configuration
N/A
### OS / Environment
N/A
### Steps to Reproduce
N/A
### Expected Results
N/A
### Actual Results
N/A | https://github.com/ansible/ansible/issues/78821 | https://github.com/ansible/ansible/pull/78830 | 76b746655a36807fa9198064ca9fe7c6cc00083a | d514aeb2a1fdf7ac966dbd58445d273fc579106c | 2022-09-20T17:07:12Z | python | 2022-09-21T20:08:53Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,820 | ["changelogs/fragments/78819-78820-remove-deprecated-cow-options.yml", "lib/ansible/config/base.yml"] | Remove deprecated ANSIBLE_COW_ACCEPTLIST.ini.0 | ### Summary
The config option `ANSIBLE_COW_ACCEPTLIST.ini.0` should be removed from `lib/ansible/config/base.yml`. It was scheduled for removal in 2.15.
### Issue Type
Bug Report
### Component Name
`lib/ansible/config/base.yml`
### Ansible Version
2.15
### Configuration
N/A
### OS / Environment
N/A
### Steps to Reproduce
N/A
### Expected Results
N/A
### Actual Results
N/A | https://github.com/ansible/ansible/issues/78820 | https://github.com/ansible/ansible/pull/78831 | d514aeb2a1fdf7ac966dbd58445d273fc579106c | 228d25a321f3166cf73d14a929689774ce33fb51 | 2022-09-20T17:07:10Z | python | 2022-09-21T20:09:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,819 | ["changelogs/fragments/78819-78820-remove-deprecated-cow-options.yml", "lib/ansible/config/base.yml"] | Remove deprecated ANSIBLE_COW_ACCEPTLIST.env.0 | ### Summary
The config option `ANSIBLE_COW_ACCEPTLIST.env.0` should be removed from `lib/ansible/config/base.yml`. It was scheduled for removal in 2.15.
### Issue Type
Bug Report
### Component Name
`lib/ansible/config/base.yml`
### Ansible Version
2.15
### Configuration
N/A
### OS / Environment
N/A
### Steps to Reproduce
N/A
### Expected Results
N/A
### Actual Results
N/A | https://github.com/ansible/ansible/issues/78819 | https://github.com/ansible/ansible/pull/78831 | d514aeb2a1fdf7ac966dbd58445d273fc579106c | 228d25a321f3166cf73d14a929689774ce33fb51 | 2022-09-20T17:07:08Z | python | 2022-09-21T20:09:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,795 | ["changelogs/fragments/plugin_loader_fix.yml", "lib/ansible/config/manager.py", "lib/ansible/plugins/loader.py"] | Dynamic inventory slow on large inventories | ### Summary
Dynamic inventories have grown particularly slow when they load up a large number of machines. Our inventory of 10k+ nodes is taking a little over 60 seconds from command start to the first ansible task running - assuming a fully cached local inventory which skips the fetch calls.
The issue appears to have started somewhere around Ansible 4.
Edit: Updated to highlight the core 2.11.11 -> 2.11.12 2x speed increase. I'm still searching for a way to find where the 3.4 -> 4.0 one may be.
```
ansible 3.4.0
ansible-base 2.10.17
7 seconds
ansible 4.0.0
ansible-core 2.11.11
19 seconds
ansible 4.0.0
ansible-core 2.11.12
46 seconds
ansible 4.10.0
ansible-core 2.11.12
41 seconds
ansible 6.4.0
ansible-core 2.13.4
73 seconds - Note: this is longer as caching is not working due to a separate issue
47 seconds (with the fetch step excluded)
```
The V4 -> V6 increase is likely #78767 but this wouldn't explain the 4x jump from V3 -> V4.
### Issue Type
Bug Report
### Component Name
inventory
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.4]
config file = /usr/share/ansible/ansible.cfg
configured module search path = ['/usr/share/ansible/library']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
ansible collection location = /usr/lib/python3.8/site-packages/ansible_collections
executable location = /usr/bin/ansible
python version = 3.8.13 (default, Apr 28 2022, 12:34:52) [GCC 8.3.1 20190311 (Red Hat 8.3.1-3)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CALLBACKS_ENABLED(/usr/share/ansible/ansible.cfg) = ['syslog', 'timer', 'yaml']
COLLECTIONS_PATHS(/usr/share/ansible/ansible.cfg) = ['/usr/lib/python3.8/site-packages/ansible_collections']
COLOR_VERBOSE(/usr/share/ansible/ansible.cfg) = bright blue
DEFAULT_ACTION_PLUGIN_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/plugins/action']
DEFAULT_CALLBACK_PLUGIN_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/plugins/callback']
DEFAULT_FILTER_PLUGIN_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/plugins/filter']
DEFAULT_GATHERING(/usr/share/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/inventory/consort.yml']
DEFAULT_INVENTORY_PLUGIN_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/plugins/inventory']
DEFAULT_LOAD_CALLBACK_PLUGINS(/usr/share/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/usr/share/ansible/ansible.cfg) = /root/.ansible/logs/ansible.log
DEFAULT_LOOKUP_PLUGIN_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/plugins/lookup']
DEFAULT_MODULE_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/library']
DEFAULT_MODULE_UTILS_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/module_utils']
DEFAULT_ROLES_PATH(/usr/share/ansible/ansible.cfg) = ['/usr/share/ansible/roles']
DEFAULT_STDOUT_CALLBACK(/usr/share/ansible/ansible.cfg) = yaml
DEFAULT_TIMEOUT(/usr/share/ansible/ansible.cfg) = 15
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /root/.ansible/.vault_pass.key
INVENTORY_CACHE_PLUGIN(/usr/share/ansible/ansible.cfg) = jsonfile
INVENTORY_CACHE_PLUGIN_CONNECTION(/usr/share/ansible/ansible.cfg) = /root/.ansible/cache
RETRY_FILES_ENABLED(/usr/share/ansible/ansible.cfg) = False
TRANSFORM_INVALID_GROUP_CHARS(/usr/share/ansible/ansible.cfg) = ignore
CONNECTION:
==========
ssh:
___
pipelining(/usr/share/ansible/ansible.cfg) = True
ssh_args(/usr/share/ansible/ansible.cfg) = -C -o ServerAliveInterval=5 -o ServerAliveCountMax=2 -o ControlMaster=auto -o ControlPersist=120s -o PreferredAuthentications=publickey,password -o UserKnownHostsFile=/dev/null -o StrictHostKe
timeout(/usr/share/ansible/ansible.cfg) = 15
INVENTORY:
=========
consort:
_______
cache_connection(/usr/share/ansible/ansible.cfg) = /root/.ansible/cache
cache_plugin(/usr/share/ansible/ansible.cfg) = jsonfile
```
### OS / Environment
Centos 7 Docker container
### Steps to Reproduce
Example timings from the hosts
```
ansible 3.4.0
ansible-base 2.10.17
Averages around 7 seconds to process the inventory and start tasks
# time ansible localhost -vvvv --list-hosts
ansible 2.10.17
config file = /usr/share/ansible/ansible.cfg
configured module search path = ['/usr/share/ansible/library']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.13 (default, Apr 28 2022, 12:34:52) [GCC 8.3.1 20190311 (Red Hat 8.3.1-3)]
Using /usr/share/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /usr/share/ansible/inventory/consort.yml as it did not pass its verify_file() method
script declined parsing /usr/share/ansible/inventory/consort.yml as it did not pass its verify_file() method
inventory/consort _populate took 3337ms
inventory/consort parse took 4046ms
Parsed /usr/share/ansible/inventory/consort.yml inventory source with auto plugin
hosts (1):
localhost
real 0m12.943s
user 0m10.350s
sys 0m1.612s
#######
ansible 4.10.0
ansible-core 2.11.12
# time ansible localhost -vvvv --list-hosts
ansible [core 2.11.12]
config file = /usr/share/ansible/ansible.cfg
configured module search path = ['/usr/share/ansible/library']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
ansible collection location = /usr/lib/python3.8/site-packages/ansible_collections
executable location = /usr/bin/ansible
python version = 3.8.13 (default, Apr 28 2022, 12:34:52) [GCC 8.3.1 20190311 (Red Hat 8.3.1-3)]
jinja version = 3.1.2
libyaml = True
Using /usr/share/ansible/ansible.cfg as config file
[DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names to new standard, use callbacks_enabled instead. This feature will be removed from ansible-core in version 2.15. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
setting up inventory plugins
host_list declined parsing /usr/share/ansible/inventory/consort.yml as it did not pass its verify_file() method
script declined parsing /usr/share/ansible/inventory/consort.yml as it did not pass its verify_file() method
inventory/consort _populate took 3284ms
inventory/consort parse took 3972ms
Parsed /usr/share/ansible/inventory/consort.yml inventory source with auto plugin
hosts (1):
localhost
real 0m36.764s
user 0m34.052s
sys 0m1.802s
########
ansible 6.4.0
ansible-core 2.13.4
# time ansible localhost -vvvv --list-hosts
ansible [core 2.13.4]
config file = /usr/share/ansible/ansible.cfg
configured module search path = ['/usr/share/ansible/library']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
ansible collection location = /usr/lib/python3.8/site-packages/ansible_collections
executable location = /usr/bin/ansible
python version = 3.8.13 (default, Apr 28 2022, 12:34:52) [GCC 8.3.1 20190311 (Red Hat 8.3.1-3)]
jinja version = 3.1.2
libyaml = True
Using /usr/share/ansible/ansible.cfg as config file
[DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names to new standard, use callbacks_enabled instead. This feature will be removed from ansible-core in version 2.15. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
setting up inventory plugins
host_list declined parsing /usr/share/ansible/inventory/consort.yml as it did not pass its verify_file() method
script declined parsing /usr/share/ansible/inventory/consort.yml as it did not pass its verify_file() method
Using inventory plugin 'consort' to process inventory source '/usr/share/ansible/inventory/consort.yml'
inventory/consort _populate took 3272ms
inventory/consort parse took 3902ms
Parsed /usr/share/ansible/inventory/consort.yml inventory source with auto plugin
hosts (1):
localhost
real 0m39.021s
user 0m35.999s
sys 0m1.989s
```
### Expected Results
Less of an increase in the inventory parsing between the versions.
### Actual Results
```console
Long startup times processing the inventory data on every command.
Possibly not related but we did see a behaviour changing during the post populate stage where ansible was doing a lot of calls to `host_group_vars`
2026 1662134089.85213: Loading VarsModule 'host_group_vars' from /usr/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
2026 1662134089.86151: Loading ModuleDocFragment 'vars_plugin_staging' from /usr/lib/python3.8/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
2026 1662134089.86523: Loaded config def from plugin (vars/host_group_vars)
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78795 | https://github.com/ansible/ansible/pull/78859 | 71adb02142dbbd8f3c083ab2921f0d4b651edf64 | 4115ddd135a0445092c9f9a7b5904942ceedd57c | 2022-09-16T15:14:09Z | python | 2022-09-27T15:34:59Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,793 | ["changelogs/fragments/78828-iptables-option-to-disable-dns-lookups.yml", "lib/ansible/modules/iptables.py"] | Add option to disable DNS lookups in iptables module | ### Summary
When modifying firewall rules with `iptables` module in ansible, the iptables tries to do reverse lookups for the IP addresses in some occasions, which can cause huge delays when the defined DNS server is unreachable for some reason. When working with iptables from the command line, one can just use the `-n` -switch (`--numeric`) of the iptables binary to disable DNS lookups altogether. However, when using the `ansible.builtin.iptables` module, such switch can not be set.
The delay problem of iptables has been known issue for long, but usually it can be bypassed with the trick mentioned above.
The` --numeric` only is available for the list (`-L`) command, and even though this module does not directly offer such functionality, internally it is using it for checking policies etc.
### Issue Type
Feature Idea
### Component Name
iptables
### Additional Information
For the sake of clarity: the problem is not about using hostnames for firewall rules (which is generally considered bad idea anyway), but the fact that iptables does the reverse lookup of the IP addresses too.
As for the question: why don't you just setup a working DNS?
- Some environments might not have DNS at all and still need firewall
- Not all machines need DNS, so no DNS for them
- DNS might not be available during the deployment when setting the initial firewall rules but will be around later on
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78793 | https://github.com/ansible/ansible/pull/78828 | 5d253a13807e884b7ce0b6b57a963a45e2f0322c | cc2e7501db65193b7103195251dae5cffd8c03ca | 2022-09-16T07:50:54Z | python | 2022-10-11T20:59:35Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,786 | ["lib/ansible/utils/plugin_docs.py"] | Cannot show uri test docs | ### Summary
Running `ansible-doc -t test uri` produces
```
ERROR! test ansible.builtin.uri missing documentation (or could not parse documentation): No documentation availalbe for ansible.builtin.uri (/path/to/ansible/lib/ansible/plugins/test/uri.py)
```
It tries to look at `uri.py` instead of `uri.yml` in the same directory.
Listing the tests shows that filter correctly, `--metadata-dump` does not.
This happens both with #78700 and without #78700. #77737 also demonstrates this.
### Issue Type
Bug Report
### Component Name
ansible-doc
### Ansible Version
```console
devel branch
#78700
```
### Configuration
```console
-
```
### OS / Environment
-
### Steps to Reproduce
-
### Expected Results
-
### Actual Results
```console
-
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78786 | https://github.com/ansible/ansible/pull/78788 | 1d410ca700a468723be2bf76b142dc7be66401fc | 813c25eed1e4832a8ae363455a2f40bb3de33c7f | 2022-09-15T18:22:01Z | python | 2022-09-19T15:50:27Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,762 | ["changelogs/fragments/78781-fix-apt-only_upgrade-behavior.yml", "lib/ansible/modules/apt.py", "test/integration/targets/apt/tasks/repo.yml"] | core 2.13.4 breaking change in apt only_upgrade | ### Summary
Using `apt` with `only_upgrade: yes` fails if a package is currently not installed. It seems this was recently introduced with https://github.com/ansible/ansible/pull/78327. For us this was a breaking change - was this intentionally?
### Issue Type
Bug Report
### Component Name
apt
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.4]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/vagrant/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/vagrant/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
empty for me
```
### OS / Environment
ubuntu/focal64 20220804.0.0 (vagrant box)
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: upgrade if installed
apt:
name: "{{ packages }}"
only_upgrade: yes
vars:
packages:
- foo # not installed
- bar
```
### Expected Results
no failure if a package is currently not installed
### Actual Results
```console
TASK [my_role : upgrade if installed.] ***********************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"cache_update_time": 1663062238, "cache_updated": false, "changed": false, "msg": "no available installation candidate for foo"}
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78762 | https://github.com/ansible/ansible/pull/78781 | 9bc4fa496ca06d21b347071078b0f12343481e07 | 4b45b4b09d9257006f7b23237293c8c1a04521d8 | 2022-09-13T16:11:10Z | python | 2022-09-15T19:42:34Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,760 | ["docs/docsite/rst/ansible_index.rst", "docs/docsite/rst/collections_guide/collections_index.rst", "docs/docsite/rst/collections_guide/index.rst", "docs/docsite/rst/core_index.rst", "docs/docsite/rst/module_plugin_guide/index.rst", "docs/docsite/rst/module_plugin_guide/modules_plugins_index.rst"] | ansible-core docs site missing navigation for common pages | ### Summary
Here are a few examples missing:
1. REFERENCE & APPENDICES -> Collection Index
2. REFERENCE & APPENDICES -> Indexes of all modules and plugins
3. The entire "ANSIBLE GALAXY" section
Links generated by core always link to the `ansible-core/` docs. With these links and sections missing, the docs site is missing critical information.
Note: I didn't check all versions of ansible-core, specifically was using `devel`
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/core_index.rst
### Ansible Version
```console
$ ansible --version
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
N/A
### Additional Information
N/A
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78760 | https://github.com/ansible/ansible/pull/78763 | 563f3ecc11e9fc9ec9995186409de9dcae038d80 | 540442db2eb3d3c02ca750143571d0e9c766df3a | 2022-09-13T15:13:15Z | python | 2022-09-13T18:43:21Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,715 | ["lib/ansible/plugins/doc_fragments/files.py"] | ansible.builtin.file: incorrect permissions being set when looping | ### Summary
Setting file permissions for a list of files like this
```
my_items:
- path: dir1
mode: 0770
- ... further entries ..
```
using `ansible.builtin.file` results in incorrect permissions. For details see steps to reproduce below.
### Issue Type
Documentation Report
### Component Name
file
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.6]
config file = /home/yannik/projects/xxx/ansible.cfg
configured module search path = ['/home/yannik/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
ansible collection location = /home/yannik/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.6 (main, Aug 2 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)]
jinja version = 3.0.1
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_NOCOWS(/home/yannik/projects/xxx/ansible.cfg) = True
```
### OS / Environment
fedora 35
### Steps to Reproduce
Create a host_vars file with this:
```yaml
my_items:
- path: dir1
mode: 0770
```
and run the following playbook:
```yaml (paste below)
- file:
path: "/tmp/{{ item.path }}"
state: directory
mode: "{{ item.mode }}"
loop: "{{ my_items }}"
```
### Expected Results
The resulting permissions of `/tmp/dir1` should be equal to the permissions being set when not using a loop:
### Specifying `mode` directly in the playbook task
```
- file:
path: "/tmp/dir1"
state: directory
mode: 0770
```
**Result: permissions set to 0770**
### Specifying `mode` using a variable
`hosts_vars`:
```
my_permissions_variable: 0770
```
playbook:
```
- file:
path: "/tmp/dir"
state: directory
mode: "{{ my_permissions_variable }}"
```
**Result: permissions set to 0770**
### Actual Results
```console
File permissions are set to `0504` instead of `0770` when using a loop:
$ ansible-playbook test.yml -v
Using /home/yannik/projects/xxx/ansible.cfg as config file
PLAY [app0] *************************************************************************************************
TASK [Gathering Facts] **************************************************************************************
ok: [app0]
TASK [file] *************************************************************************************************
ok: [app0] => (item={'path': 'dir1', 'mode': 504}) => changed=false
ansible_loop_var: item
gid: 0
group: root
item:
mode: 504
path: dir1
mode: '0504'
owner: root
path: /tmp/dir1
size: 4096
state: directory
uid: 0
PLAY RECAP **************************************************************************************************
app0 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
$ stat /tmp/dir1
File: /tmp/dir1
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fe01h/65025d Inode: 2126076 Links: 2
Access: (0504/dr-x---r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-09-06 14:28:46.635247941 +0200
Modify: 2022-09-06 14:28:46.635247941 +0200
Change: 2022-09-06 14:28:46.635247941 +0200
Birth: 2022-09-06 14:28:46.635247941 +0200
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78715 | https://github.com/ansible/ansible/pull/80112 | af6d75e31363591921808f7f351185d11b7b429b | 032881e4f1cbad1ca66b2fc40c8c56b17b33d965 | 2022-09-06T12:30:28Z | python | 2023-04-06T19:39:25Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,701 | ["changelogs/fragments/pull_file_secrets.yml", "lib/ansible/cli/pull.py", "test/integration/targets/ansible-pull/pull-integration-test/conn_secret.yml", "test/integration/targets/ansible-pull/pull-integration-test/secret_connection_password", "test/integration/targets/ansible-pull/runme.sh"] | ansible-pull does not utilize the --become-password-file | ### Summary
When I try to use the --become-password-file flag in the command
```
> ansible-pull -i "$(hostname)," -U {repo_link} local.yml
```
I get the following error:
```
> module_stderr: |-
sudo: a password is required
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
```
when attempting to use the playbook:
```
- hosts: all
tasks:
- shell:
cmd: uptime
register: uptime_res
become: true
- debug:
var: uptime_res
```
I believe this is a bug because the [pull.py](https://github.com/ansible/ansible/blob/ad79c1e0d032eb5dda216055ffc393043de4b380/lib/ansible/cli/pull.py#L278) does not seem to utilize the [ask_passwords](https://github.com/ansible/ansible/blob/650befed37eadcaea735673638d5475fa957ca7e/lib/ansible/cli/__init__.py#L328) function, nor build the --become-password-file into the [cmd](https://github.com/ansible/ansible/blob/ad79c1e0d032eb5dda216055ffc393043de4b380/lib/ansible/cli/pull.py#L278) variable.
### Issue Type
Bug Report
### Component Name
pull.py
### Ansible Version
```console
$ ansible --version
aansible --version
ansible [core 2.12.6]
config file = /Users/{user}/ansible.cfg
configured module search path = ['/Users/{user}/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ansible
ansible collection location = /Users/{user}/.ansible/collections:/usr/share/ansible/collections
executable location = /Library/Frameworks/Python.framework/Versions/3.8/bin/ansible
python version = 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) [Clang 6.0 (clang-600.0.57)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
DEFAULT_FORKS(/Users/{user}/ansible.cfg) = 100
DEFAULT_LOAD_CALLBACK_PLUGINS(/Users/{user}/ansible.cfg) = True
DEFAULT_STDOUT_CALLBACK(/Users/{user}/ansible.cfg) = yaml
HOST_KEY_CHECKING(/Users/{user}/ansible.cfg) = False
BECOME:
======
CACHE:
=====
CALLBACK:
========
```
### OS / Environment
macOS Monterey 12.5.1
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- hosts: all
tasks:
- shell:
cmd: uptime
register: uptime_res
become: true
- debug:
var: uptime_res
```
run the command: ```ansible-pull -i "$(hostname)," -U {repo_link} local.yml```
### Expected Results
I expect a successful playbook with an output of the current uptime.
### Actual Results
```console
TASK [shell] *******************************************************************
fatal: [{HOSTNAME}]: FAILED! => changed=false
module_stderr: |-
sudo: a password is required
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78701 | https://github.com/ansible/ansible/pull/82009 | 9ee603d1c520cfa4fb95a9fe5cfddcae6141c0ac | 99e0d25857ad65764909c6ec701a04930ea5c21f | 2022-09-02T21:03:48Z | python | 2023-10-24T13:20:25Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,693 | ["changelogs/fragments/yum_repository_keepcache.yml", "lib/ansible/modules/yum_repository.py"] | yum_repository module has keepcache which is not supported in repositories | ### Summary
Module `yum_repository` have option for `keepcache`, which is not supported for repository (it should be only in `yum.conf`).
Ref: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-yum#sec-Setting_main_Options
### Issue Type
Bug Report
### Component Name
yum_repository
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.2]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 2.10.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
BECOME:
======
CACHE:
=====
CALLBACK:
========
CLICONF:
=======
CONNECTION:
==========
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
VARS:
====
```
### OS / Environment
RHEL8
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
---
- name: Repository reproducer
hosts: localhost
vars:
ansible_connection: local
tasks:
- name: add repository
ansible.builtin.yum_repository:
name: epel
description: EPEL YUM repo
baseurl: https://dl.fedoraproject.org/pub/epel/$releasever/Everything/$basearch/
keepcache: 0
```
```
# dnf update
# grep keepcache /var/log/dnf.log
```
### Expected Results
No warning in /var/log/dnf.log
### Actual Results
```console
# grep keepcache /var/log/dnf.log
2022-09-02T14:33:07+0200 DEBUG Unknown configuration option: keepcache = 0 in /etc/yum.repos.d/epel.repo
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78693 | https://github.com/ansible/ansible/pull/81426 | cc01a73ef0b1c6fe7b79018c6545d420b29bb5c0 | c07652f42e2d2113ae562ec794f7925ede88e169 | 2022-09-02T12:41:06Z | python | 2023-08-03T19:33:43Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,690 | ["docs/docsite/rst/dev_guide/testing.rst"] | Dev Guide doc: Duplicate paragraph in the section "Why test your Ansible contributions" | ### Summary
The introduction paragraph below is duplicated later in the guide. https://github.com/ansible/ansible/blame/devel/docs/docsite/rst/dev_guide/testing.rst#L14
Here's the duplicated section:
https://github.com/ansible/ansible/blame/devel/docs/docsite/rst/dev_guide/testing.rst#L44
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/dev_guide/testing.rst
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.3]
config file = None
configured module search path = ['/Users/william/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/6.3.0/libexec/lib/python3.10/site-packages/ansible
ansible collection location = /Users/william/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.6 (main, Aug 11 2022, 13:49:25) [Clang 13.1.6 (clang-1316.0.21.2.5)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Macos Montrey
### Additional Information
The improvement will remove a redundant paragraph from the guide. The guide will be concise.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78690 | https://github.com/ansible/ansible/pull/78691 | c7b4a25f9d668c45436ef57503c41bd1abb9d4fd | e276770ee9efac3a98c3f1116d9cd9c992ca8c9e | 2022-09-01T19:58:45Z | python | 2022-09-15T15:46:57Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,675 | ["docs/docsite/rst/playbook_guide/playbooks_filters.rst", "lib/ansible/plugins/filter/core.py", "lib/ansible/plugins/filter/normpath.yml"] | More os.path filters | ### Summary
Please add more filters based on os.path, specifically: `os.path.commonpath`, `os.path.normpath`. It is cheap, but would be handy in such tasks as validation, archive management, programmatic path generation. Can replace a lot of loops and regex filters.
### Issue Type
Feature Idea
### Component Name
core
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78675 | https://github.com/ansible/ansible/pull/78894 | 7c4d5f509930d832c6cbd5d5660c26e9d73fab58 | 6e949d8f5d6dcf95d6200f529e7d9b7474b568c8 | 2022-08-31T13:27:05Z | python | 2022-09-27T17:21:38Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,648 | ["changelogs/fragments/78648-urllib3-import-exceptions.yml", "lib/ansible/module_utils/urls.py"] | python 3.5 broken by charset_normalizer v 2.1.0 | ### Summary
I know I should move to newer Ubuntu/python version, but I'm stuck with a ubuntu 16.06 installation that uses python 3.5.
If i try to run a playbook, it fails at the first `apt` task; analyzing the traceback there's a syntax error provoked by `charset_normalizer`, that [recently (version 2.1.0) dropped support for python 3.5](https://github.com/Ousret/charset_normalizer/releases/tag/2.1.0).
There's also an "OpenSSL" ImportError, but I still have to do a bit of research on that;
### Issue Type
Bug Report
### Component Name
apt
### Ansible Version
```console
ansible [core 2.13.3]
config file = None
configured module search path = ['/home/sanzo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
ansible collection location = /home/sanzo/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.6 (main, Aug 2 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
-
```
### OS / Environment
Host: Fedora 35
Target: Ubuntu 16.04 on Vagrant box
### Steps to Reproduce
```yml
- name: Install prerequisites for Docker repository
become: yes
ansible.builtin.apt:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
update_cache: yes
```
### Expected Results
The task should run without problems.
### Actual Results
```console
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_ansible.builtin.apt_payload_cno7p5h4/ansible_ansible.builtin.apt_payload.zip/ansible/module_utils/urls.py", line 116, in <module>
File "/usr/local/lib/python3.5/dist-packages/urllib3/contrib/pyopenssl.py", line 50, in <module>
import OpenSSL.SSL
ImportError: No module named 'OpenSSL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vagrant/.ansible/tmp/ansible-tmp-1661458998.9793568-32605-133845591475306/AnsiballZ_apt.py", line 107, in <module>
_ansiballz_main()
File "/home/vagrant/.ansible/tmp/ansible-tmp-1661458998.9793568-32605-133845591475306/AnsiballZ_apt.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/vagrant/.ansible/tmp/ansible-tmp-1661458998.9793568-32605-133845591475306/AnsiballZ_apt.py", line 48, in invoke_module
run_name='__main__', alter_sys=True)
File "/usr/lib/python3.5/runpy.py", line 196, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.5/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_ansible.builtin.apt_payload_cno7p5h4/ansible_ansible.builtin.apt_payload.zip/ansible/modules/apt.py", line 368, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/tmp/ansible_ansible.builtin.apt_payload_cno7p5h4/ansible_ansible.builtin.apt_payload.zip/ansible/module_utils/urls.py", line 118, in <module>
File "/usr/local/lib/python3.5/dist-packages/requests/__init__.py", line 48, in <module>
from charset_normalizer import __version__ as charset_normalizer_version
File "/usr/local/lib/python3.5/dist-packages/charset_normalizer/__init__.py", line 24, in <module>
from .api import from_bytes, from_fp, from_path, normalize
File "/usr/local/lib/python3.5/dist-packages/charset_normalizer/api.py", line 71
previous_logger_level: int = logger.level
^
SyntaxError: invalid syntax
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78648 | https://github.com/ansible/ansible/pull/78667 | 19e7c5b0c1d5f682d2cbbae0ba8fd5eef653ba13 | f8e24e4a65a0a0d3e5a294d94c774c1ce1ac4152 | 2022-08-25T20:27:44Z | python | 2022-08-30T19:22:56Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,639 | ["test/units/utils/test_display.py"] | tests: `test_get_text_width_no_locale()` fails on Ubuntu 22.04 | ### Summary
The unit test ``test_get_text_width_no_locale()`` in test/units/utils/test_display.py fails on Ubuntu 22.04
```
def test_get_text_width_no_locale():
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
> pytest.raises(EnvironmentError, get_text_width, '\U000110cd')
E Failed: DID NOT RAISE <class 'OSError'>
test/units/utils/test_display.py:40: Failed
```
the cause appears to be a new behaviour of the C function `wcwidth()`, which no longer returns -1 for the character used ([U+110CD KAITHI NUMBER SIGN ABOVE](https://www.compart.com/en/unicode/U+110CD), unicode 11.0, June 2018).
```
$ docker run -it --rm public.ecr.aws/n5z0e8q9/ubuntu2004-test python3 -c "import ctypes,ctypes.util; _LIBC = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c')); _LIBC.wcwidth.argtypes = (ctypes.c_wchar,); _LIBC.wcswidth.argtypes = (ctypes.c_wchar_p, ctypes.c_int); _MAX_INT = 2 ** (ctypes.sizeof(ctypes.c_int) * 8 - 1) - 1; print(_LIBC.wcswidth('\\U000110cd', _MAX_INT))"
-1
```
```
$ lsb_release -d
Description: Ubuntu 22.04.1 LTS
$ python3 -c "import ctypes,ctypes.util; _LIBC = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c')); _LIBC.wcwidth.argtypes = (ctypes.c_wchar,); _LIBC.wcswidth.argtypes = (ctypes.c_wchar_p, ctypes.c_int); _MAX_INT = 2 ** (ctypes.sizeof(ctypes.c_int) * 8 - 1) - 1; print(_LIBC.wcwidth('\\U000110cd'))"
1
```
### Issue Type
Bug Report
### Component Name
ansible-test
### Ansible Version
```console
$ ansible --version
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel"
if you are modifying the Ansible engine, or trying out features under development. This is a rapidly
changing source of code and can become unstable at any point.
ansible [core 2.14.0.dev0] (test_ansible_version-devel 8c6e00df28) last updated 2022/08/25 11:58:21 (GMT +100)
config file = None
configured module search path = ['/home/willmerae/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/willmerae/src/ansible/lib/ansible
ansible collection location = /home/willmerae/.ansible/collections:/usr/share/ansible/collections
executable location = /home/willmerae/src/ansible/bin/ansible
python version = 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] (/usr/bin/python)
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
CONFIG_FILE() = None
```
### OS / Environment
Ubuntu 22.04 LTS x64
### Steps to Reproduce
```
$ source hacking/env-setup
$ ansible-test units --venv --python 3.9
### Expected Results
All unit tests pass
### Actual Results
```console
Unit test modules with Python 3.9
============================= test session starts ==============================
platform linux -- Python 3.9.13, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/willmerae/src/ansible, configfile: test/lib/ansible_test/_data/pytest/config/default.ini
plugins: xdist-2.5.0, forked-1.4.0, mock-3.7.0
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I / gw8 I / gw9 I / gw10 I / gw11 I
gw0 [123] / gw1 [123] / gw2 [123] / gw3 [123] / gw4 [123] / gw5 [123] / gw6 [123] / gw7 [123] / gw8 [123] / gw9 [123] / gw10 [123] / gw11 [123]
........................................................................ [ 58%]
................................................... [100%]
- generated xml file: /home/willmerae/src/ansible/test/results/junit/python3.9-modules-units.xml -
============================= slowest 25 durations =============================
0.07s call test/units/modules/test_hostname.py::TestHostname::test_stategy_get_never_writes_in_check_mode
0.03s call test/units/modules/test_async_wrapper.py::TestAsyncWrapper::test_run_module
0.03s call test/units/modules/test_iptables.py::TestIptables::test_log_level
0.02s setup test/units/modules/test_service.py::test_sunos_service_start
0.01s call test/units/modules/test_known_hosts.py::KnownHostsDiffTestCase::test_sanity_check
0.01s call test/units/modules/test_copy.py::test_split_pre_existing_dir_working_dir_exists[dir1-expected0]
0.01s setup test/units/modules/test_copy.py::test_split_pre_existing_dir_one_level_exists[dir1/dir2/-expected3]
0.01s call test/units/modules/test_iptables.py::TestIptables::test_iprange
0.01s call test/units/modules/test_iptables.py::TestIptables::test_tcp_flags
0.01s setup test/units/modules/test_copy.py::test_split_pre_existing_dir_one_level_exists[/dir1/-expected5]
0.01s call test/units/modules/test_iptables.py::TestIptables::test_chain_creation
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[32768-a+X-0]
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16384-u+rwx-448]
0.01s call test/units/modules/test_copy.py::test_split_pre_existing_dir_working_dir_exists[dir1/dir2-expected2]
0.01s setup test/units/modules/test_pip.py::test_failure_when_pip_absent[patch_ansible_module0]
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16895-g-rwx-455]
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16384-g=rwx-56]
0.01s call test/units/modules/test_iptables.py::TestIptables::test_chain_deletion_check_mode
0.01s call test/units/modules/test_iptables.py::TestIptables::test_without_required_parameters
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16895-a-X-438]
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16384-g+rwx-56]
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16384-u=rwx,g=rwx,o=rwx-511]
0.01s call test/units/modules/test_iptables.py::TestIptables::test_insert_rule_with_wait
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16895-a-rwx-0]
0.01s setup test/units/modules/test_copy.py::test_good_symbolic_modes[16384-u+rwx,g+rwx,o+rwx-511]
============================= 123 passed in 1.40s ==============================
Unit test module_utils with Python 3.9
============================= test session starts ==============================
platform linux -- Python 3.9.13, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/willmerae/src/ansible, configfile: test/lib/ansible_test/_data/pytest/config/default.ini
plugins: xdist-2.5.0, forked-1.4.0, mock-3.7.0
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I / gw8 I / gw9 I / gw10 I / gw11 I
gw0 [1673] / gw1 [1673] / gw2 [1673] / gw3 [1673] / gw4 [1673] / gw5 [1673] / gw6 [1673] / gw7 [1673] / gw8 [1673] / gw9 [1673] / gw10 [1673] / gw11 [1673]
........................................................................ [ 4%]
........................................................................ [ 8%]
.......................s....s....s..s..s....s...ss...s.s.s.......s.....s [ 12%]
....s................................................................... [ 17%]
........................................................................ [ 21%]
........................................................................ [ 25%]
........................................................................ [ 30%]
........................................................................ [ 34%]
......................................................................... [ 38%]
........................................................................ [ 43%]
........................................................................ [ 47%]
........................................................................ [ 51%]
........................................................................ [ 56%]
........................................................................ [ 60%]
........................................................................ [ 64%]
........................................................................ [ 68%]
........................................................................ [ 73%]
........................................................................ [ 77%]
........................................................................ [ 81%]
.s......s.........................................s....s.s.s............ [ 86%]
..................s..................................................... [ 90%]
........................................................................ [ 94%]
........................................................................ [ 99%]
................ [100%]
- generated xml file: /home/willmerae/src/ansible/test/results/junit/python3.9-module_utils-units.xml -
============================= slowest 25 durations =============================
3.01s call test/units/module_utils/facts/test_timeout.py::test_implicit_file_overridden_succeeds
2.01s call test/units/module_utils/facts/test_timeout.py::test_explicit_timeout
2.01s call test/units/module_utils/facts/test_timeout.py::test_explicit_succeeds
2.01s call test/units/module_utils/facts/test_timeout.py::test_implicit_file_overridden_timesout
1.02s call test/units/module_utils/facts/test_timeout.py::test_implicit_file_default_timesout
1.01s call test/units/module_utils/facts/test_timeout.py::test_implicit_file_default_succeeds
1.01s call test/units/module_utils/facts/test_timeout.py::test_timeout_raises_timeout
1.01s call test/units/module_utils/facts/test_timeout.py::test_exception_not_caught_by_called_code
1.00s call test/units/module_utils/facts/test_timeout.py::test_timeout_raises_timeout_integration_test[stdin0]
1.00s call test/units/module_utils/test_api.py::TestRetryWithDelaysAndCondition::test_retry_exception
1.00s call test/units/module_utils/test_api.py::TestRateLimit::test_ratelimit
0.22s call test/units/module_utils/facts/test_facts.py::TestFactsLinuxHardwareGetMountFacts::test_get_mount_facts
0.22s call test/units/module_utils/facts/hardware/test_linux.py::TestFactsLinuxHardwareGetMountFacts::test_get_mount_facts
0.14s call test/units/module_utils/facts/test_ansible_collector.py::TestPkgMgrOSTreeFacts::test_is_rhel_edge_ostree
0.14s call test/units/module_utils/facts/test_ansible_collector.py::TestExceptionCollectedFacts::test_expected_facts
0.14s call test/units/module_utils/facts/test_ansible_collector.py::TestInPlace::test1
0.13s call test/units/module_utils/facts/test_ansible_collector.py::TestPkgMgrFacts::test_expected_facts
0.13s call test/units/module_utils/facts/test_ansible_collector.py::TestPkgMgrFacts::test_not_expected_facts
0.13s call test/units/module_utils/facts/test_ansible_collector.py::TestPkgMgrOSTreeFacts::test_is_fedora_ostree
0.13s call test/units/module_utils/facts/test_ansible_collector.py::TestPkgMgrFacts::test_basics
0.13s call test/units/module_utils/facts/test_ansible_collector.py::TestPkgMgrOSTreeFacts::test_not_expected_facts
0.12s call test/units/module_utils/facts/test_ansible_collector.py::TestCollectedFacts::test_basics
0.12s call test/units/module_utils/facts/test_ansible_collector.py::TestExceptionCollectedFacts::test_basics
0.12s call test/units/module_utils/facts/test_ansible_collector.py::TestCollectedFacts::test_expected_facts
0.12s call test/units/module_utils/facts/test_ansible_collector.py::TestExceptionCollectedFacts::test_not_expected_facts
=========================== short test summary info ============================
SKIPPED [1] test/units/module_utils/basic/test_imports.py:84: literal_eval is available in every version of Python3
SKIPPED [5] test/units/module_utils/basic/test_log.py:38: python systemd bindings not installed
SKIPPED [5] test/units/module_utils/basic/test_log.py:130: python systemd bindings not installed
SKIPPED [1] test/units/module_utils/basic/test_log.py:139: python systemd bindings not installed
SKIPPED [2] test/units/module_utils/basic/test_log.py:113: python systemd bindings not installed
SKIPPED [1] test/units/module_utils/facts/test_collectors.py:370: faulty test
SKIPPED [1] test/units/module_utils/facts/test_collectors.py:396: faulty test
SKIPPED [1] test/units/module_utils/facts/test_facts.py:46: This platform (DragonFly) does not have a fact_class.
SKIPPED [3] test/units/module_utils/facts/test_facts.py:64: This test class needs to be updated to specify collector_class
SKIPPED [1] test/units/module_utils/facts/test_facts.py:54: This platform (DragonFly) does not have a fact_class.
====================== 1652 passed, 21 skipped in 12.17s =======================
Unit test controller with Python 3.9
============================= test session starts ==============================
platform linux -- Python 3.9.13, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/willmerae/src/ansible, configfile: test/lib/ansible_test/_data/pytest/config/default.ini
plugins: xdist-2.5.0, forked-1.4.0, mock-3.7.0
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I / gw8 I / gw9 I / gw10 I / gw11 I
gw0 [1871] / gw1 [1871] / gw2 [1871] / gw3 [1871] / gw4 [1871] / gw5 [1871] / gw6 [1871] / gw7 [1871] / gw8 [1871] / gw9 [1871] / gw10 [1871] / gw11 [1871]
........................................................................ [ 3%]
........................................................................ [ 7%]
........................................................................ [ 11%]
........................................................................ [ 15%]
........................................................................ [ 19%]
........................................................................ [ 23%]
........................................................................ [ 26%]
........................................................................ [ 30%]
........................................................................ [ 34%]
........................................................................ [ 38%]
.........................................s.............................. [ 42%]
........................................................................ [ 46%]
........................................................................ [ 50%]
........................................................................ [ 53%]
........................................................................ [ 57%]
........................................................................ [ 61%]
........................................................................ [ 65%]
........................................................................ [ 69%]
........................................................................ [ 73%]
........................................................................ [ 76%]
...................s....s.....s....s......s.....s....................... [ 80%]
........................................................................ [ 84%]
..........F............................................................. [ 88%]
........................................................................ [ 92%]
........................................................................ [ 96%]
.................................s..................................... [100%]
=================================== FAILURES ===================================
________________________ test_get_text_width_no_locale _________________________
[gw7] linux -- Python 3.9.13 /home/willmerae/src/ansible/test/results/.tmp/delegation/python3.9/bin/python
def test_get_text_width_no_locale():
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
> pytest.raises(EnvironmentError, get_text_width, '\U000110cd')
E Failed: DID NOT RAISE <class 'OSError'>
test/units/utils/test_display.py:40: Failed
- generated xml file: /home/willmerae/src/ansible/test/results/junit/python3.9-controller-units.xml -
============================= slowest 25 durations =============================
2.16s call test/units/utils/test_encrypt.py::test_encrypt_with_ident
2.11s call test/units/executor/test_task_executor.py::TestTaskExecutor::test_task_executor_run_loop
1.15s call test/units/plugins/lookup/test_password.py::TestLookupModuleWithPasslibWrappedAlgo::test_encrypt_wrapped_crypt_algo
1.13s call test/units/utils/test_encrypt.py::test_encrypt_default_rounds
1.01s call test/units/galaxy/test_api.py::test_wait_import_task_timeout[https://galaxy.server.com/api-v2-Token-token_ins0-1234-https://galaxy.server.com/api/v2/collection-imports/1234/]
1.00s call test/units/galaxy/test_api.py::test_wait_import_task_timeout[https://galaxy.server.com/api/automation-hub-v3-Bearer-token_ins1-1234-https://galaxy.server.com/api/automation-hub/v3/imports/collections/1234/]
0.77s call test/units/cli/test_galaxy.py::TestGalaxy::test_execute_remove
0.73s call test/units/cli/test_galaxy.py::TestGalaxy::test_run
0.61s call test/units/cli/test_adhoc.py::test_simple_command
0.60s call test/units/utils/test_encrypt.py::test_do_encrypt_passlib
0.52s call test/units/parsing/yaml/test_loader.py::TestAnsibleLoaderVault::test_embedded_vault
0.45s call test/units/utils/test_encrypt.py::test_passlib_bcrypt_salt
0.44s call test/units/utils/display/test_logger.py::test_logger
0.38s call test/units/cli/test_galaxy.py::test_install_implicit_role_with_collections[\ncollections:\n- namespace.name\nroles:\n- namespace.name\n]
0.37s call test/units/utils/collection_loader/test_collection_loader.py::test_import_from_collection
0.36s call test/units/utils/collection_loader/test_collection_loader.py::test_collpkg_loader_load_module
0.33s call test/units/utils/collection_loader/test_collection_loader.py::test_collection_get_data
0.32s call test/units/utils/collection_loader/test_collection_loader.py::test_bogus_imports
0.32s call test/units/cli/test_galaxy.py::test_parse_requirements_with_collection_source[\ncollections:\n- name: namespace.collection\n- name: namespace2.collection2\n source: https://galaxy-dev.ansible.com/\n- name: namespace3.collection3\n source: server\n]
0.32s call test/units/cli/test_galaxy.py::test_parse_requirements_with_roles_and_collections[\nroles:\n- username.role_name\n- src: username2.role_name2\n- src: ssh://github.com/user/repo\n scm: git\n\ncollections:\n- namespace.collection2\n]
0.30s call test/units/cli/test_galaxy.py::test_parse_requirements_roles_with_include_missing[\n- username.role\n- include: missing.yml\n]
0.29s call test/units/cli/test_galaxy.py::test_parse_requirements_roles_with_include[\n- username.included_role\n- src: https://github.com/user/repo\n]
0.25s call test/units/executor/test_play_iterator.py::TestPlayIterator::test_play_iterator
0.23s call test/units/executor/test_play_iterator.py::TestPlayIterator::test_play_iterator_nested_blocks
0.21s call test/units/ansible_test/ci/test_azp.py::test_auth
=========================== short test summary info ============================
SKIPPED [1] test/units/parsing/vault/test_vault.py:783: This test is not ready yet
SKIPPED [1] test/units/plugins/strategy/test_strategy.py:121: Temporarily disabled due to fragile tests that need rewritten
SKIPPED [1] test/units/plugins/strategy/test_strategy.py:43: Temporarily disabled due to fragile tests that need rewritten
SKIPPED [1] test/units/plugins/strategy/test_strategy.py:425: Temporarily disabled due to fragile tests that need rewritten
SKIPPED [1] test/units/plugins/strategy/test_strategy.py:218: Temporarily disabled due to fragile tests that need rewritten
SKIPPED [1] test/units/plugins/strategy/test_strategy.py:175: Temporarily disabled due to fragile tests that need rewritten
SKIPPED [1] test/units/plugins/strategy/test_strategy.py:69: Temporarily disabled due to fragile tests that need rewritten
SKIPPED [1] test/units/vars/test_module_response_deepcopy.py:40: No current support for this situation
FAILED test/units/utils/test_display.py::test_get_text_width_no_locale
================== 1 failed, 1862 passed, 8 skipped in 9.20s ===================
FATAL: Command "pytest --forked -r a -n auto --color yes -p no:cacheprovider -c /home/willmerae/src/ansible/test/lib/ansible_test/_data/pytest/config/default.ini --junit-xml /home/willmerae/src/ansible/test/results/junit/python3.9-controller-units.xml --strict-markers --rootdir /home/willmerae/src/ansible --durations=25 test/units/_vendor/test_vendor.py test/units/ansible_test/ci/test_azp.py test/units/cli/arguments/test_optparse_helpers.py test/units/cli/galaxy/test_collection_extract_tar.py test/units/cli/galaxy/test_display_collection.py test/units/cli/galaxy/test_display_header.py test/units/cli/galaxy/test_display_role.py test/units/cli/galaxy/test_execute_list.py test/units/cli/galaxy/test_execute_list_collection.py test/units/cli/galaxy/test_get_collection_widths.py test/units/cli/test_adhoc.py test/units/cli/test_cli.py test/units/cli/test_console.py test/units/cli/test_doc.py test/units/cli/test_galaxy.py test/units/cli/test_playbook.py test/units/cli/test_vault.py test/units/config/manager/test_find_ini_config_file.py test/units/config/test_manager.py test/units/errors/test_errors.py test/units/executor/module_common/test_modify_module.py test/units/executor/module_common/test_module_common.py test/units/executor/module_common/test_recursive_finder.py test/units/executor/test_interpreter_discovery.py test/units/executor/test_play_iterator.py test/units/executor/test_playbook_executor.py test/units/executor/test_task_executor.py test/units/executor/test_task_queue_manager_callbacks.py test/units/executor/test_task_result.py test/units/galaxy/test_api.py test/units/galaxy/test_collection.py test/units/galaxy/test_collection_install.py test/units/galaxy/test_role_install.py test/units/galaxy/test_role_requirements.py test/units/galaxy/test_token.py test/units/galaxy/test_user_agent.py test/units/inventory/test_group.py test/units/inventory/test_host.py test/units/parsing/test_ajson.py test/units/parsing/test_dataloader.py test/units/parsing/test_mod_args.py test/units/parsing/test_splitter.py test/units/parsing/test_unquote.py test/units/parsing/utils/test_addresses.py test/units/parsing/utils/test_jsonify.py test/units/parsing/utils/test_yaml.py test/units/parsing/vault/test_vault.py test/units/parsing/vault/test_vault_editor.py test/units/parsing/yaml/test_constructor.py test/units/parsing/yaml/test_dumper.py test/units/parsing/yaml/test_loader.py test/units/parsing/yaml/test_objects.py test/units/playbook/role/test_include_role.py test/units/playbook/role/test_role.py test/units/playbook/test_attribute.py test/units/playbook/test_base.py test/units/playbook/test_block.py test/units/playbook/test_collectionsearch.py test/units/playbook/test_conditional.py test/units/playbook/test_helpers.py test/units/playbook/test_included_file.py test/units/playbook/test_play.py test/units/playbook/test_play_context.py test/units/playbook/test_playbook.py test/units/playbook/test_taggable.py test/units/playbook/test_task.py test/units/plugins/action/test_action.py test/units/plugins/action/test_gather_facts.py test/units/plugins/action/test_pause.py test/units/plugins/action/test_raw.py test/units/plugins/become/test_su.py test/units/plugins/become/test_sudo.py test/units/plugins/cache/test_cache.py test/units/plugins/callback/test_callback.py test/units/plugins/connection/test_connection.py test/units/plugins/connection/test_local.py test/units/plugins/connection/test_paramiko.py test/units/plugins/connection/test_psrp.py test/units/plugins/connection/test_ssh.py test/units/plugins/connection/test_winrm.py test/units/plugins/filter/test_core.py test/units/plugins/filter/test_mathstuff.py test/units/plugins/inventory/test_constructed.py test/units/plugins/inventory/test_inventory.py test/units/plugins/inventory/test_script.py test/units/plugins/lookup/test_env.py test/units/plugins/lookup/test_ini.py test/units/plugins/lookup/test_password.py test/units/plugins/lookup/test_url.py test/units/plugins/shell/test_cmd.py test/units/plugins/shell/test_powershell.py test/units/plugins/strategy/test_linear.py test/units/plugins/strategy/test_strategy.py test/units/plugins/test_plugins.py test/units/regex/test_invalid_var_names.py test/units/template/test_native_concat.py test/units/template/test_templar.py test/units/template/test_template_utilities.py test/units/template/test_vars.py test/units/test_constants.py test/units/test_context.py test/units/test_no_tty.py test/units/utils/collection_loader/test_collection_loader.py test/units/utils/display/test_broken_cowsay.py test/units/utils/display/test_display.py test/units/utils/display/test_logger.py test/units/utils/display/test_warning.py test/units/utils/test_cleanup_tmp_file.py test/units/utils/test_context_objects.py test/units/utils/test_display.py test/units/utils/test_encrypt.py test/units/utils/test_helpers.py test/units/utils/test_isidentifier.py test/units/utils/test_plugin_docs.py test/units/utils/test_shlex.py test/units/utils/test_unsafe_proxy.py test/units/utils/test_vars.py test/units/utils/test_version.py test/units/vars/test_module_response_deepcopy.py test/units/vars/test_variable_manager.py" returned exit status 1.
FATAL: Command "/usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/home/willmerae/src/ansible PYTHONPATH=/tmp/ansible-test-qhlhnur_ /home/willmerae/src/ansible/test/results/.tmp/delegation/python3.9/bin/python /home/willmerae/src/ansible/bin/ansible-test units --containers '{}' --truncate 105 --color yes --host-path test/results/.tmp/host-ah1wk7w7 --metadata test/results/.tmp/metadata-np2gu58c.json" returned exit status 1.
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78639 | https://github.com/ansible/ansible/pull/78645 | ebcf1654c49ef3ce53771579aa903f2e1293c231 | d8cb9117acf2b7a3624eb3b00df2daa6e97c5ae4 | 2022-08-25T13:30:12Z | python | 2022-08-29T14:06:37Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,612 | ["changelogs/fragments/78612-rescue-block-ansible_play_hosts.yml", "lib/ansible/executor/play_iterator.py", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/blocks/78612.yml", "test/integration/targets/blocks/runme.sh"] | failed task inside an include_tasks inside a rescue block does not remove host from ansible_play_hosts nor from ansible_play_batch | ### Summary
I have created a role that has two tasks files: main and validation. The main task file uses block/rescue to validate the health of a system, with the rescue block trying to recover a failed system and then re-running the validation tasks. If the system still reports failure after an attempted recovery, I expect the failed host to be removed from `ansible_play_hosts` and `ansible_play_batch`; however they persist. Interestingly, the failed host(s) are excluded from future tasks in the play, and are excluded from subsequent plays in a playbook. I was only able to reproduce this if the rescue block had a failure from an `include_tasks`.
### Issue Type
Bug Report
### Component Name
rescue
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.3]
config file = None
python version = 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
ubuntu 22.04
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
inventory:
```
[all]
a
b
```
roles/fail/tasks/validation.yml:
```yaml
- fail:
when: "inventory_hostname == 'a'"
```
roles/fail/tasks/main.yml:
```yaml
- block:
- include_tasks: "validation.yml"
rescue:
- debug:
msg: "Failed for {{ inventory_hostname }}"
- include_tasks: "validation.yml"
```
playbook:
```yaml
- hosts: "all"
gather_facts: false
tasks:
- include_role:
name: "fail"
- debug:
msg: "{{ item }} is: {{ lookup('vars', item) }}"
loop:
- "ansible_play_hosts_all"
- "ansible_play_hosts"
- "ansible_play_batch"
- hosts: "all"
gather_facts: false
tasks:
- debug:
msg: "second play for {{ inventory_hostname }}"
```
### Expected Results
I expected host a to be removed from ansible_play_hosts and ansible_play_batch
### Actual Results
```console
results:
PLAY [all] ***************************************************************************************************************************************************************************************************************************************************************************************************
TASK [include_role : fail] ***********************************************************************************************************************************************************************************************************************************************************************************
TASK [fail : include_tasks] **********************************************************************************************************************************************************************************************************************************************************************************
included: roles/fail/tasks/validation.yml for a, b
TASK [fail : fail] *******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [b]
fatal: [a]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}
TASK [fail : debug] ******************************************************************************************************************************************************************************************************************************************************************************************
ok: [a] => {
"msg": "Failed for a"
}
TASK [fail : include_tasks] **********************************************************************************************************************************************************************************************************************************************************************************
included: roles/fail/tasks/validation.yml for a
TASK [fail : fail] *******************************************************************************************************************************************************************************************************************************************************************************************
fatal: [a]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}
TASK [debug] *************************************************************************************************************************************************************************************************************************************************************************************************
ok: [b] => (item=ansible_play_hosts_all) => {
"msg": "ansible_play_hosts_all is: ['a', 'b']"
}
ok: [b] => (item=ansible_play_hosts) => {
"msg": "ansible_play_hosts is: ['a', 'b']"
}
ok: [b] => (item=ansible_play_batch) => {
"msg": "ansible_play_batch is: ['a', 'b']"
}
PLAY [all] ***************************************************************************************************************************************************************************************************************************************************************************************************
TASK [debug] *************************************************************************************************************************************************************************************************************************************************************************************************
ok: [b] => {
"msg": "second play for b"
}
PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************************************************************
a : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=1 ignored=0
b : ok=3 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78612 | https://github.com/ansible/ansible/pull/78657 | 38c3b5e8f1cd6898b8dfe54f1849c8e424b5dd49 | 19e7c5b0c1d5f682d2cbbae0ba8fd5eef653ba13 | 2022-08-22T14:16:46Z | python | 2022-08-30T15:16:21Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,611 | ["changelogs/fragments/78624-copy-remote-src-check-mode.yml", "lib/ansible/modules/copy.py", "test/integration/targets/copy/tasks/check_mode.yml"] | ansible check mode - module copy creates dest directory if it ends with a / and remote_src is true | ### Summary
In check mode, when I use ansible builtin module **ansible.builtin.copy** to copy a remote file or directory to a destination which ends with a `/`, it creates destination directory on remote host despite check mode is enabled.
### Issue Type
Bug Report
### Component Name
ansible.builtin.copy
### Ansible Version
```console
$ ansible --version
ansible 2.10.8
config file = /home/user/.ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_BECOME_METHOD(/home/user/.ansible.cfg) = sudo
DEFAULT_ROLES_PATH(/home/user/.ansible.cfg) = ['/home/user/data/git/ansible/roles']
DEFAULT_SCP_IF_SSH(/home/user/.ansible.cfg) = True
```
### OS / Environment
Ansible controller OS is Debian bullseye.
### Steps to Reproduce
On ansible controller :
1. Create directory **/tmp/ansible-test**
`$ mkdir /tmp/ansible-test`
2. Create empty file **/tmp/ansible-test/empty.txt**
`$ touch /tmp/ansible-test/empty.txt`
3. Create playbook **/tmp/ansible-test/playbook.yml** with the following content
```yaml
---
- hosts: localhost
tasks:
- name: copy file empty.txt into /tmp/ansible-test/not-existing-subdir/
ansible.builtin.copy:
remote_src: yes
src: /tmp/ansible-test/empty.txt
dest: /tmp/ansible-test/not-existing-subdir/
```
4. Run playbook
`$ ansible-playbook --check /tmp/ansible-test/playbook.yml`
### Expected Results
Directory **/tmp/ansible-test/not-existing-subdir/** is not created after having run playbook (cf. step 3 in section **Steps to Reproduce**) in check mode
### Actual Results
```console
# Directory **/tmp/ansible-test/not-existing-subdir/** has been created by running playbook (cf. step 3 in section **Steps to Reproduce**) in check mode (cf. execution output below)
user@debian:/tmp/ansible-test$ ls -Al
total 4
-rw-r--r-- 1 user user 0 22 aoΓ»t 14:29 empty.txt
-rw-r--r-- 1 user user 239 22 aoΓ»t 15:16 playbook.yml
user@debian:/tmp/ansible-test$ ansible-playbook --check --diff /tmp/ansible-test/playbook.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [localhost] **************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [localhost]
TASK [copy file empty.txt into /tmp/ansible-test/not-existing-subdir/] ********************************************************************************************************************************************
changed: [localhost]
PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
user@debian:/tmp/ansible-test$ ls -Al
total 8
-rw-r--r-- 1 user user 0 22 aoΓ»t 14:29 empty.txt
drwxr-xr-x 2 user user 4096 22 aoΓ»t 15:19 not-existing-subdir
-rw-r--r-- 1 user user 239 22 aoΓ»t 15:16 playbook.yml
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78611 | https://github.com/ansible/ansible/pull/78624 | c564c6e21e4538b475df2ae4b3f66b73decff160 | b7a0e0d79278906c57c6dfc637d0e0b09b45db34 | 2022-08-22T13:28:32Z | python | 2023-03-08T20:40:01Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,604 | ["docs/docsite/rst/galaxy/user_guide.rst"] | ansible/docs/docsite/rst/galaxy/user_guide.rst lacks documentation for the -p parameter | ### Summary
I was reading https://docs.ansible.com/ansible/latest/galaxy/user_guide.html and was trying to understand how to specify which path to use to install a galaxy collection. I intuited that the `-p` parameter was the correct one, and it ended up being correct.
It would be helpful to explain (1) all of the available parameters, (2) what they do, and (3) what their defaults are.
### Issue Type
Documentation Report
### Component Name
ansible/docs/docsite/rst/galaxy/user_guide.rst
### Ansible Version
```console
$ ansible --version
ansible [core 2.11.12]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.7.10 (default, Jun 3 2021, 00:02:01) [GCC 7.3.1 20180712 (Red Hat 7.3.1-13)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
N/A
```
### OS / Environment
N/A
### Additional Information
N/A
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78604 | https://github.com/ansible/ansible/pull/78649 | 4260b71cc77b7a44e061668d0d408d847f550156 | b8abcd17a80969349e605fd3f450bf43845e4177 | 2022-08-19T23:01:32Z | python | 2022-09-01T18:20:45Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,600 | ["lib/ansible/plugins/connection/ssh.py"] | scp_if_ssh not working as intended with OpenSSH since version 9.0 | ### Summary
The option `scp_if_ssh = true` is used to force Ansible to use scp instead of sftp on targets, that don't support sftp. However since OpenSSH 9.0 (8.8 on Arch Linux it seems) even the scp utility defaults to using sftp. The old behavior can be enabled by additionally setting `scp_extra_args = "-O"` to force scp to use the old protocol.
I recognize that this is not an Ansible bug, but it may break documented and expected behavior.
OpenSSH Changelog: https://www.openssh.com/txt/release-9.0
> This release switches scp(1) from using the legacy scp/rcp protocol to using the SFTP protocol by default.
### Issue Type
~Bug Report~
Documentation Report
### Component Name
connection, ssh, scp
### Ansible Version
```console
ansible [core 2.13.2]
config file = None
configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/dist-packages/ansible
ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
CONNECTION:
==========
ssh:
___
scp_extra_args(env: ANSIBLE_SCP_EXTRA_ARGS) = -O
scp_if_ssh(env: ANSIBLE_SCP_IF_SSH) = true
```
### OS / Environment
Debian Sid
### Steps to Reproduce
configure sshd to not offer sftp. (eg. delete `Subsystem sftp /usr/lib/ssh/sftp-server` from `/etc/ssh/sshd_config` and restart)
create a small example playbook, contents are irrelevant
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- hosts: localhost
gather_facts: true
remote_user: root
tasks:
- name: install a nonexistant package
package:
name:
- less-is-more
```
execute wit Ansible configuration or environment setting to use scp:
```
export ANSIBLE_SCP_IF_SSH=false
ansible-playbook -c ssh playbook.yml
```
### Expected Results
```
ansible@instance:~$ ansible-playbook -c ssh playbook.yml
PLAY [localhost] ***************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************
ok: [localhost]
TASK [install a nonexistant package] *******************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'less-is-more' is available"}
PLAY RECAP *********************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
### Actual Results
```console
with only `scp_if_ssh`:
ansible@instance:~$ ansible-playbook -c ssh playbook.yml
PLAY [localhost] ***************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************
fatal: [localhost]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via scp: scp: Connection closed\r\n", "unreachable": true}
PLAY RECAP *********************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
```
with additional setting to acc `-O`to scp (working correctly):
```
ansible@instance:~$ export ANSIBLE_SCP_EXTRA_ARGS="-O"
ansible@instance:~$ ansible-playbook -c ssh playbook.yml
PLAY [localhost] ***************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************
ok: [localhost]
TASK [install a nonexistant package] *******************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'less-is-more' is available"}
PLAY RECAP *********************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78600 | https://github.com/ansible/ansible/pull/78745 | d4407ca68822b1f12254957ec9918f94c23d374f | 952ee88f33de4d49ff5f7bd4bec3431a4b0fdc78 | 2022-08-19T20:18:39Z | python | 2022-09-15T15:03:09Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,588 | ["docs/docsite/rst/dev_guide/developing_modules_general.rst"] | "The module xxxx/library/my_test.py was not found in configured module paths" | ### Summary
Hi there,
Not too sure what's going on as it seems like everything on my end looks well. I tried following this Tutorial: [https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html](url) and it has lead me in receiving back the following error message:
```yml
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | FAILED! => {
"msg": "The module xxxxx/library/my_test.py was not found in configured module paths"
}
```
Okay? Maybe I have to set something up differently in my config file.
I then went ahead and set my ansible.cfg file to the following:
```yml
[defaults]
library = ./library
```
Tried looking for this issue everywhere else but doesn't seem to be reported -- as much...
Would appreciate some guidance / help.
Thanks.
### Issue Type
Bug Report
### Component Name
Developing Modules
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.3]
config file = /Users/xxxx/Desktop/Projects/project-destination/ansible.cfg
configured module search path = ['/Users/xxxx/Desktop/Projects/project-destination/library']
ansible python module location = /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ansible
ansible collection location = /Users/xxxx/.ansible/collections:/usr/share/ansible/collections
executable location = /Library/Frameworks/Python.framework/Versions/3.10/bin/ansible
python version = 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)]
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_MODULE_PATH(/Users/xxxx/Desktop/Projects/project-destination/ansible.cfg) = ['/Users/xxxx/Desktop/Projects/project-destination/library']
BECOME:
======
CACHE:
=====
CALLBACK:
========
CLICONF:
=======
CONNECTION:
==========
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
VARS:
====
```
### OS / Environment
Mac OS
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
ansible -m xxxx/library/my_test.py -a 'name=hello new=true' localhost
```
### Expected Results
Expecting back this output:
```yml
{"changed": true, "state": {"original_message": "hello", "new_message": "goodbye"}, "invocation": {"module_args": {"name": "hello", "new": true}}}
```
### Actual Results
```console
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | FAILED! => {
"msg": "The module xxxxx/library/my_test.py was not found in configured module paths"
}
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78588 | https://github.com/ansible/ansible/pull/78593 | beb70daf14bc14acad076b34dca39a3ca6b633bb | 5ac40b358d7d64e4169813e400c19f869b17183c | 2022-08-18T23:39:45Z | python | 2022-08-19T19:06:03Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,564 | ["lib/ansible/modules/unarchive.py"] | check_mode for unarchive module is not supported for gzipped tar files | ### Summary
The documentation on https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html states that the module fully supports check-mode.
But the fact is that check-mode is not supported when it concerns a gzipped tar file cfr. https://github.com/ansible/ansible-modules-core/blob/00911a75ad6635834b6d28eef41f197b2f73c381/files/unarchive.py#L591
I was mislead by the '_fully_ supported' and noticed that the step was skipped in check-mode.
Wouldn't it make sense to adapt the documentation accordingly ?
### Issue Type
Documentation Report
### Component Name
https://github.com/ansible/ansible-modules-core/blob/00911a75ad6635834b6d28eef41f197b2f73c381/files/unarchive.py
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.6]
config file = ansible.cfg
configured module search path = ['/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/dist-packages/ansible
ansible collection location = /home/<user>/.ansible
executable location = /usr/local/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
jinja version = 2.11.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Debian 11
### Additional Information
When the documentation is adapted, it is clear for everyone that unarchiving gzipped tar files is not check_mode compatible.
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78564 | https://github.com/ansible/ansible/pull/78741 | 952ee88f33de4d49ff5f7bd4bec3431a4b0fdc78 | f50ff1c2dbb2eee88b2ac9e50e9f13d942e41f12 | 2022-08-16T20:34:10Z | python | 2022-09-15T15:06:31Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,559 | ["docs/docsite/rst/playbook_guide/playbooks_variables.rst", "docs/docsite/rst/reference_appendices/YAMLSyntax.rst"] | Add a section about boolean variables | ### Summary
Ansible accepts a broad range of values for boolean variables: `true/false`, `1/0`, `yes/no`, `True/False`, and so on. We recently reached consensus about representing all Boolean values as `true/false` in the module documentation generated from python docstrings - see [this vote](https://github.com/ansible-community/community-topics/discussions/120) and [this issue](https://github.com/ansible-community/community-topics/issues/116) and [this PR](https://github.com/ansible-community/antsibull-docs/pull/19). We plan to update examples and other mentions of boolean values in the docs over the next few months.
The docs should also show users that they do not have to use `true/false` if they choose not to. Adding a section to the [documentation on variables](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#playbooks-variables) that explains all this will help users.
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/user_guide/playbooks_variables.rst
### Ansible Version
```console
N/A
```
### Configuration
```console
N/A
```
### OS / Environment
N/A
### Additional Information
None
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78559 | https://github.com/ansible/ansible/pull/78653 | 5f2bb2ba93293f43df4b4134b428de4abbd8d0dd | 077e1bfe17b99d805dfa94ad9f67e2384077808c | 2022-08-16T15:27:47Z | python | 2022-09-01T18:28:03Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,556 | ["docs/docsite/.templates/banner.html"] | Banner about 2.9 on latest docs is misleading | ### Summary
Feeback: - the line "Red Hat subscribers, select 2.9 in the version selection to the left for the most recent Red Hat release." is confusing, because 2.9 is not the latest release but rather the most recent release prior to the core/collections split.
### Issue Type
Documentation Report
### Component Name
docs/docsite/sphinx_conf/ansible_conf.py
### Ansible Version
```console
$ ansible --version
2.13
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78556 | https://github.com/ansible/ansible/pull/78563 | 33ee5d4c1b8ea5357e29749a71f55d8f03642b9e | 2fdaee143a88e1c63c7dc56f06a114bf31380683 | 2022-08-16T14:37:23Z | python | 2022-08-17T15:56:49Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,516 | ["changelogs/fragments/78516-galaxy-cli-exit-codes.yml", "lib/ansible/cli/galaxy.py"] | some galaxy cli functions return non-zero on success | ### Summary
Some functions (role search specifically) have an exit code of 1, even if the command was successful. Poking through the code, it looks as though in some of the cli functions they return "True" instead of an integer.
https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/galaxy.py#L1713
### Issue Type
Bug Report
### Component Name
galaxy
### Ansible Version
```console
$ ansible --version
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code
and can become unstable at any point.
ansible [core 2.14.0.dev0] (devel 0a199a07ed) last updated 2022/08/11 11:04:53 (GMT -400)
config file = None
configured module search path = ['/home/jtanner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/jtanner/workspace/github/jctanner.redhat/ansible/lib/ansible
ansible collection location = /home/jtanner/.ansible/collections:/usr/share/ansible/collections
executable location = /tmp/gng_testing/bin/ansible
python version = 3.10.5 (main, Jun 9 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] (/tmp/gng_testing/bin/python)
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
any
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```shell
(gng_testing) [jtanner@p1 ~]$ ansible-galaxy -vvv role search --author=geerlingguy docker
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code
and can become unstable at any point.
Found 10 roles matching your search:
Name Description
---- -----------
geerlingguy.awx Installs and configures AWX (Ansible Tower's open source version).
geerlingguy.awx-container Ansible AWX container for Docker.
geerlingguy.containerd containerd.io for Linux.
geerlingguy.docker Docker for Linux.
geerlingguy.docker_arm Docker setup for Rasbperry Pi and ARM-based devices.
geerlingguy.ecr_container_build ECR docker image build and push management role.
geerlingguy.firewall Simple iptables firewall for most Unix-like systems.
geerlingguy.k8s_manifests Kubernetes manifest management role.
geerlingguy.kubernetes Kubernetes for Linux.
geerlingguy.pip Pip (Python package manager) for Linux.
(gng_testing) [jtanner@p1 ~]$ echo $?
1
```
### Expected Results
return code of zero.
### Actual Results
```console
return code of 1
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78516 | https://github.com/ansible/ansible/pull/78578 | 1e6730aec4363744a390cd0357dbf9db3647a85c | 4c8b8a06be5a851669b8e55f9a0e83b751db9b83 | 2022-08-11T15:19:57Z | python | 2022-08-18T19:15:51Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,509 | ["changelogs/fragments/paramiko_config.yml", "lib/ansible/plugins/connection/paramiko_ssh.py", "test/integration/targets/connection_paramiko_ssh/test_connection.inventory"] | Jinja expressions are not evaluated in credential variables if paramiko plugin is used | ### Summary
I use paramiko ssh plugin. I try to set `ansible_ssh_user`, `ansible_ssh_pass`, etc. from jinja expression. This has worked correctly in version 2.10, jinja expressions were evaluated. But in ansible-core 2.13 jinja expressions are not evaluated:
`ESTABLISH PARAMIKO SSH CONNECTION FOR USER: {{ some_variable | default('cirros') }} on PORT 22 TO 10.xx.xx.xx`
### Issue Type
Bug Report
### Component Name
ansible-playbook,paramiko
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.1]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/zkrakko/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/zkrakko/ansible-venv/lib/python3.8/site-packages/ansible
ansible collection location = /home/zkrakko/.ansible/collections:/usr/share/ansible/collections
executable location = /home/zkrakko/ansible-venv/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Linux Mint 20.3
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
test.yaml file:
```yaml (paste below)
---
- hosts: server
gather_facts: no
vars:
ansible_ssh_user: "{{ some_variable | default('cirros') }}"
ansible_ss_pass: gocubsgo
tasks:
- raw: echo "{{ ansible_ssh_user }}"
```
hosts file:
```
[server]
10.xx.xx.xx
```
command:
`ansible-playbook -vvv -i hosts -c paramiko test.yaml`
### Expected Results
I expected that `cirros` username is used for connection (like in ansible-core 2.10):
```
PLAYBOOK: test.yaml ****************************************************************
1 plays in test.yaml
PLAY [server] **********************************************************************
META: ran handlers
TASK [raw] *************************************************************************
task path: /home/zkrakko/ansible-venv/test.yaml:8
<10.xx.xx.xx> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: cirros on PORT 22 TO 10.xx.xx.xx
```
### Actual Results
```console
Instead, the jinja expression in username was not evaluated:
PLAYBOOK: test.yaml ****************************************************************
1 plays in test.yaml
PLAY [server] **********************************************************************
META: ran handlers
TASK [raw] *************************************************************************
task path: /home/zkrakko/ansible-venv/test.yaml:8
<10.xx.xx.xx> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: {{ some_variable | default('cirros') }} on PORT 22 TO 10.xx.xx.xx
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78509 | https://github.com/ansible/ansible/pull/79704 | 694f12d01b17e4aba50bda55546edada6e79b5a8 | a1bff416edf9b9c8bd5c3b002277eed5b5323953 | 2022-08-11T07:21:52Z | python | 2023-03-07T16:09:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,493 | ["docs/docsite/rst/reference_appendices/python_3_support.rst"] | Python 3 page in appendix is outdated | ### Summary
This page still has older python versions listed:
https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html
Specifically this note is incorrect:
"On the controller we support Python 3.5 or greater and Python 2.7 or greater. Module-side, we support Python 3.5 or greater and Python 2.6 or greater."
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/python_3_support.rst
### Ansible Version
```console
$ ansible --version
2.14
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78493 | https://github.com/ansible/ansible/pull/79173 | d82d232d0715717d0569d3c645d3e47cad14b4db | d6c268378f248c5892298627ad74562593c6300b | 2022-08-10T16:00:48Z | python | 2022-10-20T17:55:41Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,492 | ["changelogs/fragments/78492-fix-invalid-run_once-value.yml", "lib/ansible/plugins/strategy/linear.py", "test/integration/targets/strategy_linear/runme.sh", "test/integration/targets/strategy_linear/task_templated_run_once.yml"] | Passing the value 'false' to run_once is invalid in loop task | ### Summary
π Here is some description of my issue: https://github.com/kubernetes-sigs/kubespray/issues/9126#issuecomment-1210807498
when `run_once` and `loop` appear in the task at the same time, the value of `run_once` is a variable and the variable is `false`, and the expected result of the task does not take effect at this time.
### Issue Type
Bug Report
### Component Name
ansible-playbook,loop,run_once,register
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.5]
config file = /root/workspaces/kubespray/ansible.cfg
configured module search path = ['/root/workspaces/kubespray/library']
ansible python module location = /root/workspaces/kubespray/kubespray-venv/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/workspaces/kubespray/kubespray-venv/bin/ansible
python version = 3.9.10 (main, Aug 9 2022, 02:24:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
jinja version = 2.11.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CACHE_PLUGIN(/root/workspaces/kubespray/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/root/workspaces/kubespray/ansible.cfg) = /tmp
CACHE_PLUGIN_TIMEOUT(/root/workspaces/kubespray/ansible.cfg) = 86400
CALLBACKS_ENABLED(/root/workspaces/kubespray/ansible.cfg) = ['profile_tasks', 'ara_default']
DEFAULT_GATHERING(/root/workspaces/kubespray/ansible.cfg) = smart
DEFAULT_MODULE_PATH(/root/workspaces/kubespray/ansible.cfg) = ['/root/workspaces/kubespray/library']
DEFAULT_ROLES_PATH(/root/workspaces/kubespray/ansible.cfg) = ['/root/workspaces/kubespray/roles', '/root/workspaces/kubespray/kubespray-venv/usr/local/share/k
DEFAULT_STDOUT_CALLBACK(/root/workspaces/kubespray/ansible.cfg) = default
DEPRECATION_WARNINGS(/root/workspaces/kubespray/ansible.cfg) = False
DISPLAY_SKIPPED_HOSTS(/root/workspaces/kubespray/ansible.cfg) = False
HOST_KEY_CHECKING(/root/workspaces/kubespray/ansible.cfg) = False
INVENTORY_IGNORE_EXTS(/root/workspaces/kubespray/ansible.cfg) = ['~', '.orig', '.bak', '.ini', '.cfg', '.retry', '.pyc', '.pyo', '.creds', '.gpg']
INVENTORY_IGNORE_PATTERNS(/root/workspaces/kubespray/ansible.cfg) = ['artifacts', 'credentials']
TRANSFORM_INVALID_GROUP_CHARS(/root/workspaces/kubespray/ansible.cfg) = ignore
BECOME:
======
CACHE:
=====
jsonfile:
________
_timeout(/root/workspaces/kubespray/ansible.cfg) = 86400
_uri(/root/workspaces/kubespray/ansible.cfg) = /tmp
CALLBACK:
========
default:
_______
display_skipped_hosts(/root/workspaces/kubespray/ansible.cfg) = False
CLICONF:
=======
CONNECTION:
==========
paramiko_ssh:
____________
host_key_checking(/root/workspaces/kubespray/ansible.cfg) = False
ssh:
___
host_key_checking(/root/workspaces/kubespray/ansible.cfg) = False
pipelining(/root/workspaces/kubespray/ansible.cfg) = True
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
VARS:
====
```
### OS / Environment
| node | arch | os |
| -------- | -------- | -------- |
| master1 | x86_64 | CentOS Linux 7 (Core) |
| worker1 | aarch64 | Kylin Linux Advanced Server V10 (Tercel) |
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
---
- name: test run_once
hosts: k8s_cluster
gather_facts: False
tags: always
vars:
test_flag: false
os_release_path: /etc/os-release
tasks:
- name: Fetch /etc/os-release
run_once: "{{ test_flag | bool }}"
raw: "cat {{ path_var }}"
register: os_release
loop: "{{ [os_release_path] }}"
loop_control:
loop_var: path_var
- name: Debug print var
debug:
msg: ">> os_release: {{ os_release }}"
```
### Expected Results
```
TASK [Fetch /etc/os-release] *********************************************************************************************************************************
changed: [worker1]
changed: [master1]
Wednesday 10 August 2022 10:49:58 -0400 (0:00:00.406) 0:00:00.457 ******
TASK [Debug print var] ***************************************************************************************************************************************
ok: [master1] => {
"msg": ">> os_release: {'rc': 0, 'stdout': 'NAME=\"CentOS Linux\"\\r\\nVERSION=\"7 (Core)\"\\r\\nID=\"centos\"\\r\\nID_LIKE=\"rhel fedora\"\\r\\nVERSION_ID=\"7\"\\r\\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\\r\\nANSI_COLOR=\"0;31\"\\r\\nCPE_NAME=\"cpe:/o:centos:centos:7\"\\r\\nHOME_URL=\"https://www.centos.org/\"\\r\\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\\r\\n\\r\\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\\r\\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\\r\\nREDHAT_SUPPORT_PRODUCT=\"centos\"\\r\\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\\r\\n\\r\\n', 'stdout_lines': ['NAME=\"CentOS Linux\"', 'VERSION=\"7 (Core)\"', 'ID=\"centos\"', 'ID_LIKE=\"rhel fedora\"', 'VERSION_ID=\"7\"', 'PRETTY_NAME=\"CentOS Linux 7 (Core)\"', 'ANSI_COLOR=\"0;31\"', 'CPE_NAME=\"cpe:/o:centos:centos:7\"', 'HOME_URL=\"https://www.centos.org/\"', 'BUG_REPORT_URL=\"https://bugs.centos.org/\"', '', 'CENTOS_MANTISBT_PROJECT=\"CentOS-7\"', 'CENTOS_MANTISBT_PROJECT_VERSION=\"7\"', 'REDHAT_SUPPORT_PRODUCT=\"centos\"', 'REDHAT_SUPPORT_PRODUCT_VERSION=\"7\"', ''], 'stderr': 'Shared connection to 10.6.170.20 closed.\\r\\n', 'stderr_lines': ['Shared connection to 10.6.170.20 closed.'], 'changed': True, 'failed': False}"
}
ok: [worker1] => {
"msg": ">> os_release: {'rc': 0, 'stdout': 'NAME=\"Kylin Linux Advanced Server\"\\r\\nVERSION=\"V10 (Tercel)\"\\r\\nID=\"kylin\"\\r\\nVERSION_ID=\"V10\"\\r\\nPRETTY_NAME=\"Kylin Linux Advanced Server V10 (Tercel)\"\\r\\nANSI_COLOR=\"0;31\"\\r\\n\\r\\n', 'stdout_lines': ['NAME=\"Kylin Linux Advanced Server\"', 'VERSION=\"V10 (Tercel)\"', 'ID=\"kylin\"', 'VERSION_ID=\"V10\"', 'PRETTY_NAME=\"Kylin Linux Advanced Server V10 (Tercel)\"', 'ANSI_COLOR=\"0;31\"', ''], 'stderr': '\\nAuthorized users only. All activities may be monitored and reported.\\nShared connection to 172.30.40.199 closed.\\r\\n', 'stderr_lines': ['', 'Authorized users only. All activities may be monitored and reported.', 'Shared connection to 172.30.40.199 closed.'], 'changed': True, 'failed': False}"
}
```
### Actual Results
```console
TASK [Fetch /etc/os-release] *********************************************************************************************************************************
changed: [master1] => (item=/etc/os-release)
changed: [worker1] => (item=/etc/os-release)
Wednesday 10 August 2022 10:47:57 -0400 (0:00:00.372) 0:00:00.429 ******
TASK [Debug print var] ***************************************************************************************************************************************
ok: [master1] => {
"msg": ">> os_release: {'results': [{'rc': 0, 'stdout': 'NAME=\"Kylin Linux Advanced Server\"\\r\\nVERSION=\"V10 (Tercel)\"\\r\\nID=\"kylin\"\\r\\nVERSION_ID=\"V10\"\\r\\nPRETTY_NAME=\"Kylin Linux Advanced Server V10 (Tercel)\"\\r\\nANSI_COLOR=\"0;31\"\\r\\n\\r\\n', 'stdout_lines': ['NAME=\"Kylin Linux Advanced Server\"', 'VERSION=\"V10 (Tercel)\"', 'ID=\"kylin\"', 'VERSION_ID=\"V10\"', 'PRETTY_NAME=\"Kylin Linux Advanced Server V10 (Tercel)\"', 'ANSI_COLOR=\"0;31\"', ''], 'stderr': '\\nAuthorized users only. All activities may be monitored and reported.\\nShared connection to 172.30.40.199 closed.\\r\\n', 'stderr_lines': ['', 'Authorized users only. All activities may be monitored and reported.', 'Shared connection to 172.30.40.199 closed.'], 'changed': True, 'failed': False, 'path_var': '/etc/os-release', 'ansible_loop_var': 'path_var'}], 'skipped': False, 'changed': True, 'msg': 'All items completed'}"
}
ok: [worker1] => {
"msg": ">> os_release: {'results': [{'rc': 0, 'stdout': 'NAME=\"Kylin Linux Advanced Server\"\\r\\nVERSION=\"V10 (Tercel)\"\\r\\nID=\"kylin\"\\r\\nVERSION_ID=\"V10\"\\r\\nPRETTY_NAME=\"Kylin Linux Advanced Server V10 (Tercel)\"\\r\\nANSI_COLOR=\"0;31\"\\r\\n\\r\\n', 'stdout_lines': ['NAME=\"Kylin Linux Advanced Server\"', 'VERSION=\"V10 (Tercel)\"', 'ID=\"kylin\"', 'VERSION_ID=\"V10\"', 'PRETTY_NAME=\"Kylin Linux Advanced Server V10 (Tercel)\"', 'ANSI_COLOR=\"0;31\"', ''], 'stderr': '\\nAuthorized users only. All activities may be monitored and reported.\\nShared connection to 172.30.40.199 closed.\\r\\n', 'stderr_lines': ['', 'Authorized users only. All activities may be monitored and reported.', 'Shared connection to 172.30.40.199 closed.'], 'changed': True, 'failed': False, 'path_var': '/etc/os-release', 'ansible_loop_var': 'path_var'}], 'skipped': False, 'changed': True, 'msg': 'All items completed'}"
}
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78492 | https://github.com/ansible/ansible/pull/80051 | 0e509ecf2572aab5f277a13284e29d6c68d596ab | 043a0f3ee81c6a56b025f4c2f3e939c5d621fba8 | 2022-08-10T15:23:19Z | python | 2023-03-31T15:36:44Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,490 | ["changelogs/fragments/ansible-test-ansible-doc-sanity-fqcn.yml", "test/integration/targets/ansible-test-sanity-ansible-doc/aliases", "test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/lookup/a/b/lookup2.py", "test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/lookup/lookup1.py", "test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/a/b/module2.py", "test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/modules/module1.py", "test/integration/targets/ansible-test-sanity-ansible-doc/runme.sh", "test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py"] | Wrong module FQCN computed by sanity test `ansible-doc` when having a deep module struct | ### Summary
Hello,
We are developing a new custom collection that has the following deep module structure:
```
plugins/modules/
βββ backup
β βββ backint
β β βββ __init__.py
β β βββ install.py
β βββ configurator.py
β βββ executor.py
β βββ __init__.py
β βββ scheduler.py
βββ certificates
β βββ info.py
β βββ __init__.py
βββ hdbuserstore
β βββ editor.py
β βββ info.py
β βββ __init__.py
βββ __init__.py
βββ parameters
β βββ editor.py
β βββ __init__.py
β βββ validator.py
βββ procedure.py
βββ pse
β βββ certificates_info.py
β βββ __init__.py
βββ query.py
```
So now if we run the command `ansible-test sanity --test ansible-doc`, it is failing with this error:
```
Running sanity test "ansible-doc"
ERROR: Output on stderr from ansible-doc is considered an error.
Command "ansible-doc -t module priejos.saphana.certificates_info priejos.saphana.configurator priejos.saphana.editor priejos.saphana.editor priejos.saphana.executor priejos.saphana.info priejos.saphana.info priejos.saphana.install priejos.saphana.procedure priejos.saphana.query priejos.saphana.scheduler priejos.saphana.validator" returned exit status 0.
>>> Standard Error
[WARNING]: module priejos.saphana.certificates_info not found in:
/dev/null:/tmp/ansible-test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.configurator not found in:
/dev/null:/tmp/ansible-test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.editor not found in: /dev/null:/tmp/ansible-
test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.executor not found in: /dev/null:/tmp/ansible-
test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.info not found in: /dev/null:/tmp/ansible-
test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.install not found in: /dev/null:/tmp/ansible-
test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.scheduler not found in: /dev/null:/tmp/ansible-
test-2z8ljk2u/ansible/modules
[WARNING]: module priejos.saphana.validator not found in: /dev/null:/tmp/ansible-
test-2z8ljk2u/ansible/modules
FATAL: The 1 sanity test(s) listed below (out of 1) failed. See error output above for details.
ansible-doc
```
The issue seems to be related to a bug in the way the class `ansible_test._internal.commands.sanity.ansible_doc.AnsibleDocTest` computes the module FQCN inside the method `test`. Indeed the issue is in the next `for` loop inside that method which is missing to add the rest of the module FQCN when appending values to dict `doc_targets` and `target_paths`:
```python
for plugin_type, plugin_path in data_context().content.plugin_paths.items():
plugin_type = remap_types.get(plugin_type, plugin_type)
for plugin_file_path in [target.name for target in targets.include if is_subdir(target.path, plugin_path)]:
plugin_name = os.path.splitext(os.path.basename(plugin_file_path))[0]
if plugin_name.startswith('_'):
plugin_name = plugin_name[1:]
doc_targets[plugin_type].append(data_context().content.prefix + plugin_name)
target_paths[plugin_type][data_context().content.prefix + plugin_name] = plugin_file_path
```
You may be fixing this issue up with something like the next code excerpt which is taking into consideration the whole module FQCN:
```python
module_path = os.path.join(data_context().content.module_path, '')
for plugin_type, plugin_path in data_context().content.plugin_paths.items():
plugin_type = remap_types.get(plugin_type, plugin_type)
for plugin_file_path in [target.name for target in targets.include if is_subdir(target.path, plugin_path)]:
plugin_path_noext = os.path.splitext(plugin_file_path)[0]
plugin_name_parts = plugin_path_noext.replace(module_path, '', 1).split('/')
plugin_ctx, plugin_name = plugin_name_parts[:-1], plugin_name_parts[-1]
if plugin_name.startswith('_'):
plugin_name = plugin_name[1:]
if plugin_ctx:
plugin_full_ctx = data_context().content.prefix + '.'.join(plugin_ctx) + '.'
else:
plugin_full_ctx = data_context().content.prefix
plugin_full_name = plugin_full_ctx + plugin_name
doc_targets[plugin_type].append(plugin_full_name)
target_paths[plugin_type][plugin_full_name] = plugin_file_path
```
Thanks in advanced for your support.
Cheers
Jose M. Prieto
### Issue Type
Bug Report
### Component Name
ansible-test sanity --test ansible-doc
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.2]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/users/priejos/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/sap/CEXIE/team/priejos/ansible_collections/roche/saphana/venv/lib64/python3.8/site-packages/ansible
ansible collection location = /usr/sap/CEXIE/team/priejos
executable location = /usr/sap/CEXIE/team/priejos/ansible_collections/roche/saphana/venv/bin/ansible
python version = 3.8.11 (default, Jul 23 2021, 14:55:16) [GCC 9.1.1 20190605 (Red Hat 9.1.1-2)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
COLLECTIONS_PATHS(env: ANSIBLE_COLLECTIONS_PATH) = ['/usr/sap/CEXIE/team/priejos']
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
CONNECTION:
==========
paramiko_ssh:
____________
host_key_checking(/etc/ansible/ansible.cfg) = False
ssh:
___
host_key_checking(/etc/ansible/ansible.cfg) = False
pipelining(/etc/ansible/ansible.cfg) = True
scp_if_ssh(/etc/ansible/ansible.cfg) = True
ssh_args(/etc/ansible/ansible.cfg) = -o ConnectionAttempts=20
```
### OS / Environment
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.9 (Maipo)
Release: 7.9
Codename: Maipo
### Steps to Reproduce
1. Try to have a deep module structure like the one I pasted in the summary section
2. Execute the ansible-doc sanity check like `ansible-test sanity --test ansible-doc`
### Expected Results
The sanity check `ansible-doc` to recognize the right module FQCN in a deep structure like shown in section "Summary".
### Actual Results
```console
$ ansible-test sanity --test ansible-doc -v --debug
Creating container database.
Read 5 sanity test ignore line(s) for Ansible 2.13 from: tests/sanity/ignore-2.13.txt
Running sanity test "ansible-doc"
Initializing "/tmp/ansible-test-7fr64tiv-injector" as the temporary injector directory.
Run command: ansible-doc -t module priejos.saphana.certificates_info priejos.saphana.configurator priejos.saphana.editor priejos.saphana.editor priejos.saphana.executor priejos.saphana.info priejos.saphana.info priejos.saphana.install priejos.saphana.procedure priejos.saphana.query priejos.saphana.scheduler priejos.saphana.validator
ERROR: Output on stderr from ansible-doc is considered an error.
Command "ansible-doc -t module priejos.saphana.certificates_info priejos.saphana.configurator priejos.saphana.editor priejos.saphana.editor priejos.saphana.executor priejos.saphana.info priejos.saphana.info priejos.saphana.install priejos.saphana.procedure priejos.saphana.query priejos.saphana.scheduler priejos.saphana.validator" returned exit status 0.
>>> Standard Error
[WARNING]: module priejos.saphana.certificates_info not found in:
/dev/null:/tmp/ansible-test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.configurator not found in:
/dev/null:/tmp/ansible-test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.editor not found in: /dev/null:/tmp/ansible-
test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.executor not found in: /dev/null:/tmp/ansible-
test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.info not found in: /dev/null:/tmp/ansible-
test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.install not found in: /dev/null:/tmp/ansible-
test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.scheduler not found in: /dev/null:/tmp/ansible-
test-q8hhje7a/ansible/modules
[WARNING]: module priejos.saphana.validator not found in: /dev/null:/tmp/ansible-
test-q8hhje7a/ansible/modules
FATAL: The 1 sanity test(s) listed below (out of 1) failed. See error output above for details.
ansible-doc
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78490 | https://github.com/ansible/ansible/pull/78518 | 9eb3d6811bfbdc9c776f2c549c642a9d8db3fa56 | 2b63fdd1b8dd8383a9b09b601d80623cd76ce579 | 2022-08-10T12:14:10Z | python | 2022-08-11T17:53:23Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,485 | ["docs/docsite/rst/reference_appendices/faq.rst"] | Remove FAQ about not having Ansible as wheels | ### Summary
Ansible as wheels has been supported since 2.13 so remove the FAQ entry at https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#why-don-t-you-ship-ansible-in-wheel-format-or-other-packaging-format
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/reference_appendices/faq.rst
### Ansible Version
```console
$ ansible --version
2.13
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
none
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78485 | https://github.com/ansible/ansible/pull/78524 | 135f95fb2fae05667e0b7382183693cda394aa9e | 7f69629fa787fb5242534111cec2fb4772e3f1b9 | 2022-08-09T20:33:32Z | python | 2022-08-11T20:54:21Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,442 | ["changelogs/fragments/78983-fix-collection-install-from-source-respects-dir-symlinks.yaml", "lib/ansible/galaxy/collection/__init__.py", "test/integration/targets/ansible-galaxy-collection/tasks/install.yml"] | ansible galaxy install collection from git replaces directory symlinks with empty dir | ### Summary
When a path in a collection is a symlink to a directory, the symlink is replaced with an empty dir instead of either a copy of the symlink target or the original symlink.
collection source:
```
$ tree -Ap --noreport ~/my_namespace/testcollection/collection/roles/php/templates/etc/php
[drwxr-xr-x] roles/php/templates/etc/php
βββ [drwxr-xr-x] 7.3
β βββ [drwxr-xr-x] fpm
β βββ [drwxr-xr-x] pool.d
β βββ [-rw-r--r--] www.conf.j2
βββ [lrwxrwxrwx] 7.4 -> 7.3
```
collection after installation (from git source):
```
$ tree -Ap --noreport ~/.ansible/collections/ansible_collections/my_namespace/testcollection/roles/php/templates/etc/php
[drwxr-xr-x] roles/php/templates/etc/php
βββ [drwxr-xr-x] 7.3
β βββ [drwxr-xr-x] fpm
β βββ [drwxr-xr-x] pool.d
β βββ [-rw-r--r--] www.conf.j2
βββ [drwxr-xr-x] 7.4
```
role `meta/requirements.yml` contains the following:
```
collections:
- name: my_namespace.testcollection
source: git+file:///home/twouters/my_namespace/testcollection#/collection/
version: 2022.31.0-coll5
type: git
```
contents of collection tar.gz after `ansible-galaxy collection build` seems to still be correct:
```
$ tar -tvf my_namespace-testcollection-2022.31.0-coll5.tar.gz | grep -F roles/php/templates
drwxr-xr-x 0/0 0 2022-08-03 11:31 roles/php/templates/etc/php/
lrw-r--r-- 0/0 0 1970-01-01 01:00 roles/php/templates/etc/php/7.4 -> 7.3
drwxr-xr-x 0/0 0 2022-08-03 11:31 roles/php/templates/etc/php/7.3/
drwxr-xr-x 0/0 0 2022-08-03 11:31 roles/php/templates/etc/php/7.3/fpm/
drwxr-xr-x 0/0 0 2022-08-03 11:31 roles/php/templates/etc/php/7.3/fpm/pool.d/
-rw-r--r-- 0/0 430 2022-08-03 11:31 roles/php/templates/etc/php/7.3/fpm/pool.d/www.conf.j2
```
installation from tar.gz with `ansible-galaxy collection install --force my_namespace-testcollection-2022.31.0-coll5.tar.gz` is fine:
```
$ tree -Ap --noreport ~/.ansible/collections/ansible_collections/my_namespace/testcollection/roles/php/templates/etc/php
[drwxr-xr-x] roles/php/templates/etc/php
βββ [drwxr-xr-x] 7.3
β βββ [drwxr-xr-x] fpm
β βββ [drwxr-xr-x] pool.d
β βββ [-rw-r--r--] www.conf.j2
βββ [lrwxrwxrwx] 7.4 -> 7.3
```
### Issue Type
Bug Report
### Component Name
ansible-galaxy
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.2]
config file = /home/twouters/.ansible.cfg
configured module search path = ['/home/twouters/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.10/site-packages/ansible
ansible collection location = /home/twouters/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.5 (main, Aug 1 2022, 07:53:20) [GCC 12.1.0]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
$
```
### OS / Environment
Arch Linux
### Steps to Reproduce
See summary
### Expected Results
See summary. I expect to either have a copy of the symlink target or preferably the original symlink.
### Actual Results
```console
See summary
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78442 | https://github.com/ansible/ansible/pull/78983 | 420564c5bcf752a821ae0599c3bd01ffba40f3ea | 8cf7a0d3f0fc71bb148ceb6501851b39fe6a6f68 | 2022-08-04T12:56:59Z | python | 2022-10-06T17:53:23Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,438 | ["changelogs/fragments/fix_init_commented.yml", "lib/ansible/cli/config.py"] | "ansible-config init" command generates ansible.cfg with missing commentouts | ### Summary
I generated ansible.cfg using the `ansible-config init` command.
The `-f vars` argument was used to specify the output format, and commented out the output with the `--disabled` argument.
The result is a yaml format configuration with the array elements uncommented out.
It's probably not that important but I think this array element needs to be commented out.
```yaml
#ansible_facts_modules:
- smart
```
### Issue Type
Bug Report
### Component Name
ansible-config
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.2]
config file = None
configured module search path = ['/home/nnstt1/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/nnstt1/.virtualenv/ansible/lib/python3.9/site-packages/ansible
ansible collection location = /home/nnstt1/.ansible/collections:/usr/share/ansible/collections
executable location = /home/nnstt1/.virtualenv/ansible/bin/ansible
python version = 3.9.13 (main, Aug 4 2022, 15:00:24) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
N/A
```
### OS / Environment
N/A
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```bash
$ ansible-config init -f vars --disabled
```
### Expected Results
```console
# Sets the output directory and filename prefix to generate coverage run info.(str): Sets the output directory on the remote host to generate coverage reports to.
#Currently only used for remote coverage on PowerShell modules.
#This is for internal use only.
#_ansible_coverage_remote_output: ''
# No syslog on target(boolean): Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log.
#ansible_no_target_syslog: false
# Gather Facts Modules(list): Which modules to run during a play's fact gathering stage, using the default of 'smart' will try to figure it out based on connection type.
#If adding your own modules but you still want to use the default Ansible facts, you will want to include 'setup' or corresponding network module to the list (if you add 'smart', Ansible will also figur
#This does not affect explicit calls to the 'setup' module, but does always affect the 'gather_facts' action (implicit or explicit).
#ansible_facts_modules:
#- smart
# Python interpreter path (or automatic discovery behavior) used for module execution(string): Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery
#ansible_python_interpreter: auto
# Adjust maximum file descriptor soft limit during Python module execution(string): Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess
#ansible_python_module_rlimit_nofile: 0
# Windows Async Startup Timeout(integer): For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connec
#This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has conn
#ansible_win_async_startup_timeout: 5
```
### Actual Results
```console
# Sets the output directory and filename prefix to generate coverage run info.(str): Sets the output directory on the remote host to generate coverage reports to.
#Currently only used for remote coverage on PowerShell modules.
#This is for internal use only.
#_ansible_coverage_remote_output: ''
# No syslog on target(boolean): Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log.
#ansible_no_target_syslog: false
# Gather Facts Modules(list): Which modules to run during a play's fact gathering stage, using the default of 'smart' will try to figure it out based on connection type.
#If adding your own modules but you still want to use the default Ansible facts, you will want to include 'setup' or corresponding network module to the list (if you add 'smart', Ansible will also figur
#This does not affect explicit calls to the 'setup' module, but does always affect the 'gather_facts' action (implicit or explicit).
#ansible_facts_modules:
- smart
# Python interpreter path (or automatic discovery behavior) used for module execution(string): Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery
#ansible_python_interpreter: auto
# Adjust maximum file descriptor soft limit during Python module execution(string): Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess
#ansible_python_module_rlimit_nofile: 0
# Windows Async Startup Timeout(integer): For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connec
#This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has conn
#ansible_win_async_startup_timeout: 5
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78438 | https://github.com/ansible/ansible/pull/78453 | 2729088f2aa23a19fa3a561d7bf94770d8278477 | 740864869ef589d453ac8cdadd6017e84c1ff6ab | 2022-08-04T07:10:53Z | python | 2022-08-11T19:20:59Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,425 | ["changelogs/fragments/become-loop-setting.yml", "lib/ansible/executor/task_executor.py", "test/integration/targets/loop-connection/aliases", "test/integration/targets/loop-connection/collections/ansible_collections/ns/name/meta/runtime.yml", "test/integration/targets/loop-connection/collections/ansible_collections/ns/name/plugins/connection/dummy.py", "test/integration/targets/loop-connection/main.yml", "test/integration/targets/loop-connection/runme.sh", "test/units/executor/test_task_executor.py"] | task executor not checking become changes on active connections | ### Summary
The code that checks the connection + become details in a loop is not applying the become state on connections that have the `connected` attribute set to `True`. If connected is `True` the else block will just re-use the existing connection plugin which won't have the `become` details from the first task on it.
https://github.com/ansible/ansible/blob/27ce607a144917e6b9a453813a7df6bbc9ea2213/lib/ansible/executor/task_executor.py#L562-L572
Note there are some other bugs that mask this problem:
* ssh never sets `connected = True` so will always re-create the connection and subsequently the updated become info
* Using `ansible_connection=paramiko` also works because it never matches the connection `_load_name` of `paramiko_ssh`
* Redirected collections will most likely also mask the problem because of the load_name vs `ansible_connection` value check which is most certainly wrong.
The code needs to be updated to do a proper check for the connection name `self._connection._load_name != current_connection` to actually work properly with redirected plugins and aliased names like paramiko and paramiko_ssh. The code also needs to be updated so that if a connection is re-used then the become plugin needs to be added/deleted if necessary.
The connection should also be closed when being dropped as well.
### Issue Type
Bug Report
### Component Name
task_executor
connection
become
### Ansible Version
```console
$ ansible --version
ansible [core 2.14.0.dev0] (low-level-become e91a069260) last updated 2022/08/03 08:18:13 (GMT +1000)
config file = None
configured module search path = ['/home/jborean/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/jborean/dev/ansible/lib/ansible
ansible collection location = /home/jborean/dev:/home/jborean/ansible/collections:/usr/share/ansible/collections
executable location = /home/jborean/.pyenv/versions/ansible-310/bin/ansible
python version = 3.10.2 (main, Jan 18 2022, 12:56:09) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] (/home/jborean/.pyenv/versions/3.10.2/envs/ansible-310/bin/python3.10)
jinja version = 3.1.1
libyaml = True
```
### Configuration
```console
N/A
```
### OS / Environment
N/A
### Steps to Reproduce
```yaml
- command: whoami
become: '{{ item }}'
with_items:
- true
- false
```
Doing `false` first reversed the problem where the 2nd iteration will not run with become
### Expected Results
First task is run with become and the 2nd is run without.
### Actual Results
```console
Both tasks are run with the first `become` value set.
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78425 | https://github.com/ansible/ansible/pull/78565 | be4807b712d83370561942aa7c3c7f2141759077 | ba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | 2022-08-02T23:20:36Z | python | 2022-09-29T23:06:10Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,423 | ["docs/docsite/rst/dev_guide/developing_python_3.rst", "docs/docsite/rst/installation_guide/intro_installation.rst"] | Document Python version requirements for managed nodes | ### Summary
Change 2fc73a9dc357e776dbbbfd035c86fe880415e60a suggests a documentation section "managed node requirements" but AFAICS, this does not exist.
I would be happy to construct such a section, if there is clarity on what the requirements are. I am presuming from context (_"and while Python 2 is not a concern anymore"_ from that change) that Python 2 was dropped as a supported platform on managed nodes at some point?
https://github.com/ansible/ansible/pull/77499#issuecomment-1095400484 suggests this can be backported to 2.11? So that would be the point Python 2 was dropped?
I'm presuming that as far back as 3.5 would still be supported for some time on the managed nodes? Is there any clarity around that?
### Issue Type
Bug Report
### Component Name
doc
### Ansible Version
```console
devel
```
### Configuration
```console
all
```
### OS / Environment
all
### Steps to Reproduce
read docs
### Expected Results
Managed node requirements shown
### Actual Results
```console
404 to https://docs.ansible.com/ansible/latest/dev_guide/:ref:managed-node-requirements
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
c.f. downstream issue https://review.opendev.org/c/zuul/zuul-jobs/+/851343/1 | https://github.com/ansible/ansible/issues/78423 | https://github.com/ansible/ansible/pull/78468 | e0eb45e753e80e324e18c2ef79c1981e30c86ca2 | 1e6730aec4363744a390cd0357dbf9db3647a85c | 2022-08-02T23:14:03Z | python | 2022-08-18T18:48:51Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,400 | ["docs/docsite/rst/dev_guide/developing_collections_creating.rst"] | "collection init" command generates wrong file structure | ### Summary
As is indicated [in the documentation](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_creating.html#creating-collections-skeleton):
```
To start a new collection:
collection_dir#> ansible-galaxy collection init my_namespace.my_collection
```
So, that suggests the collection skeleton will be created in the current folder. Instead, creates the structure:
`namespace/collection-name/[collection-skeleton]`
This is confuse, because the current dir is not the expected root dir for the rest of the commands like install or build.
I think the command should create the skeleton in the current dir.
### Issue Type
Bug Report
### Component Name
ansible-galaxy
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.3]
config file = None
configured module search path = ['/home/alex/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/alex/.local/lib/python3.9/site-packages/ansible
ansible collection location = /home/alex/.ansible/collections:/usr/share/ansible/collections
executable location = /home/alex/.local/bin/ansible
python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)]
jinja version = 2.11.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
not relevant
```
### OS / Environment
Fedora 34
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```sh (paste below)
ansible-galaxy collection init some-namespace.some-name
```
### Expected Results
The skeleton should be created in the current directory, instead of creating `namespace/collection-name/[collection-skeleton]`
```
.
βββ docs
βββ galaxy.yml
βββ plugins
βΒ Β βββ README.md
βββ README.md
βββ roles
```
### Actual Results
```console
.
βββ namespace
βββ collection_name
βββ docs
βββ galaxy.yml
βββ plugins
βΒ Β βββ README.md
βββ README.md
βββ roles
```
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78400 | https://github.com/ansible/ansible/pull/78404 | 98a5820da6f1ad9b17c5e6e331779553573fc881 | 69c7e3f4a3e244b28eef919ff2c1356ea6d06b1c | 2022-08-01T14:27:32Z | python | 2022-08-09T19:13:42Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,371 | ["changelogs/fragments/pause_echo_fix.yml", "lib/ansible/plugins/action/pause.py"] | ansible.builtin.pause always reports echo: true as a result | ### Summary
I was looking into avoiding recoding values prompted by the pause module in ara and I realised that the echo's return value is hardcoded to true, always has been according to git. The value is set to true in the result before actually checking the task arguments:
https://github.com/ansible/ansible/blob/b86a18bd273499f5d10e581821a47571690660e1/lib/ansible/plugins/action/pause.py#L136-L149
### Issue Type
Bug Report
### Component Name
pause
### Ansible Version
```console
$ ansible --version
ansible [core 2.12.7]
config file = /home/demarteaub/projects/infra/ansible/ansible.cfg
configured module search path = ['/home/demarteaub/projects/infra/ansible/vendors/library', '/home/demarteaub/projects/infra/ansible/library']
ansible python module location = /home/demarteaub/.local/share/virtualenvs/ansible-JeMCc-2q/lib/python3.8/site-packages/ansible
ansible collection location = /home/demarteaub/projects/infra/ansible/vendors/collections:/home/demarteaub/projects/infra/ansible/collections
executable location = /home/demarteaub/.local/share/virtualenvs/ansible-JeMCc-2q/bin/ansible
python version = 3.8.12 (default, May 10 2022, 23:46:40) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_PIPELINING(/home/demarteaub/projects/infra/ansible/ansible.cfg) = True
CALLBACKS_ENABLED(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['ansible.posix.profile_tasks', 'ara_default']
COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ignore
COLLECTIONS_PATHS(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['/home/demarteaub/projects/infra/ansible/vendors/collections', '/home/demarteaub/projects/infra/ansible/collections']
DEFAULT_CALLBACK_PLUGIN_PATH(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['/venv/lib/python3.8/site-packages/ara/plugins/callback', '/home/demarteaub/projects/infra/ansible/vendors/callbacks', '/home/demarteaub/projects/infra/ansible/library/callbacks']
DEFAULT_HOST_LIST(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['/home/demarteaub/projects/infra/ansible/inventory/inventory.ini']
DEFAULT_MODULE_PATH(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['/home/demarteaub/projects/infra/ansible/vendors/library', '/home/demarteaub/projects/infra/ansible/library']
DEFAULT_MODULE_UTILS_PATH(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['/home/demarteaub/projects/infra/ansible/library/module_utils']
DEFAULT_ROLES_PATH(/home/demarteaub/projects/infra/ansible/ansible.cfg) = ['/home/demarteaub/projects/infra/ansible/vendors/roles', '/home/demarteaub/projects/infra/ansible/roles']
DEFAULT_STDOUT_CALLBACK(/home/demarteaub/projects/infra/ansible/ansible.cfg) = yaml
DEFAULT_TIMEOUT(/home/demarteaub/projects/infra/ansible/ansible.cfg) = 5
DEFAULT_VAULT_ID_MATCH(/home/demarteaub/projects/infra/ansible/ansible.cfg) = true
DIFF_ALWAYS(/home/demarteaub/projects/infra/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/home/demarteaub/projects/infra/ansible/ansible.cfg) = /usr/bin/python3
INVENTORY_UNPARSED_IS_FAILED(/home/demarteaub/projects/infra/ansible/ansible.cfg) = True
BECOME:
======
CACHE:
=====
CALLBACK:
========
CLICONF:
=======
CONNECTION:
==========
ssh:
___
pipelining(/home/demarteaub/projects/infra/ansible/ansible.cfg) = True
reconnection_retries(/home/demarteaub/projects/infra/ansible/ansible.cfg) = 1
ssh_args(/home/demarteaub/projects/infra/ansible/ansible.cfg) = -o PreferredAuthentications=publickey
ssh_executable(/home/demarteaub/projects/infra/ansible/ansible.cfg) = /usr/bin/ssh
timeout(/home/demarteaub/projects/infra/ansible/ansible.cfg) = 5
HTTPAPI:
=======
INVENTORY:
=========
LOOKUP:
======
NETCONF:
=======
SHELL:
=====
VARS:
====
```
### OS / Environment
RockyLinux 8
### Steps to Reproduce
```shell
$ ansible -i localhost, -m pause -a echo=false -a prompt=plz all
[WARNING]: Skipping callback plugin 'ara_default', unable to load
[pause]
plz:
no^M
```
### Expected Results
```shell
localhost | SUCCESS => {
"changed": false,
"delta": 0,
"echo": false,
"rc": 0,
"start": "2022-07-28 15:49:13.411063",
"stderr": "",
"stdout": "Paused for 0.01 minutes",
"stop": "2022-07-28 15:49:14.200542",
"user_input": "no"
}
```
### Actual Results
```console
localhost | SUCCESS => {
"changed": false,
"delta": 0,
"echo": true,
"rc": 0,
"start": "2022-07-28 15:49:13.411063",
"stderr": "",
"stdout": "Paused for 0.01 minutes",
"stop": "2022-07-28 15:49:14.200542",
"user_input": "no"
}
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78371 | https://github.com/ansible/ansible/pull/78378 | b0b58fa7c2a5ae4bda1b186d40ba8bf0f09f6d01 | e4890afc4e2af6c5126d056a2b4fdb1f1f122cf6 | 2022-07-28T13:50:18Z | python | 2022-07-29T13:11:20Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,348 | ["changelogs/fragments/a-g-col-install-directory-with-trailing-sep.yml", "lib/ansible/galaxy/dependency_resolution/dataclasses.py", "test/integration/targets/ansible-galaxy-collection/tasks/install.yml"] | ansible-galaxy collection install fails with `dir` type: "No such file or directory" | ### Summary
```sh
ansible-galaxy install -r requirements.yml
```
doesn't work when pointing at a collection root directory
```yaml
collections:
- name: widespot.group_yaml_inventory
source: ../
type: dir
```
I get an error
> ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'../ansible-group-yaml-inventory/est/README.md'
but it works with a build phase, and later pointing at the tarball
```
ansible-galaxy collection build --output-path ../build ../
```
```yaml
collections:
- name: widespot.group_yaml_inventory
source: ../build/widespot-group_yaml_inventory-0.1.1.tar.gz
type: file
```
### Issue Type
Bug Report
### Component Name
ansible-galaxy
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.1]
config file = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg
configured module search path = ['/Users/raphaeljoie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/homebrew/Cellar/ansible/6.0.0/libexec/lib/python3.10/site-packages/ansible
ansible collection location = /Users/raphaeljoie/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/homebrew/bin/ansible
python version = 3.10.5 (main, Jun 23 2022, 17:14:57) [Clang 13.1.6 (clang-1316.0.21.2.5)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_HOST_LIST(/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg) = ['/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/inventory.yml']
INVENTORY_ENABLED(/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg) = ['widespot.group_yaml_inventory.group_yaml']
```
### OS / Environment
OSX 12.0.1, on Macbook Silicon M1
### Steps to Reproduce
1. clone [this repo](https://github.com/widespot/ansible-group-yaml-inventory/tree/cfbbd80d276a887027b49d4b0807b116e23b4d92) (mind the commit)
2. `cd test`
3. execute 3 commands listed in `test/README.md`
```sh
mkdir ../build
ansible-galaxy collection build --force --output-path ../build ../
ansible-galaxy install -r --force requirements.yml
ansible-inventory --list
```
=> β
working
4. change requirements.yml: uncomment the lines related to directory import
```yaml
#source: ../
#type: dir
```
5. re-try force install
```sh
ansible-galaxy install -r --force requirements.yml
```
=> β fail
## Important investigation note
`ansible-galaxy` build and install seems to generate a `FILES.json` file.
* When installing via tarball, the paths in that files are ok
* When installing via directory relative path, all the paths in that files are truncated
```
$ cat $HOME/.ansible/collections/ansible_collections/widespot/group_yaml_inventory/FILES.json
...
{
"name": "lugins/README.md",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "23e9939164cad964c2338b8059e4d3def72eef9523e32594503efd50960fcae4",
"format": 1
},
...
```
### Expected Results
I expect install to work with `dir` same as `file` after `install`
### Actual Results
```console
ansible-galaxy [core 2.13.2]
config file = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg
configured module search path = ['/Users/raphaeljoie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible
ansible collection location = /Users/raphaeljoie/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/bin/ansible-galaxy
python version = 3.9.12 (main, May 8 2022, 17:57:49) [Clang 13.1.6 (clang-1316.0.21.2)]
jinja version = 3.1.2
libyaml = True
Using /Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/ansible.cfg as config file
Reading requirement file at '/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/test/requirements.yml'
Starting galaxy collection install process
Found installed collection widespot.group_yaml_inventory:0.1.1 at '/Users/raphaeljoie/.ansible/collections/ansible_collections/widespot/group_yaml_inventory'
Process install dependency map
Starting collection install process
Installing 'widespot.group_yaml_inventory:0.1.1' to '/Users/raphaeljoie/.ansible/collections/ansible_collections/widespot/group_yaml_inventory'
Skipping '../venv' for collection build
Skipping '../.git' for collection build
Skipping '../galaxy.yml' for collection build
ERROR! Unexpected Exception, this is probably a bug: [Errno 2] No such file or directory: b'../est/README.md'
the full traceback was:
Traceback (most recent call last):
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/__init__.py", line 601, in cli_executor
exit_code = cli.run()
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 647, in run
return context.CLIARGS['func']()
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 102, in method_wrapper
return wrapped_method(*args, **kwargs)
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 1297, in execute_install
self._execute_install_collection(
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 1325, in _execute_install_collection
install_collections(
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 745, in install_collections
install(concrete_coll_pin, output_path, artifacts_manager)
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1308, in install
install_src(collection, b_artifact_path, b_collection_path, artifacts_manager)
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1446, in install_src
collection_output_path = _build_collection_dir(
File "/Users/raphaeljoie/Workspace/github.com/widespot/ansible-group-yaml-inventory/venv/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1234, in _build_collection_dir
existing_is_exec = os.stat(src_file).st_mode & stat.S_IXUSR
FileNotFoundError: [Errno 2] No such file or directory: b'../est/README.md'
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78348 | https://github.com/ansible/ansible/pull/79110 | 676b731e6f7d60ce6fd48c0d1c883fc85f5c6537 | 964e678a7fa3b0745f9302e7a3682851089d09d2 | 2022-07-25T22:25:47Z | python | 2023-04-17T19:24:55Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,347 | ["docs/docsite/rst/dev_guide/developing_collections_distributing.rst", "docs/docsite/rst/reference_appendices/glossary.rst", "docs/docsite/rst/shared_snippets/installing_collections.txt", "docs/docsite/rst/user_guide/collections_using.rst"] | Clarify in docs that Community Galaxy cannot provide signatures | ### Summary
The documentation seems to imply that the community Galaxy server can supply signatures, which it can't. Clarify that only AH and self-hosted pulp or on-prem hub servers will have signatures available:
https://github.com/ansible/ansible/pull/78326/files#diff-3147c791e9e90d93c0f1468a3d5769f74d598bf69ed68f3553544454d36b3fc5R276-R285
### Issue Type
Documentation Report
### Component Name
docs/docsite/rst/user_guide/collections_using.rst
### Ansible Version
```console
$ ansible --version
2.13
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
none
```
### OS / Environment
none
### Additional Information
Fix needs to be backported to 2.13 as well
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78347 | https://github.com/ansible/ansible/pull/78386 | ccf1a631585149c612250f466044f88b43518393 | 7ae1eabaa41080fc97e0155919471f57dba23825 | 2022-07-25T19:53:08Z | python | 2022-08-16T20:05:06Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,295 | ["changelogs/fragments/78295-dnf-fix-comparison-operators-docs.yml", "lib/ansible/modules/dnf.py"] | DNF - Comparison operators for package version not working | ### Summary
It is not possible to use versions for installing packages like it is documented:
> - Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example - C(name>=1.0)
I tried this:
```yaml
- name: "Install packages"
become: true
ansible.builtin.dnf:
allow_downgrade: True
update_cache: True
state: present
name:
- mypackage>=0.1.2-3.el8
- mypackage>=0.1.2-3
- mypackage>=0.1.2
- C(mypackage>=0.1.2-3.el8)
```
The only thing that works is `mypackage-0.1.2-3.el8`.
### Issue Type
Bug Report
### Component Name
dnf
### Ansible Version
```console
$ ansible --version
ansible 2.9.27
config file = /home/ngoeddel/git/ansible-v2/ansible.cfg
configured module search path = ['/home/ngoeddel/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Apr 12 2022, 06:55:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
COLLECTIONS_PATHS(/home/ngoeddel/git/ansible-v2/ansible.cfg) = ['/home/ngoeddel/git/ansible-v2/collections']
COMMAND_WARNINGS(/home/ngoeddel/git/ansible-v2/ansible.cfg) = False
DEFAULT_FILTER_PLUGIN_PATH(/home/ngoeddel/git/ansible-v2/ansible.cfg) = ['/home/ngoeddel/git/ansible-v2/filter_plugins']
DEFAULT_HOST_LIST(/home/ngoeddel/git/ansible-v2/ansible.cfg) = ['/home/ngoeddel/git/ansible-v2/environment/openi-epu6/dev']
DEFAULT_ROLES_PATH(/home/ngoeddel/git/ansible-v2/ansible.cfg) = ['/home/ngoeddel/git/ansible-v2/roles']
DEFAULT_STDOUT_CALLBACK(/home/ngoeddel/git/ansible-v2/ansible.cfg) = debug
DEFAULT_STRATEGY(/home/ngoeddel/git/ansible-v2/ansible.cfg) = linear
DEFAULT_TIMEOUT(/home/ngoeddel/git/ansible-v2/ansible.cfg) = 30
DEFAULT_VAULT_PASSWORD_FILE(/home/ngoeddel/git/ansible-v2/ansible.cfg) = /home/ngoeddel/.my.ansible.cnf
DISPLAY_SKIPPED_HOSTS(/home/ngoeddel/git/ansible-v2/ansible.cfg) = False
INTERPRETER_PYTHON(/home/ngoeddel/git/ansible-v2/ansible.cfg) = /usr/bin/python3
RETRY_FILES_ENABLED(/home/ngoeddel/git/ansible-v2/ansible.cfg) = False
```
### OS / Environment
Rocky Linux release 8.6 (Green Obsidian)
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: "Install packages"
become: true
ansible.builtin.dnf:
allow_downgrade: True
update_cache: True
state: present
name:
- mypackage>=0.1.2-3.el8
- mypackage>=0.1.2-3
- mypackage>=0.1.2
- C(mypackage>=0.1.2-3.el8)
```
### Expected Results
I expect it to install the package `mypackage` in at least version 0.1.2-3.el8 or higher if not already installed.
### Actual Results
```console
fatal: [somehost]: FAILED! => {
"changed": false,
"failures": [
"No package C(mypackage>=0.1.2-4.el8) available."
],
"rc": 1,
"results": []
}
MSG:
Failed to install some of the specified packages
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78295 | https://github.com/ansible/ansible/pull/78316 | 7aada8d499dd44bfdc351fb6ab9f5531ae24907b | b0a84cc9ca13b3feb0202c677a0547f9ef415f62 | 2022-07-19T10:26:30Z | python | 2022-07-21T17:39:17Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,288 | ["changelogs/fragments/pep440-version-type.yml", "docs/docsite/rst/playbook_guide/playbooks_tests.rst", "lib/ansible/plugins/test/core.py", "lib/ansible/plugins/test/version.yml", "lib/ansible/plugins/test/version_compare.yml", "test/integration/targets/test_core/tasks/main.yml"] | The version test can't handle ansible_version for an RC release | ### Summary
When trying to compare `ansible_version.full` with a value using the [version test](https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#comparing-versions) for an RC release such as `2.13.2rc1` there is no good comparator to use:
* `strict` and `semver` consider this an invalid version number
* `loose` considers this a postrelease
I think Ansible should be able to correctly compare its own versioning scheme using the `strict` versioning, hence I'm filing this as a bug.
For reference, we're seeing this issue in https://github.com/DataDog/ansible-datadog/issues/445.
### Issue Type
~Bug Report~
Feature Idea
### Component Name
lib/ansible/module_utils/compat/version.py
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.2rc1]
config file = /Users/slavek.kabrda/programming/ansible.cfg
configured module search path = ['/Users/slavek.kabrda/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/slavek.kabrda/programming/ansible-venv-rc/lib/python3.9/site-packages/ansible
ansible collection location = /Users/slavek.kabrda/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/slavek.kabrda/programming/ansible-venv-rc/bin/ansible
python version = 3.9.13 (main, May 24 2022, 21:28:31) [Clang 13.1.6 (clang-1316.0.21.2)]
jinja version = 3.1.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_CALLBACK_PLUGIN_PATH(/Users/slavek.kabrda/programming/ansible.cfg) = ['/Users/slavek.kabrda/.ansible/plugins/callback']
DEFAULT_HOST_LIST(/Users/slavek.kabrda/programming/ansible.cfg) = ['/Users/slavek.kabrda/hosts']
HOST_KEY_CHECKING(/Users/slavek.kabrda/programming/ansible.cfg) = False
CONNECTION:
==========
paramiko_ssh:
____________
host_key_checking(/Users/slavek.kabrda/programming/ansible.cfg) = False
ssh:
___
host_key_checking(/Users/slavek.kabrda/programming/ansible.cfg) = False
```
### OS / Environment
I think the only relevant environment is having an RC version of ansible-core, I have `2.13.2rc1`.
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: "Test ansible version"
command: "echo foo"
when: ansible_version.full is version("2.11", operator="lt", strict=True)
```
### Expected Results
Command passes.
### Actual Results
```console
The error was: Version comparison failed: invalid semantic version '2.13.2rc1'
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78288 | https://github.com/ansible/ansible/pull/78308 | 9d4ced1237380051334b54379ff64e45c0341a6d | 1429672213af648aef239138745d593e2920ebdd | 2022-07-18T13:05:48Z | python | 2022-07-21T20:56:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,283 | ["changelogs/fragments/ansible-test-locale.yml", "test/lib/ansible_test/_internal/__init__.py", "test/lib/ansible_test/_internal/delegation.py", "test/lib/ansible_test/_internal/locale_util.py", "test/lib/ansible_test/_internal/util.py"] | CI started to fail because of locale error against devel | ### Summary
Problem detected on community.grafana collection.
The CI fails because of the following error:
```
ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
```
[Link to the github actions logs](https://github.com/ansible-collections/community.grafana/runs/7376131642?check_suite_focus=true).
Edit: I edited my workflow to let all the job run and disable fail-fast. It makes it visible that issue only happens on devel:
https://github.com/ansible-collections/community.grafana/runs/7376236257?check_suite_focus=true
### Issue Type
Bug Report
### Component Name
core ?
### Ansible Version
```console
devel
(`pip install https://github.com/ansible/ansible/archive/devel.tar.gz`)
```
### Configuration
```console
N/A
```
### OS / Environment
ubuntu 20.04.4
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
On `community.grafana` collection
```yaml (paste below)
ansible-test integration -v --color --retry-on-error --requirements --python 3.8 --continue-on-error --diff --coverage
```
### Expected Results
No error related to locale.
### Actual Results
```console
ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78283 | https://github.com/ansible/ansible/pull/78389 | 27ce607a144917e6b9a453813a7df6bbc9ea2213 | d8fefba20e8023822749d538db7e69f0fc86710e | 2022-07-17T07:57:25Z | python | 2022-08-02T23:59:14Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,264 | ["changelogs/fragments/interpreter_discovery.yml", "lib/ansible/executor/interpreter_discovery.py", "test/units/executor/test_interpreter_discovery.py"] | If python discovery fails due to a connection error, it defaults to /usr/bin/python and then continues to try to execute the intended command regardless | ### Summary
When the auto discovery method is used, python discovery happens first, and then the task command is executed.
However, if there is a connection problem, depending on the timing of when the connection gets restored, the python discovery could fail due to an AnsibleConnectionFailure, ignore it, and return /usr/bin/python. Then, the task command is executed with the wrong python interpreter.
It should be that if the python discovery fails (at least due to Connection failures - you could decide there are other cases where this should occur), that the command immediately fails. Or at least have an option to allow this behavior.
Here is the informal code change that we made to enable this behavior in /usr/local/lib/python3.8/site-packages/ansible/executor/interpreter_discovery.py:
```
@@ -14,6 +14,7 @@
from ansible.module_utils.distro import LinuxDistribution
from ansible.utils.display import Display
from ansible.utils.plugin_docs import get_versioned_doclink
+from ansible.errors import AnsibleConnectionFailure
from distutils.version import LooseVersion
from traceback import format_exc
@@ -146,6 +147,8 @@
return platform_interpreter
except NotImplementedError as ex:
display.vvv(msg=u'Python interpreter discovery fallback ({0})'.format(to_text(ex)), host=host)
+ except AnsibleConnectionFailure as ex:
+ raise ex
except Exception as ex:
if not is_silent:
display.warning(msg=u'Unhandled error in Python interpreter discovery for host {0}: {1}'.format(host, to_text(ex)))
```
Simply allow the exception to fall-through to fail the task with a connection error, which will fail the task appropriately or allow the connection plugins to handle it appropriately.
### Issue Type
Bug Report
### Component Name
interpreter_python.py
### Ansible Version
```console
$ ansible --version
ansible [core 2.11.5]
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.8.6 (default, Jan 22 2021, 11:41:28) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
jinja version = 3.0.2
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
RHEL8
### Steps to Reproduce
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
ansible <host> -m ping -vvv
```
on a host that is down
### Expected Results
if the discovery fails due to a connection problem, the task fails
### Actual Results
```console
if the discovery fails due to a connection problem, it tries to execute the rest of the task anyway
```
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78264 | https://github.com/ansible/ansible/pull/81745 | 62c10199d11428f014ed999a533487e69f4832b3 | 86fd7026a88988c224ae175a281e7e6e2f3c5bc3 | 2022-07-14T18:30:50Z | python | 2023-09-21T18:13:40Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 78,198 | ["docs/docsite/rst/dev_guide/testing/sanity/ignores.rst"] | Examples in ansible-test sanity ignores are out-of-date | ### Summary
https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/ignores.html#ignore-file-format examples here are not up-to-date, and especially with #67032, this is a bit difficult to get working. After looking around in the source code for a bit, we were able to figure out that `E105` is just not used anymore, but finding this was difficult.
### Issue Type
Documentation Report
### Component Name
https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/dev_guide/testing/sanity/ignores.rst
### Ansible Version
```console
$ ansible --version
ansible [core 2.13.1]
config file = None
configured module search path = ['/home/jcgruenhage/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.10/site-packages/ansible
ansible collection location = /home/jcgruenhage/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.5 (main, Jun 8 2022, 02:00:39) [GCC 10.2.1 20201203]
jinja version = 3.0.3
libyaml = True
```
### Configuration
```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
```
### OS / Environment
Void Linux
### Additional Information
Improved documentation here would help people who need to ignore specific tests because they aren't applicable in their certain case, like the GPLv3 header for situations like internal modules, or even modules licensed under stricter licenses such as the AGPLv3 (which we do have in certain cases as well).
### Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct | https://github.com/ansible/ansible/issues/78198 | https://github.com/ansible/ansible/pull/78342 | a3c90dd0bcb4aecfc64a4a584e52aec77ee61158 | 0f688f07af8d84cff71726eb855ee6ae5e6e352d | 2022-07-04T10:39:03Z | python | 2022-07-27T16:33:35Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.