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
76,734
["changelogs/fragments/include_vars_failed.yml", "lib/ansible/plugins/action/include_vars.py"]
include_vars dir doesn't work with a temporary folder
### Summary I obtain a error with include_vars when the input folder was created by ``tempfile`` instead of ``file`` ```` TASK [load inventories into variable] ********************************************************************************************************************* An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnboundLocalError: local variable 'failed' referenced before assignment fatal: [master]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""} ```` but if I use this instead it will works ```` - name: create temp folder file: path: /tmp/ansible-inventory-sources state: directory register: tmp_folder ```` the result ```` TASK [load inventories into variable] ********************************************************************************************************************* ok: [master] => {"ansible_facts": {"stuff": {"all": {"children": {"masters": {"hosts": {"master": {"ansible_connection": "local", "ansible_host": "192.168.51.180", "domain": "clustervagrant.dynamic.local", "fqdn": "ns1.clustervagrant.local"}}}, "workers": {"hosts": {"worker1": {"ansible_host": "192.168.51.181"}}, "vars": {"ansible_connection": "ssh", "ansible_ssh_pass": "vagrant", "ansible_ssh_user": "vagrant", "ansible_sudo_pass": "vagrant"}}}}, "coucou": {"allo": true}}}, "ansible_included_var_files": ["/tmp/ansible-inventory-sources/inventory-test", "/tmp/ansible-inventory-sources/inventory-vagrant"], "changed": false} PLAY RECAP ************************************************************************************************************************************************ master : ok=8 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```` ### Issue Type Bug Report ### Component Name include_vars ### Ansible Version ```console $ ansible --version vagrant@k8s-master:/vagrant/test-templates$ ansible --version ansible [core 2.12.1] config file = /vagrant/test-templates/ansible.cfg configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible ansible collection location = /home/vagrant/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0] jinja version = 2.10.1 libyaml = True vagrant@k8s-master:/vagrant/test-templates$ ``` ### Configuration ```console $ ansible-config dump --only-changed vagrant@k8s-master:/vagrant/test-templates/inventory$ ansible-config dump --only-changed vagrant@k8s-master:/vagrant/test-templates/inventory$ ``` ### OS / Environment ```` vagrant@k8s-master:/vagrant/test-templates/inventory$ uname -a Linux k8s-master 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux vagrant@k8s-master:/vagrant/test-templates/inventory$ ```` ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml --- - hosts: "masters" become: yes become_method: sudo become_user: root gather_facts: yes connection: ssh tasks: - name: debug through ansible.env debug: var=ansible_env.HOME - name: debug through ansible.env debug: var=ansible_inventory_sources - name: create temp folder tempfile: path: /tmp prefix: ansible-inventory state: directory register: tmp_folder # WORKS IF I USE THIS BELLOW TO CREATE THE FOLDER # - name: create temp folder # file: # path: /tmp/ansible-inventory-sources # state: directory # register: tmp_folder - name: tmp_folder debug: var=tmp_folder - name: create temp folder structure shell: mkdir -p $(dirname '{{tmp_folder.path}}{{item}}') with_items: - "{{ansible_inventory_sources}}" - name: file inventory used into tmp folder copy: src: "{{item}}" dest: "{{tmp_folder.path}}" with_items: - "{{ansible_inventory_sources}}" - name: load inventories into variable include_vars: dir: "{{tmp_folder.path}}" ignore_unknown_extensions: no extensions: - '' - 'yaml' - 'yml' - 'json' name: stuff ``` ### Expected Results I expect the get the same result for **include_vars** is a use a folder created by ``file`` or ``tempfile`` ```` - name: create temp folder file: path: /tmp/ansible-inventory-sources state: directory register: tmp_folder - name: tmp_folder debug: var=tmp_folder - name: create temp folder structure shell: mkdir -p $(dirname '{{tmp_folder.path}}{{item}}') with_items: - "{{ansible_inventory_sources}}" - name: file inventory used into tmp folder copy: src: "{{item}}" dest: "{{tmp_folder.path}}" with_items: - "{{ansible_inventory_sources}}" - name: load inventories into variable include_vars: dir: "{{tmp_folder.path}}" ignore_unknown_extensions: no extensions: - '' - 'yaml' - 'yml' - 'json' name: stuff ```` the output ```` vagrant@k8s-master:/vagrant/test-templates$ ansible-playbook -i inventory/inventory-vagrant -i inventory/inventory-test playbooks/test-playbook.yaml -v Using /vagrant/test-templates/ansible.cfg as config file [WARNING]: Skipping key (allo) in group (coucou) as it is not a mapping, it is a <class 'bool'> PLAY [masters] ******************************************************************************************************************************************** TASK [Gathering Facts] ************************************************************************************************************************************ ok: [master] TASK [debug through ansible.env] ************************************************************************************************************************** ok: [master] => { "ansible_env.HOME": "/root" } TASK [debug through ansible.env] ************************************************************************************************************************** ok: [master] => { "ansible_inventory_sources": [ "/vagrant/test-templates/inventory/inventory-vagrant", "/vagrant/test-templates/inventory/inventory-test" ] } TASK [create temp folder] ********************************************************************************************************************************* changed: [master] => {"changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/tmp/ansible-inventory-sources", "size": 4096, "state": "directory", "uid": 0} TASK [tmp_folder] ***************************************************************************************************************************************** ok: [master] => { "tmp_folder": { "changed": true, "diff": { "after": { "path": "/tmp/ansible-inventory-sources", "state": "directory" }, "before": { "path": "/tmp/ansible-inventory-sources", "state": "absent" } }, "failed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/tmp/ansible-inventory-sources", "size": 4096, "state": "directory", "uid": 0 } } TASK [create temp folder structure] *********************************************************************************************************************** changed: [master] => (item=/vagrant/test-templates/inventory/inventory-vagrant) => {"ansible_loop_var": "item", "changed": true, "cmd": "mkdir -p $(dirname '/tmp/ansible-inventory-sources/vagrant/test-templates/inventory/inventory-vagrant')", "delta": "0:00:00.012595", "end": "2022-01-11 16:10:00.823954", "item": "/vagrant/test-templates/inventory/inventory-vagrant", "msg": "", "rc": 0, "start": "2022-01-11 16:10:00.811359", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} changed: [master] => (item=/vagrant/test-templates/inventory/inventory-test) => {"ansible_loop_var": "item", "changed": true, "cmd": "mkdir -p $(dirname '/tmp/ansible-inventory-sources/vagrant/test-templates/inventory/inventory-test')", "delta": "0:00:00.010872", "end": "2022-01-11 16:10:01.163583", "item": "/vagrant/test-templates/inventory/inventory-test", "msg": "", "rc": 0, "start": "2022-01-11 16:10:01.152711", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} TASK [file inventory used into tmp folder] **************************************************************************************************************** changed: [master] => (item=/vagrant/test-templates/inventory/inventory-vagrant) => {"ansible_loop_var": "item", "changed": true, "checksum": "8619f133048a1c3b62b02c25f974c19c763c144c", "dest": "/tmp/ansible-inventory-sources/inventory-vagrant", "gid": 0, "group": "root", "item": "/vagrant/test-templates/inventory/inventory-vagrant", "md5sum": "bd85cb52626fe2517fbc5aa988acf023", "mode": "0644", "owner": "root", "size": 474, "src": "/home/vagrant/.ansible/tmp/ansible-tmp-1641917401.2987561-334984-181990277684472/source", "state": "file", "uid": 0} changed: [master] => (item=/vagrant/test-templates/inventory/inventory-test) => {"ansible_loop_var": "item", "changed": true, "checksum": "bbc1139b095a847fb831b5d128bdeb98104b694b", "dest": "/tmp/ansible-inventory-sources/inventory-test", "gid": 0, "group": "root", "item": "/vagrant/test-templates/inventory/inventory-test", "md5sum": "3bd6b415977f647d3f288bef952d9003", "mode": "0644", "owner": "root", "size": 231, "src": "/home/vagrant/.ansible/tmp/ansible-tmp-1641917402.7306056-334984-106388615338814/source", "state": "file", "uid": 0} TASK [load inventories into variable] ********************************************************************************************************************* ok: [master] => {"ansible_facts": {"stuff": {"all": {"children": {"masters": {"hosts": {"master": {"ansible_connection": "local", "ansible_host": "192.168.51.180", "domain": "clustervagrant.dynamic.local", "fqdn": "ns1.clustervagrant.local"}}}, "workers": {"hosts": {"worker1": {"ansible_host": "192.168.51.181"}}, "vars": {"ansible_connection": "ssh", "ansible_ssh_pass": "vagrant", "ansible_ssh_user": "vagrant", "ansible_sudo_pass": "vagrant"}}}}, "coucou": {"allo": true}}}, "ansible_included_var_files": ["/tmp/ansible-inventory-sources/inventory-test", "/tmp/ansible-inventory-sources/inventory-vagrant"], "changed": false} PLAY RECAP ************************************************************************************************************************************************ master : ok=8 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```` ### Actual Results ```console ` ... TASK [load inventories into variable] ********************************************************************************************************************* An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnboundLocalError: local variable 'failed' referenced before assignment fatal: [master]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""} ```` ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76734
https://github.com/ansible/ansible/pull/76754
4676c08f188fb5dca98df61630c76dba1f0d2d77
89c884e2a2bd124b49bf9419f053f659a7d1c554
2022-01-11T16:25:31Z
python
2022-01-18T15:04:41Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,727
["changelogs/fragments/76727-chattr-fix-for-backups-of-symlinks.yml", "lib/ansible/module_utils/basic.py", "test/integration/targets/lineinfile/tasks/main.yml"]
lineinfile: Fails when creating a backup of Ubuntu 21.10's /etc/resolv.conf (symlink to "../run/systemd/resolve/stub-resolv.conf")
### Summary https://github.com/ansible/ansible/issues/31982 is back. ### Issue Type Bug Report ### Component Name lineinfile ### Ansible Version ```console $ ansible --version ansible 2.10.8 config file = None configured module search path = ['/root/.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.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0] ``` ### Configuration ```console $ ansible-config dump --only-changed $ ``` ### OS / Environment Ubuntu 21.10 Server in a VirtualBox, on server and clients, nothing special ### Steps to Reproduce ``` - name: "Check DNS configuration: Remove search list" ansible.builtin.lineinfile: backup: "yes" path: "/etc/resolv.conf" line: "search x.tld" state: "absent" - name: "Check DNS configuration: Cache servers present" ansible.builtin.lineinfile: backup: "yes" line: "{{ item }}" path: "/etc/resolv.conf" state: "present" with_items: - "nameserver x.x.x.x" - "nameserver y.y.y.y" ``` ### Expected Results The file is modified, a backup is created. ### Actual Results ```console <x.x.x.x> (1, b'\r\n{"path": "/etc/resolv.conf.2410.2022-01-11@10:36:56~", "details": "Error while setting attributes: /etc/resolv.conf.2410.2022-01-11@10:36:56~: Operation not supported\\n", "exception": "Traceback (most recent call last):\\n File \\"/tmp/ansible_ansible.builtin.lineinfile_payload_pvwbc704/ansible_ansible.builtin.lineinfile_payload.zip/ansible/module_utils/basic.py\\", line 1256, in set_attributes_if_different\\n raise Exception(\\"Error while setting attributes: %s\\" % (out + err))\\nException: Error while setting attributes: /etc/resolv.conf.2410.2022-01-11@10:36:56~: Operation not supported\\n\\n", "failed": true, "msg": "chattr failed", "uid": 101, "gid": 103, "owner": "systemd-resolve", "group": "systemd-resolve", "mode": "0644", "state": "file", "size": 920, "invocation": {"module_args": {"backup": true, "line": "nameserver x.x.x.x", "path": "/etc/resolv.conf", "state": "present", "backrefs": false, "create": false, "firstmatch": false, "unsafe_writes": false, "regexp": null, "insertafter": null, "insertbefore": null, "validate": null, "mode": null, "owner": null, "group": null, "seuser": null, "serole": null, "selevel": null, "setype": null, "attributes": null}}}\r\n', b'Shared connection to x.x.x.x closed.\r\n') <x.x.x.x> Failed to connect to the host via ssh: Shared connection to x.x.x.x closed. <x.x.x.x> ESTABLISH SSH CONNECTION FOR USER: root <x.x.x.x> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/4c20d84404 x.x.x.x '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1641897416.2652106-3817-66846454678877/ > /dev/null 2>&1 && sleep 0'"'"'' The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ansible.builtin.lineinfile_payload_bccsus14/ansible_ansible.builtin.lineinfile_payload.zip/ansible/module_utils/basic.py", line 1256, in set_attributes_if_different raise Exception("Error while setting attributes: %s" % (out + err)) Exception: Error while setting attributes: /etc/resolv.conf.2577.2022-01-11@10:36:56~: Operation not supported failed: [x.x.x.x] (item=nameserver x.x.x.x) => { "ansible_loop_var": "item", "changed": false, "details": "Error while setting attributes: /etc/resolv.conf.2577.2022-01-11@10:36:56~: Operation not supported\n", "gid": 103, "group": "systemd-resolve", "invocation": { "module_args": { "attributes": null, "backrefs": false, "backup": true, "create": false, "firstmatch": false, "group": null, "insertafter": null, "insertbefore": null, "line": "nameserver x.x.x.x", "mode": null, "owner": null, "path": "/etc/resolv.conf", "regexp": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "state": "present", "unsafe_writes": false, "validate": null } }, "item": "nameserver x.x.x.x", "mode": "0644", "msg": "chattr failed", "owner": "systemd-resolve", "path": "/etc/resolv.conf.2577.2022-01-11@10:36:56~", "size": 946, "state": "file", "uid": 101 } ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76727
https://github.com/ansible/ansible/pull/78707
dd0138ba2127eac0e809d68e00ae117df56db77e
9b002d2e63ec0d39c7c3025dfd4be7489c82016b
2022-01-11T11:07:14Z
python
2023-12-06T17:02:51Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,686
["lib/ansible/modules/_include.py"]
In 2.12 top-level include stops working, but removal is scheduled for 2.16
### Summary I have a top-level include like so: ``` - include: foo.yml ``` This worked fine in 2.11, but after updating to 2.12.1, I get: ~~~ ERROR! 'include' is not a valid attribute for a Play ~~~ I know `include` is deprecated and going away, but per the doc this shouldn't happen until 2.16. ### Issue Type Bug Report ### Component Name ansible-playbook ### Ansible Version ```console $ ansible --version ansible [core 2.12.1] config file = /home/tdowns/.ansible.cfg configured module search path = ['/home/tdowns/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible ansible collection location = /home/tdowns/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0] jinja version = 2.11.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed (no output) ``` ### OS / Environment Ubuntu 21.10 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) - include: foo.yml ``` ### Expected Results No error, perhaps a deprecation warning depending on your deprecation warnings setting. ### Actual Results ```console ansible-playbook bar.yml [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' ERROR! 'include' is not a valid attribute for a Play The error appears to be in '.../bar.yml': line 1, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - include: foo.yml ^ here ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76686
https://github.com/ansible/ansible/pull/77597
709ae7c050c8ad5aa0565b8d023303407f7ca9b6
d321fa3f15cefa853d646985b2a201233cdb47c8
2022-01-09T06:42:01Z
python
2022-04-26T18:23:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,684
["changelogs/fragments/77599-add-url-include-deprecation.yml", "lib/ansible/playbook/helpers.py"]
'"include" is deprecated, use include_tasks/import_tasks instead.' deprecation warning is without link to place explaining how to deal with it
### Summary I noticed > [DEPRECATION WARNING]: "include" is deprecated, use include_tasks/import_tasks instead. This feature will be removed in version 2.16. Sadly, this deprecation warning is without link to documentation explaining how it should be fixed I went to changelog: but https://github.com/ansible/ansible/blob/devel/changelogs/CHANGELOG.rst is not really helping with finding documentation searching `import_tasks include_tasks difference ansible` on internet found finally https://serverfault.com/questions/875247/whats-the-difference-between-include-tasks-and-import-tasks Every single person using Ansible will need to search for about 2 to 10 minutes - multiply it by number of Ansible users and there is quite big waste of time. If there is a good reason to deprecate something - please link to documentation explaining how to fix code that worked fine so far. Or maybe at least mention which version is equivalent to the current behaviour. (ideally there would be `ansible undeprecate_include` which would edit all instances of `include` to whichever version is matching current one and `ansible undeprecate_include include_tasks` which would use `include_tasks` and `ansible undeprecate_include import_tasks`) ### Issue Type Documentation Report ### Component Name ansible (sorry) ### Ansible Version ```console $ ansible --version ansible [core 2.12.1] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/mateusz/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible ansible collection location = /home/mateusz/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] jinja version = 2.10.1 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed (no visible output) ``` ### OS / Environment Lubuntu 20.04 ### Additional Information No googling needed to find docs, lower risk of finding misleading docs ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76684
https://github.com/ansible/ansible/pull/77599
578a815271a9a44a1f7d69888d6afef49e658d96
1802684c7b94cd323e573c5b89cc77e4e1552c83
2022-01-08T08:24:10Z
python
2022-04-25T15:44:31Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,676
["changelogs/fragments/fix_fax_delegation_loops.yml", "lib/ansible/executor/task_executor.py", "test/integration/targets/delegate_to/delegate_facts_loop.yml"]
set_fact behavior has changed with ansible release 2.12.1
### Summary Different ansible versions have different 'set_fact' behaviors. ### Issue Type Bug Report ### Component Name set_fact ### Ansible Version ```console ## Newest version on fedora 34 $ ansible --version ansible [core 2.12.1] config file = None configured module search path = ['/home/plewyllie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/plewyllie/.local/lib/python3.9/site-packages/ansible ansible collection location = /home/plewyllie/.ansible/collections:/usr/share/ansible/collections executable location = /home/plewyllie/.local/bin/ansible python version = 3.9.9 (main, Nov 19 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] jinja version = 2.11.3 libyaml = True ## Working version (on mac os x) ansible [core 2.11.6] config file = None configured module search path = ['/Users/plewyllie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible ansible collection location = /Users/plewyllie/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)] jinja version = 3.0.2 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment Fedora. I used Mac OS X to confirm the 'older' behavior to avoid a downgrade process. However, the previous version that I had on Fedora was working in the same way, it's updating ansible that has caused this issue to appear. ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ### Test Playbook ``` --- ## Naming VMs for OCP ## Each VM going through this list should have the new fact "vm_name" set to "cluster_name"-"initial_vm_name" - hosts: localhost gather_facts: no tasks: - set_fact: vm_name : "{{ cluster_name }}-{{ hostvars[item].inventory_hostname }}" delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['vms'] }}" - debug: msg: "{{ item }} vm_name {{ hostvars[item].vm_name }}" with_items: "{{ groups['vms'] }}" ``` ### Test inventory ``` [vms] install lb [all:vars] cluster_name=ocp4-pieter ``` ### Expected Results With ansible [core 2.11.6] the output will be: ``` TASK [debug] ************************************************************************************************************* ok: [localhost] => (item=install) => { "msg": "install vm_name ocp4-pieter-install" } ok: [localhost] => (item=lb) => { "msg": "lb vm_name ocp4-pieter-lb" } ``` With the newer ansible [core 2.12.1] the output looks like this: ``` TASK [debug] ************************************************************************************************************************* ok: [localhost] => (item=install) => { "msg": "install vm_name ocp4-pieter-lb" } ok: [localhost] => (item=lb) => { "msg": "lb vm_name ocp4-pieter-lb" } ``` I have also tried with the development branch: ``` (venv) [plewyllie@fedoravm ansible-issue]$ 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.13.0.dev0] (devel b984dd9c59) last updated 2022/01/07 16:00:28 (GMT +200) config file = None configured module search path = ['/home/plewyllie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/plewyllie/ansible-dev/ansible/lib/ansible ansible collection location = /home/plewyllie/.ansible/collections:/usr/share/ansible/collections executable location = /home/plewyllie/ansible-dev/ansible/bin/ansible python version = 3.9.9 (main, Nov 19 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] jinja version = 3.0.3 libyaml = True (venv) [plewyllie@fedoravm ansible-issue]$ ansible-playbook -i inventory main.yml [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. PLAY [localhost] ********************************************************************************************************* TASK [ansible.builtin.set_fact] ****************************************************************************************** ok: [localhost -> install] => (item=install) ok: [localhost -> lb] => (item=lb) TASK [debug] ************************************************************************************************************* ok: [localhost] => (item=install) => { "msg": "install vm_name ocp4-pieter-lb" } ok: [localhost] => (item=lb) => { "msg": "lb vm_name ocp4-pieter-lb" } PLAY RECAP *************************************************************************************************************** localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ### Actual Results ```console TASK [debug] ************************************************************************************************************************* ok: [localhost] => (item=install) => { "msg": "install vm_name ocp4-pieter-lb" } ok: [localhost] => (item=lb) => { "msg": "lb vm_name ocp4-pieter-lb" } ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76676
https://github.com/ansible/ansible/pull/77008
56edbd2bbb372a61dae2017923f1d8e33d1922d9
c9d3518d2f3812787e1627806b5fa93f8fae48a6
2022-01-07T15:04:07Z
python
2022-02-11T23:19:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,672
["changelogs/fragments/76672-fix-end_play-multiple_plays.yml", "lib/ansible/executor/playbook_executor.py", "test/integration/targets/meta_tasks/runme.sh", "test/integration/targets/meta_tasks/test_end_play_multiple_plays.yml"]
end_play not behave the same after upgrade to Ansible core 2.12
### Summary In Ansible core 2.11.6 environment, `end_play` will exit the current play and continue to run the following plays. While in Ansible core 2.12.1 environment, `end_play` will exit the entire playbook. Is this the expected result of the change? Thanks. ### Issue Type Bug Report ### Component Name meta ### Ansible Version ```console $ ansible --version ansible [core 2.12.1] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.8.12 (default, Dec 12 2021, 11:39:22) [GCC 7.3.0] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed No changes. ``` ### OS / Environment Ubuntu 18.04 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) - name: play1 hosts: localhost gather_facts: no tasks: - debug: msg: "play 1 task 1" - meta: end_play - debug: msg: "play 1 task 2" - name: play2 hosts: localhost gather_facts: no tasks: - debug: msg: "play 2 task 1" - debug: msg: "play 2 task 2" ``` ### Expected Results The task in the first play not executed after `end_play` and tasks in play 2 are executed. ### Actual Results ```console PLAYBOOK: test.yml *********************************************************************************************************************** 2 plays in test.yml PLAY [play1] ***************************************************************************************************************************** META: ran handlers TASK [debug] ***************************************************************************************************************************** task path: /root/workspace/test_yml/test_end_play/test.yml:5 ok: [localhost] => { "msg": "play 1 task 1" } TASK [meta] ****************************************************************************************************************************** task path: /root/workspace/test_yml/test_end_play/test.yml:7 META: ending play PLAY RECAP ******************************************************************************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` While in Ansible core 2.11.6 environment: ``` PLAYBOOK: test.yml *********************************************************************************************************************** 2 plays in test.yml PLAY [play1] ***************************************************************************************************************************** META: ran handlers TASK [debug] ***************************************************************************************************************************** task path: /root/test_yml/test_end_play/test.yml:5 ok: [localhost] => { "msg": "play 1 task 1" } TASK [meta] ****************************************************************************************************************************** task path: /root/test_yml/test_end_play/test.yml:7 META: ending play PLAY [play2] ***************************************************************************************************************************** META: ran handlers TASK [debug] ***************************************************************************************************************************** task path: /root/test_yml/test_end_play/test.yml:15 ok: [localhost] => { "msg": "play 2 task 1" } TASK [debug] ***************************************************************************************************************************** task path: /root/test_yml/test_end_play/test.yml:18 ok: [localhost] => { "msg": "play 2 task 2" } META: ran handlers META: ran handlers PLAY RECAP ******************************************************************************************************************************* localhost : ok=3 changed=0 unreachable=0 failed=0 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/76672
https://github.com/ansible/ansible/pull/76674
4a62c4e3e44b01a904aa86e9b87206a24bd41fbc
f78deccec2d4b5447f32d4fc67eaa549f479ccaa
2022-01-07T03:48:25Z
python
2022-01-11T15:27:42Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,663
["changelogs/fragments/ssh_debug_noparse.yml", "lib/ansible/plugins/connection/ssh.py", "test/units/plugins/connection/test_ssh.py"]
reboot module hangs when the verbosity is set to connection debug (-vvvv)
### Summary Even though reboot module performs as expected with the versobity 3 (-vvv), when I set it to 4 (-vvvv) it hangs. I tested 2.9.16, 2.9.27 and 2.12.0. I specified the `become_method=su`. When `become_method=sudo`, it timed out after 5 minutes and the job proceeds as expected. ### Issue Type Bug Report ### Component Name reboot ### Ansible Version ```console ### RHEL 8.2 $ ansible --version ansible 2.9.16 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.6/site-packages/ansible executable location = /usr/bin/ansible python version = 3.6.8 (default, Dec 5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] ### RHEL 8.5 $ ansible --version ansible [core 2.12.0] 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.8/site-packages/ansible ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.8.8 (default, Aug 11 2021, 06:52:42) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] jinja version = 2.10.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed $ (nothing special) ``` ### OS / Environment RHEL 8.2, 8.5 as a control node. Managed nodes are also RHEL 8.2 and 8.5 that I tested. ### Steps to Reproduce ### playbook.yml <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) --- - hosts: all gather_facts: false become: true tasks: - name: reboot reboot: post_reboot_delay: 30 ``` ### inventory ``` $ cat inventory ### RHEL 8.2 192.168.0.155 ansible_become_method=su #192.168.0.155 ansible_become_method=sudo ### RHEL 8.5 #192.168.0.154 ansible_become_method=su #192.168.0.154 ansible_become_method=sudo #192.168.0.154 ansible_become_method=su ansible_become_password=XXXXXXXX #192.168.0.154 ansible_become_method=sudo ansible_become_password=XXXXXXXX ``` ### command line When specified `-vvvv`, it hangs. ``` $ ansible-playbook -i inventory playbook.yml -k -K -vvvv ``` On the other hand `-vvv`, it performs successfully. ``` $ ansible-playbook -i inventory playbook.yml -k -K -vvv ``` ### Expected Results It should be the same behavoir as `-vvv` below. ``` $ ansible-playbook -i inventory playbook.yml -k -K -vvv ansible-playbook [core 2.12.0] 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.8/site-packages/ansible ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible-playbook python version = 3.8.8 (default, Aug 11 2021, 06:52:42) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] jinja version = 2.10.3 libyaml = True Using /etc/ansible/ansible.cfg as config file SSH password: BECOME password[defaults to SSH password]: ... Escalation succeeded <192.168.0.155> (0, b'\r\nroot\r\n', b'Shared connection to 192.168.0.155 closed.\r\n') reboot: system successfully rebooted <192.168.0.155> ESTABLISH SSH CONNECTION FOR USER: None <192.168.0.155> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/home/sugimura/.ansible/cp/23220a1dab 192.168.0.155 '/bin/sh -c '"'"'rm -f -r /home/sugimura/.ansible/tmp/ansible-tmp-1641436348.6996555-196425-83290895724414/ > /dev/null 2>&1 && sleep 0'"'"'' <192.168.0.155> (0, b'', b'') changed: [192.168.0.155] => { "changed": true, "elapsed": 30, "rebooted": true } META: ran handlers META: ran handlers PLAY RECAP ******************************************************************************************************************************************************************* 192.168.0.155 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ### Actual Results It hangs. ```console $ ansible-playbook -i inventory playbook.yml -k -K -vvvv ansible-playbook [core 2.12.0] 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.8/site-packages/ansible ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible-playbook python version = 3.8.8 (default, Aug 11 2021, 06:52:42) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] jinja version = 2.10.3 libyaml = True Using /etc/ansible/ansible.cfg as config file SSH password: BECOME password[defaults to SSH password]: setting up inventory plugins ... reboot: rebooting server... <192.168.0.155> ESTABLISH SSH CONNECTION FOR USER: None <192.168.0.155> SSH: EXEC sshpass -d10 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/home/sugimura/.ansible/cp/23220a1dab -tt 192.168.0.155 '/bin/sh -c '"'"'su root -c '"'"'"'"'"'"'"'"'/bin/sh -c '"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-vqowuwkomqakrqejoekqdcsybawubrge ; /sbin/shutdown -r 0 "Reboot initiated by Ansible"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"''"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded <192.168.0.155> (0, b"\r\nShutdown scheduled for Thu 2022-01-06 11:35:37 JST, use 'shutdown -c' to cancel.\r\n", b"OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf\r\ndebug2: checking match for 'final all' host 192.168.0.155 originally 192.168.0.155\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final'\r\ndebug2: match not found\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]\r\ndebug3: kex names ok: [curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]\r\ndebug1: configuration requests final Match pass\r\ndebug2: resolve_canonicalize: hostname 192.168.0.155 is address\r\ndebug1: re-parsing configuration\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf\r\ndebug2: checking match for 'final all' host 192.168.0.155 originally 192.168.0.155\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final'\r\ndebug2: match found\r\ndebug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]\r\ndebug3: kex names ok: [curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 196492\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.0.155 closed.\r\n") reboot: waiting an additional 30 seconds reboot: validating reboot reboot: attempting to get system boot time <192.168.0.155> ESTABLISH SSH CONNECTION FOR USER: None <192.168.0.155> SSH: EXEC sshpass -d10 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/home/sugimura/.ansible/cp/23220a1dab -tt 192.168.0.155 '/bin/sh -c '"'"'su root -c '"'"'"'"'"'"'"'"'/bin/sh -c '"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-fwhdcdmwvpurpzythdrmsmpewqactjox ; cat /proc/sys/kernel/random/boot_id'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"''"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded ``` And here is the output with `ANSIBLE_DEBUG=1`. ``` $ ANSIBLE_DEBUG=1 ansible-playbook -i inventory playbook.yml -k -K -vvvv 196531 1641436626.42119: starting run ansible-playbook [core 2.12.0] 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.8/site-packages/ansible ansible collection location = /home/sugimura/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible-playbook python version = 3.8.8 (default, Aug 11 2021, 06:52:42) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] jinja version = 2.10.3 libyaml = True Using /etc/ansible/ansible.cfg as config file SSH password: BECOME password[defaults to SSH password]: 196531 1641436629.13508: Added group all to inventory 196531 1641436629.13525: Added group ungrouped to inventory 196531 1641436629.13535: Group all now contains ungrouped ... 196536 1641436660.99666: become_success: (source=stderr, state=awaiting_prompt): 'debug2: mux_master_process_new_session: channel 1: request tty 1, X 0, agent 0, subsys 0, term "xterm-256color", cmd "/bin/sh -c 'su root -c '"'"'/bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-ozdcnvzirtcdftqbszityhfgcukzjzoe ; cat /proc/sys/kernel/random/boot_id'"'"'"'"'"'"'"'"''"'"' && sleep 0'", env 1' Escalation succeeded 196536 1641436661.18745: stderr chunk (state=3): >>>debug3: receive packet: type 80 debug1: client_input_global_request: rtype [email protected] want_reply 0 <<< 196536 1641436661.22876: stderr chunk (state=3): >>>debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 2: callback start debug2: client_session2_setup: id 2 debug2: channel 2: request pty-req confirm 1 debug3: send packet: type 98 <<< 196536 1641436661.22899: stderr chunk (state=3): >>>debug1: Sending environment. debug1: Sending env LANG = ja_JP.UTF-8 debug2: channel 2: request env confirm 0 debug3: send packet: type 98 debug1: Sending command: /bin/sh -c 'su root -c '"'"'/bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-ozdcnvzirtcdftqbszityhfgcukzjzoe ; cat /proc/sys/kernel/random/boot_id'"'"'"'"'"'"'"'"''"'"' && sleep 0' debug2: channel 2: request exec confirm 1 debug3: send packet: type 98 debug3: mux_session_confirm: sending success reply debug2: channel_input_open_confirmation: channel 2: callback done debug2: channel 2: open confirm rwindow 0 rmax 32768 <<< 196536 1641436661.23997: stderr chunk (state=3): >>>debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 2 debug2: PTY allocation request accepted on channel 2 debug2: channel 2: rcvd adjust 2097152 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 2 debug2: exec request accepted on channel 2 <<< 196536 1641436661.61510: stdout chunk (state=3): >>>パスワード:<<< ``` The `パスワード:` means `Password:` in Japanese. I tested with `LANG=C`, it is the same behavior. ``` ... debug1: Sending command: /bin/sh -c 'su root -c '"'"'/bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-xmjdcyhcajgoprxvrmtkyqdyufnzfdeo ; cat /proc/sys/kernel/random/boot_id'"'"'"'"'"'"'"'"''"'"' && sleep 0' debug2: channel 2: request exec confirm 1 debug3: send packet: type 98 <<< 196581 1641436784.82305: stderr chunk (state=3): >>>debug3: mux_session_confirm: sending success reply debug2: channel_input_open_confirmation: channel 2: callback done debug2: channel 2: open confirm rwindow 0 rmax 32768 <<< 196581 1641436784.83332: stderr chunk (state=3): >>>debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 2 debug2: PTY allocation request accepted on channel 2 debug2: channel 2: rcvd adjust 2097152 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 2 debug2: exec request accepted on channel 2 <<< 196581 1641436785.19981: stdout chunk (state=3): >>>Password: <<< ``` ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76663
https://github.com/ansible/ansible/pull/76732
9142be2f6cabbe6597c9254c5bb9186d17036d55
0ff80a15ba40c2aff3b96c1152f19c97a92d3c97
2022-01-06T02:40:31Z
python
2022-01-13T21:28:09Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,651
["changelogs/fragments/77136-first_found-spaces-in-names.yml", "lib/ansible/plugins/lookup/first_found.py", "test/integration/targets/lookup_first_found/files/vars file spaces.yml", "test/integration/targets/lookup_first_found/tasks/main.yml"]
lookup first_found fails if search path contains space
### Summary lookup first_found fails when path is configured and contains spaces. Wasn't the issue with 2.9, started to occur with 2.12. ### Issue Type Bug Report ### Component Name first_found ### Ansible Version ```console $ ansible --version ansible [core 2.12.1] config file = None configured module search path = ['/Users/afunix/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible ansible collection location = /Users/afunix/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.10.1 (main, Dec 6 2021, 22:25:40) [Clang 13.0.0 (clang-1300.0.29.3)] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment MacOS 12.1 Ubuntu 20.04 ### Steps to Reproduce hosts ```yaml localhost ansible_connection=local ``` playbook.yml ```yaml --- - hosts: all roles: - test ``` roles/test/tasks/main.yml ```yaml --- - include_vars: "{{lookup('first_found', params)}}" vars: params: files: - "test_vars.yml" paths: - "{{role_path}}/vars" ``` roles/test/vars/test_vars.yml ```yaml --- ``` ### Expected Results ansible-playbook executes successfully ### Actual Results ```console afunix@blake ~/tmp/bug $ pwd /Users/afunix/tmp/bug afunix@blake ~/tmp/bug $ ansible-playbook -Di hosts playbook.yml PLAY [all] ********************************************************************************************************************************************************************************************************************************************************************* TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************* [WARNING]: Platform darwin on host localhost is using the discovered Python interpreter at /usr/local/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.12/reference_appendices/interpreter_discovery.html for more information. ok: [localhost] TASK [test : include_vars] ***************************************************************************************************************************************************************************************************************************************************** ok: [localhost] PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 afunix@blake ~/tmp/bug with spaces $ pwd /Users/afunix/tmp/bug with spaces afunix@blake ~/tmp/bug with spaces $ ansible-playbook -Di hosts playbook.yml PLAY [all] ********************************************************************************************************************************************************************************************************************************************************************* TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************* [WARNING]: Platform darwin on host localhost is using the discovered Python interpreter at /usr/local/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.12/reference_appendices/interpreter_discovery.html for more information. ok: [localhost] TASK [test : include_vars] ***************************************************************************************************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"msg": "No file was found when using first_found."} PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 afunix@blake ~/tmp/bug with spaces $ ansible-playbook -Di hosts playbook.yml -vvvvv ansible-playbook [core 2.12.1] config file = None configured module search path = ['/Users/afunix/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible ansible collection location = /Users/afunix/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible-playbook python version = 3.10.1 (main, Dec 6 2021, 22:25:40) [Clang 13.0.0 (clang-1300.0.29.3)] jinja version = 3.0.3 libyaml = True No config file found; using defaults Reading vault password file: /Users/afunix/.vault setting up inventory plugins host_list declined parsing /Users/afunix/tmp/bug with spaces/hosts as it did not pass its verify_file() method script declined parsing /Users/afunix/tmp/bug with spaces/hosts as it did not pass its verify_file() method auto declined parsing /Users/afunix/tmp/bug with spaces/hosts as it did not pass its verify_file() method Set default localhost to localhost Parsed /Users/afunix/tmp/bug with spaces/hosts inventory source with ini plugin Loading callback plugin default of type stdout, v2.0 from /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible/plugins/callback/default.py Attempting to use 'default' callback. Skipping callback 'default', as we already have a stdout callback. Attempting to use 'junit' callback. Attempting to use 'minimal' callback. Skipping callback 'minimal', 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 'tree' callback. PLAYBOOK: playbook.yml ********************************************************************************************************************************************************************************************************************************************************* Positional arguments: playbook.yml verbosity: 5 connection: smart timeout: 10 become_method: sudo tags: ('all',) diff: True inventory: ('/Users/afunix/tmp/bug with spaces/hosts',) forks: 5 1 plays in playbook.yml PLAY [all] ********************************************************************************************************************************************************************************************************************************************************************* TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************* task path: /Users/afunix/tmp/bug with spaces/playbook.yml:2 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: afunix <localhost> EXEC /bin/sh -c 'echo ~afunix && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/afunix/.ansible/tmp `"&& mkdir "` echo /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872 `" && echo ansible-tmp-1641344178.921433-70880-92695461947872="` echo /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872 `" ) && sleep 0' Including module_utils file ansible/__init__.py Including module_utils file ansible/module_utils/__init__.py Including module_utils file ansible/module_utils/_text.py Including module_utils file ansible/module_utils/basic.py Including module_utils file ansible/module_utils/common/_collections_compat.py Including module_utils file ansible/module_utils/common/__init__.py Including module_utils file ansible/module_utils/common/_json_compat.py Including module_utils file ansible/module_utils/common/_utils.py Including module_utils file ansible/module_utils/common/arg_spec.py Including module_utils file ansible/module_utils/common/file.py Including module_utils file ansible/module_utils/common/locale.py Including module_utils file ansible/module_utils/common/parameters.py Including module_utils file ansible/module_utils/common/collections.py Including module_utils file ansible/module_utils/common/process.py Including module_utils file ansible/module_utils/common/sys_info.py Including module_utils file ansible/module_utils/common/text/converters.py Including module_utils file ansible/module_utils/common/text/__init__.py Including module_utils file ansible/module_utils/common/text/formatters.py Including module_utils file ansible/module_utils/common/validation.py Including module_utils file ansible/module_utils/common/warnings.py Including module_utils file ansible/module_utils/compat/selectors.py Including module_utils file ansible/module_utils/compat/__init__.py Including module_utils file ansible/module_utils/compat/_selectors2.py Including module_utils file ansible/module_utils/compat/selinux.py Including module_utils file ansible/module_utils/distro/__init__.py Including module_utils file ansible/module_utils/distro/_distro.py Including module_utils file ansible/module_utils/errors.py Including module_utils file ansible/module_utils/facts/ansible_collector.py Including module_utils file ansible/module_utils/facts/__init__.py Including module_utils file ansible/module_utils/facts/collector.py Including module_utils file ansible/module_utils/facts/compat.py Including module_utils file ansible/module_utils/facts/default_collectors.py Including module_utils file ansible/module_utils/facts/hardware/aix.py Including module_utils file ansible/module_utils/facts/hardware/__init__.py Including module_utils file ansible/module_utils/facts/hardware/base.py Including module_utils file ansible/module_utils/facts/hardware/darwin.py Including module_utils file ansible/module_utils/facts/hardware/dragonfly.py Including module_utils file ansible/module_utils/facts/hardware/freebsd.py Including module_utils file ansible/module_utils/facts/hardware/hpux.py Including module_utils file ansible/module_utils/facts/hardware/hurd.py Including module_utils file ansible/module_utils/facts/hardware/linux.py Including module_utils file ansible/module_utils/facts/hardware/netbsd.py Including module_utils file ansible/module_utils/facts/hardware/openbsd.py Including module_utils file ansible/module_utils/facts/hardware/sunos.py Including module_utils file ansible/module_utils/facts/namespace.py Including module_utils file ansible/module_utils/facts/network/aix.py Including module_utils file ansible/module_utils/facts/network/__init__.py Including module_utils file ansible/module_utils/facts/network/base.py Including module_utils file ansible/module_utils/facts/network/darwin.py Including module_utils file ansible/module_utils/facts/network/dragonfly.py Including module_utils file ansible/module_utils/facts/network/fc_wwn.py Including module_utils file ansible/module_utils/facts/network/freebsd.py Including module_utils file ansible/module_utils/facts/network/generic_bsd.py Including module_utils file ansible/module_utils/facts/network/hpux.py Including module_utils file ansible/module_utils/facts/network/hurd.py Including module_utils file ansible/module_utils/facts/network/iscsi.py Including module_utils file ansible/module_utils/facts/network/linux.py Including module_utils file ansible/module_utils/facts/network/netbsd.py Including module_utils file ansible/module_utils/facts/network/nvme.py Including module_utils file ansible/module_utils/facts/network/openbsd.py Including module_utils file ansible/module_utils/facts/network/sunos.py Including module_utils file ansible/module_utils/facts/other/facter.py Including module_utils file ansible/module_utils/facts/other/__init__.py Including module_utils file ansible/module_utils/facts/other/ohai.py Including module_utils file ansible/module_utils/facts/sysctl.py Including module_utils file ansible/module_utils/facts/system/apparmor.py Including module_utils file ansible/module_utils/facts/system/__init__.py Including module_utils file ansible/module_utils/facts/system/caps.py Including module_utils file ansible/module_utils/facts/system/chroot.py Including module_utils file ansible/module_utils/facts/system/cmdline.py Including module_utils file ansible/module_utils/facts/system/date_time.py Including module_utils file ansible/module_utils/facts/system/distribution.py Including module_utils file ansible/module_utils/facts/system/dns.py Including module_utils file ansible/module_utils/facts/system/env.py Including module_utils file ansible/module_utils/facts/system/fips.py Including module_utils file ansible/module_utils/facts/system/local.py Including module_utils file ansible/module_utils/facts/system/lsb.py Including module_utils file ansible/module_utils/facts/system/pkg_mgr.py Including module_utils file ansible/module_utils/facts/system/platform.py Including module_utils file ansible/module_utils/facts/system/python.py Including module_utils file ansible/module_utils/facts/system/selinux.py Including module_utils file ansible/module_utils/facts/system/service_mgr.py Including module_utils file ansible/module_utils/compat/version.py Including module_utils file ansible/module_utils/facts/system/ssh_pub_keys.py Including module_utils file ansible/module_utils/facts/system/user.py Including module_utils file ansible/module_utils/facts/timeout.py Including module_utils file ansible/module_utils/facts/utils.py Including module_utils file ansible/module_utils/facts/virtual/base.py Including module_utils file ansible/module_utils/facts/virtual/__init__.py Including module_utils file ansible/module_utils/facts/virtual/dragonfly.py Including module_utils file ansible/module_utils/facts/virtual/freebsd.py Including module_utils file ansible/module_utils/facts/virtual/hpux.py Including module_utils file ansible/module_utils/facts/virtual/linux.py Including module_utils file ansible/module_utils/facts/virtual/netbsd.py Including module_utils file ansible/module_utils/facts/virtual/openbsd.py Including module_utils file ansible/module_utils/facts/virtual/sunos.py Including module_utils file ansible/module_utils/facts/virtual/sysctl.py Including module_utils file ansible/module_utils/parsing/convert_bool.py Including module_utils file ansible/module_utils/parsing/__init__.py Including module_utils file ansible/module_utils/pycompat24.py Including module_utils file ansible/module_utils/six/__init__.py <localhost> Attempting python interpreter discovery <localhost> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'python3.10'"'"'; command -v '"'"'python3.9'"'"'; command -v '"'"'python3.8'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0' <localhost> Python interpreter discovery fallback (unsupported platform for extended discovery: darwin) Using module file /usr/local/Cellar/ansible/5.0.1/libexec/lib/python3.10/site-packages/ansible/modules/setup.py <localhost> PUT /Users/afunix/.ansible/tmp/ansible-local-70877y8t3c9b_/tmp3he6rmv3 TO /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/AnsiballZ_setup.py <localhost> EXEC /bin/sh -c 'chmod u+x /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/ /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/AnsiballZ_setup.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/local/bin/python3.9 /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/AnsiballZ_setup.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /Users/afunix/.ansible/tmp/ansible-tmp-1641344178.921433-70880-92695461947872/ > /dev/null 2>&1 && sleep 0' [WARNING]: Platform darwin on host localhost is using the discovered Python interpreter at /usr/local/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.12/reference_appendices/interpreter_discovery.html for more information. ok: [localhost] META: ran handlers TASK [test : include_vars] ***************************************************************************************************************************************************************************************************************************************************** task path: /Users/afunix/tmp/bug with spaces/roles/test/tasks/main.yml:2 looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/files/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/files/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/with/test_vars.yml" looking for "with/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/with/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/files/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/files/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/roles/test/tasks/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/files/spaces/roles/test/vars/test_vars.yml" looking for "spaces/roles/test/vars/test_vars.yml" at "/Users/afunix/tmp/bug with spaces/spaces/roles/test/vars/test_vars.yml" fatal: [localhost]: FAILED! => { "msg": "No file was found when using first_found." } 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/76651
https://github.com/ansible/ansible/pull/77141
12865139472f0a2fa95b94983dcedb4d57e93b10
74a204e6f144f3eabd6384bbb665b6afd69117c3
2022-01-05T00:58:49Z
python
2022-03-02T21:16:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,610
["changelogs/fragments/76610-empty-template-none.yml", "lib/ansible/template/native_helpers.py", "test/integration/targets/template/tasks/main.yml", "test/integration/targets/template/templates/empty_template.j2"]
Templating empty template file results in file with string 'None'
### Summary When templating something with the `template` module that results in a blank / empty output, the resulting file contains the string `None`. I noticed when I templated a config file ``` {# comment #} {% if expression %} ... something ... {% endif %} ``` and the resulting file contained the four bytes of `None` in the cases where the expression evaluated to `false`. ### Issue Type Bug Report ### Component Name template ### Ansible Version ```console devel ``` ### Configuration ```console - ``` ### OS / Environment - ### Steps to Reproduce Playbook: ```yaml (paste below) - hosts: localhost tasks: - template: src: test-template.j2 dest: test-template.txt ``` test-template.j2: ``` {# test #} ``` Or simply an empty file. Also adding more Jinja2 commands which do not add something to the output yield the same results. ### Expected Results test-template.txt is blank ### Actual Results ```console test-template.txt contains the string `None`. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76610
https://github.com/ansible/ansible/pull/76634
b984dd9c59dd43d50f5aafa91cfde29405f2fbd9
094a0746b31f7ce9879dfa6fb2972930eb1cbab2
2021-12-26T12:18:06Z
python
2022-01-07T16:13:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,588
["lib/ansible/modules/stat.py", "test/integration/targets/stat/meta/main.yml", "test/integration/targets/stat/tasks/main.yml"]
ansible.builtin.stat returns a property 'version' that is not documented
### Summary The result of the module ansible.builtin.stat contains a variable "version". It is not clear what that variable means. There is no documentation for this variable. E.g. ``` "item": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.el8_4.x86_64/jre/bin/java", "stat": { "atime": 1640017871.1250868, ... "path": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.el8_4.x86_64/jre/bin/java", ... "uid": 0, "version": "381700746", ... ``` ### Issue Type Documentation Report ### Component Name lib/ansible/modules/stat.py ### Ansible Version ```console ansible 2.9.27 config file = /home/bram.mertens/workspace/abxcfg/ansible.cfg configured module search path = ['/home/bram.mertens/.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, Sep 12 2021, 04:40:35) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] ``` ### Configuration ```console DEFAULT_HOST_LIST(/home/bram.mertens/workspace/abxcfg/ansible.cfg) = ['/home/bram.mertens/workspace/abxcfg/production'] DEFAULT_LOG_PATH(/home/bram.mertens/workspace/abxcfg/ansible.cfg) = /home/bram.mertens/workspace/abxcfg/ansible.log DEFAULT_MANAGED_STR(/home/bram.mertens/workspace/abxcfg/ansible.cfg) = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host} DEFAULT_ROLES_PATH(/home/bram.mertens/workspace/abxcfg/ansible.cfg) = ['/etc/ansible/roles', '/usr/share/ansible/roles', '/home/bram.mertens/workspace/abxcfg/roles'] DEFAULT_STDOUT_CALLBACK(/home/bram.mertens/workspace/abxcfg/ansible.cfg) = debug INTERPRETER_PYTHON(/home/bram.mertens/workspace/abxcfg/ansible.cfg) = auto ``` ### OS / Environment RHEL8 ### Additional Information It is not clear what this variable means. ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76588
https://github.com/ansible/ansible/pull/76589
15ace5a854886cd75894e7214209e4b027034bdb
8e0654504fa5c1b5813e4136b3718d2640eb08f2
2021-12-20T17:08:24Z
python
2022-01-06T19:16:01Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,577
["test/units/galaxy/test_role_install.py"]
pytest 7 test failures
### Summary In Fedora, we are testing the impact of pytest 7.0.0rc1 on our packages. Both `ansible` 2.9.27 and `ansible-core` 2.12.1 fail with various different errors. ansible: = 1836 failed, 8451 passed, 711 skipped, 7 warnings, 12 errors in 665.67s (0:11:05) = ansible-core: =========== 25 failed, 1768 passed, 11 skipped, 7 warnings in 49.19s =========== ### Issue Type Bug Report ### Component Name test? ### Ansible Version ```console 2.9.27 ``` ### Configuration ```console N/A ``` ### OS / Environment Fedora Linux 36, Python 3.10.1, pytest 7.0.0rc1 ### Steps to Reproduce In Fedora, we build the packages in this copr: https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/ Unfortunately, I don't know ansible much and I don't know how you run the tests, but should be reproducible if you install a pre-release pytest to the environment. ### Expected Results The tests should pass, as they do with pytest 6.2.5. ### Actual Results - Actual results for ansible: [ansible-builder-live.log.gz](https://github.com/ansible/ansible/files/7734616/ansible-builder-live.log.gz) - Actual results for ansible-core: [ansible-core-builder-live.log.gz](https://github.com/ansible/ansible/files/7734617/ansible-core-builder-live.log.gz) Also available at https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/ansible/ and https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/ansible-core/ ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76577
https://github.com/ansible/ansible/pull/76670
b30b8fb79c64535ba920d8359d32be50ce1b1b25
aaa7944b0238842980898dae59ddb9dcffed09cc
2021-12-17T11:07:35Z
python
2022-01-07T23:53:44Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,530
["changelogs/fragments/76530-connection-password-file-tb-fix.yml", "lib/ansible/cli/__init__.py"]
ansible 2.12.1 --connection-password-file or --become-password-file does not work
### Summary ansible-playbook with --connection-password-file or --become-password-file options fails with error: File "venv/lib/python3.8/site-packages/ansible/cli/__init__.py", line 516, in get_password_from_file elif os.path.is_executable(b_pwd_file): AttributeError: module 'posixpath' has no attribute 'is_executable' ### Issue Type Bug Report ### Component Name https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/__init__.py#L543 ### Ansible Version ```console ansible [core 2.12.1] config file = ***/ansible/ansible.cfg configured module search path = ['.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = ***/ansible/venv/lib/python3.8/site-packages/ansible ansible collection location = .ansible/collections:/usr/share/ansible/collections executable location = ***/ansible/venv/bin/ansible python version = 3.8.6 (default, Nov 20 2020, 18:02:11) [Clang 11.0.0 (clang-1100.0.33.17)] jinja version = 2.11.1 libyaml = False ``` ### Configuration ```console HOST_KEY_CHECKING=False ``` ### OS / Environment Mac OS 11.6.1 ### Steps to Reproduce 1. Implement simple playbook ping.yml: ````yaml - hosts: all become: true tasks: - ping ```` 2. Run command ````ansible-playbook -i hosts ping.yml --connection-password-file file```` 3. Error occurs ### Expected Results I expect ansible-playbook command to load password from file. ### Actual Results ```console ERROR! Unexpected Exception, this is probably a bug: module 'posixpath' has no attribute 'is_executable' the full traceback was: Traceback (most recent call last): File "***/ansible/venv/bin/ansible-playbook", line 128, in <module> exit_code = cli.run() File "***/ansible/venv/lib/python3.8/site-packages/ansible/cli/playbook.py", line 114, in run (sshpass, becomepass) = self.ask_passwords() File "***/ansible/venv/lib/python3.8/site-packages/ansible/cli/__init__.py", line 257, in ask_passwords sshpass = CLI.get_password_from_file(op['connection_password_file']) File "***/ansible/venv/lib/python3.8/site-packages/ansible/cli/__init__.py", line 516, in get_password_from_file elif os.path.is_executable(b_pwd_file): AttributeError: module 'posixpath' has no attribute 'is_executable' (venv) ➜ ansible git:(PML-4558-lv-qa-prod-ansible) ✗ ansible --version ansible [core 2.12.1] config file = ***/ansible/ansible.cfg configured module search path = ['***/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = ***/ansible/venv/lib/python3.8/site-packages/ansible ansible collection location = ***/.ansible/collections:/usr/share/ansible/collections executable location = ***/ansible/venv/bin/ansible python version = 3.8.6 (default, Nov 20 2020, 18:02:11) [Clang 11.0.0 (clang-1100.0.33.17)] jinja version = 2.11.1 libyaml = False ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76530
https://github.com/ansible/ansible/pull/76534
8a562ea14ac25778fbec4a4aef417a2dcc44abc6
ac2bdd68346634dbc19c9b22ed744fdb01edc249
2021-12-10T13:25:56Z
python
2021-12-14T15:07:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,504
["changelogs/fragments/ansible-test-import-collections.yml", "lib/ansible/plugins/loader.py", "test/integration/targets/ansible-test/ansible_collections/ns/col/plugins/lookup/vendor1.py", "test/integration/targets/ansible-test/ansible_collections/ns/col/plugins/lookup/vendor2.py", "test/lib/ansible_test/_util/target/sanity/import/importer.py"]
Ansible devel sanity tests failing with error: packaging Python module unavailable; unable to validate collection
### Summary Ansible devel sanity tests failing with error: packaging Python module unavailable; unable to validate the collection ### Issue Type Bug Report ### Component Name ansible sanity tests ### Ansible Version ```console $ ansible devel ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment mac os ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) ``` Ansible devel sanity tests is failing with `stderr: [WARNING]: packaging Python module unavailable; unable to validate collection`. Plz ref the below test failures: [ansible-test-sanity-docker-devel](https://dashboard.zuul.ansible.com/t/ansible/build/ffc5d7c618a740bf9c783e15c2d14806) [network-ee-sanity-tests](https://dashboard.zuul.ansible.com/t/ansible/build/b4ab02b51d76487b97356f3c6ffe76fe) ### Expected Results Ansible sanity tests run without failure for `devel` ### Actual Results ```console Ansible sanity tests fail for `devel` ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76504
https://github.com/ansible/ansible/pull/76513
0df60f3b617e1cf6144a76512573c9e54ef4ce7c
e56e47faa7f22f1de4079ed5494daf49ba7efbf6
2021-12-08T12:47:38Z
python
2021-12-08T23:53:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,493
["changelogs/fragments/null_means_none.yml", "lib/ansible/config/base.yml", "test/integration/targets/template/badnull1.cfg", "test/integration/targets/template/badnull2.cfg", "test/integration/targets/template/badnull3.cfg", "test/integration/targets/template/runme.sh"]
Unable to set `null_representation` config
### Summary Trying to set the `null_representation` (https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-null-representation) settings results in something like: ```text ansible.errors.AnsibleError: Invalid settings supplied for DEFAULT_NULL_REPRESENTATION: Invalid type for configuration option setting: DEFAULT_NULL_REPRESENTATION : Invalid type provided for "None": "null" . Invalid type for configuration option setting: DEFAULT_NULL_REPRESENTATION : Invalid type provided for "None": "null" ``` https://github.com/ansible/ansible/blob/v2.12.1/lib/ansible/config/base.yml#L952 specifies `type: none` and https://github.com/ansible/ansible/blob/v2.12.1/lib/ansible/config/manager.py#L99 enforces this type, but this wasn't the case in early commits as I understand. Some history I could find: * https://github.com/ansible/ansible/commit/892e230514090dc9221ee01d289c3532aa6ef260 * https://github.com/ansible/ansible/commit/9f6bbf8c2f02cdc70df149095a6623ee0c2c7ba7 * https://github.com/ansible/ansible/commit/74842adc07edb248f9b544389ce4093b9149f195 Also, could this evolve so that the config value could be overridden by local variables and/or by '#jinja2:' (by setting this value in the Jinja environment in this case), and not just globally (https://github.com/ansible/ansible/blob/v2.11.6/lib/ansible/template/__init__.py#L809)? ### Issue Type Bug Report ### Component Name config ### Ansible Version ```console $ ansible --version ansible [core 2.11.7] python version = 3.8 jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment CentOS 7 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> * Create ansible.cfg with this content: ```yaml (paste below) [defaults] null_representation = null ``` * Run `ansible-config dump --only-changed` ### Expected Results Something like: ```text $ ansible-config dump --only-changed DEFAULT_NULL_REPRESENTATION(/my/ansible.cfg) = null ``` ### Actual Results ```console Unhandled error: Traceback (most recent call last): File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 543, in get_config_value_and_origin value = ensure_type(value, defs[config].get('type'), origin=origin) File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 162, in ensure_type raise ValueError('Invalid type provided for "%s": %s' % (errmsg, to_native(value))) ValueError: Invalid type provided for "None": "null" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 605, in update_config_data value, origin = self.get_config_value_and_origin(config, configfile) File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 550, in get_config_value_and_origin raise AnsibleOptionsError('Invalid type for configuration option %s: %s' % ansible.errors.AnsibleOptionsError: Invalid type for configuration option setting: DEFAULT_NULL_REPRESENTATION : Invalid type provided for "None": "null" Traceback (most recent call last): File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 543, in get_config_value_and_origin value = ensure_type(value, defs[config].get('type'), origin=origin) File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 162, in ensure_type raise ValueError('Invalid type provided for "%s": %s' % (errmsg, to_native(value))) ValueError: Invalid type provided for "None": "null" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 605, in update_config_data value, origin = self.get_config_value_and_origin(config, configfile) File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 550, in get_config_value_and_origin raise AnsibleOptionsError('Invalid type for configuration option %s: %s' % ansible.errors.AnsibleOptionsError: Invalid type for configuration option setting: DEFAULT_NULL_REPRESENTATION : Invalid type provided for "None": "null" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/my/venv/bin/ansible-config", line 63, in <module> import ansible.constants as C File "/my/venv/lib/python3.8/site-packages/ansible/constants.py", line 181, in <module> config = ConfigManager() File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 310, in __init__ self.update_config_data() File "/my/venv/lib/python3.8/site-packages/ansible/config/manager.py", line 617, in update_config_data raise AnsibleError("Invalid settings supplied for %s: %s\n" % (config, to_native(e)), orig_exc=e) ansible.errors.AnsibleError: Invalid settings supplied for DEFAULT_NULL_REPRESENTATION: Invalid type for configuration option setting: DEFAULT_NULL_REPRESENTATION : Invalid type provided for "None": "null" . Invalid type for configuration option setting: DEFAULT_NULL_REPRESENTATION : Invalid type provided for "None": "null" ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76493
https://github.com/ansible/ansible/pull/78451
3a59cb25f486eb6c633995f5fe01413c0ed42116
0de44804679461b8d898129068183d6da416e3a7
2021-12-07T18:08:25Z
python
2022-08-11T20:07:57Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,473
["changelogs/fragments/ansible-test-sanity-vendoring.yml", "test/integration/targets/ansible-test/aliases", "test/integration/targets/ansible-test/ansible_collections/ns/col/plugins/lookup/vendor1.py", "test/integration/targets/ansible-test/ansible_collections/ns/col/plugins/lookup/vendor2.py", "test/integration/targets/ansible-test/collection-tests/sanity-vendor.sh", "test/lib/ansible_test/_util/target/sanity/import/importer.py"]
Ansible-test import fails - one or more Python packages bundled by this ansible-core
### Summary Ansible-test import fails in our CI with one or more Python packages bundled by this ansible-core ### Issue Type Bug Report ### Component Name ansible-test ### Ansible Version ```console $ ansible --version ansible [core 2.12.0] 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.9/site-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.8 (main, Nov 8 2021, 00:00:00) [GCC 11.2.1 20211019 (Red Hat 11.2.1-6)] jinja version = 2.11.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment container centos:stream9 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) ``` ### Expected Results Pass the test ### Actual Results ```console https://github.com/oVirt/ovirt-ansible-collection/runs/4391847035?check_suite_focus=true WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. Collecting cryptography<3.4 Downloading cryptography-3.3.2-cp36-abi3-manylinux2010_x86_64.whl (2.6 MB) Collecting six>=1.4.1 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting cffi>=1.12 Downloading cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (444 kB) Collecting pycparser Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) Installing collected packages: pycparser, six, cffi, cryptography Successfully installed cffi-1.15.0 cryptography-3.3.2 pycparser-2.21 six-1.16.0 WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. Collecting jinja2 Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB) Collecting PyYAML Downloading PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB) Collecting packaging Downloading packaging-21.3-py3-none-any.whl (40 kB) Collecting resolvelib<0.6.0,>=0.5.3 Downloading resolvelib-0.5.4-py2.py3-none-any.whl (12 kB) Collecting MarkupSafe>=2.0 Downloading MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB) Collecting pyparsing!=3.0.5,>=2.0.2 Downloading pyparsing-3.0.6-py3-none-any.whl (97 kB) Installing collected packages: pyparsing, MarkupSafe, resolvelib, PyYAML, packaging, jinja2 Successfully installed MarkupSafe-2.0.1 PyYAML-6.0 jinja2-3.0.3 packaging-21.3 pyparsing-3.0.6 resolvelib-0.5.4 ERROR: Command "importer.py" returned exit status 10. >>> Standard Error /tmp/ansible-test-ibrisv3_/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (packaging). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' /tmp/ansible-test-ibrisv3_/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (packaging). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' /tmp/ansible-test-ibrisv3_/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (packaging). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' /tmp/ansible-test-ibrisv3_/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (packaging). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' /tmp/ansible-test-ibrisv3_/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (packaging). This may result in undefined behavior. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' >>> Standard Output plugins/inventory/ovirt.py:85:0: traceback: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (packaging). This may result in undefined behavior. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76473
https://github.com/ansible/ansible/pull/76503
bccfb83e00086fe7118b1f79201f5d6278cc6490
82f59d4843358768be98fbade9847c65970d48d5
2021-12-06T15:08:28Z
python
2021-12-08T20:04:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,464
["changelogs/fragments/ansible-test-delegation-inventory.yaml", "test/lib/ansible_test/_internal/commands/integration/__init__.py", "test/lib/ansible_test/_internal/commands/integration/network.py", "test/lib/ansible_test/_internal/commands/integration/windows.py"]
ansible-test: development environment no longer works
### Summary I am developing modules using the latest stable versions of Ansible on either Python 3.8 or 3.9. Both versions are giving errors. ### Issue Type Bug Report ### Component Name ansible ### Ansible Version ```console ansible [core 2.12.0] config file = /Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/ansible.cfg configured module search path = ['/Users/kbreit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/kbreit/.pyenv/versions/3.9.7/envs/ansible-development-latest/lib/python3.9/site-packages/ansible ansible collection location = /Users/kbreit/.ansible/collections:/usr/share/ansible/collections executable location = /Users/kbreit/.pyenv/versions/ansible-development-latest/bin/ansible python version = 3.9.7 (default, Nov 7 2021, 06:44:13) [Clang 12.0.5 (clang-1205.0.22.9)] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/kbreit/pass.txt GALAXY_SERVER_LIST(/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/ansible.cfg) = ['automation_hub'] ``` ### OS / Environment macOS and Ubuntu 21.04 ### Steps to Reproduce Reproducing it largely depends on ansible-test. However... <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) (ansible-development-latest) meraki [master●●] % ansible-test network-integration --allow-unsupported --python 3.9 --docker default meraki_network ``` ### Expected Results I expect the `meraki_network` module (or whatever module I'm testing) to execute in full. ### Actual Results ```console Starting new "ansible-test-controller-pVmIMX5s" container. Adding "ansible-test-controller-pVmIMX5s" to container database. NOTICE: Sourcing inventory file "tests/integration/inventory.networking" from "/Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/tests/integration/inventory.networking". Traceback (most recent call last): File "/root/ansible/bin/ansible-test", line 42, in <module> main() File "/root/ansible/bin/ansible-test", line 33, in main cli_main() File "/root/ansible/test/lib/ansible_test/_internal/__init__.py", line 70, in main args.func(config) File "/root/ansible/test/lib/ansible_test/_internal/commands/integration/network.py", line 73, in command_network_integration command_integration_filtered(args, host_state, internal_targets, all_targets, inventory_path) File "/root/ansible/test/lib/ansible_test/_internal/commands/integration/__init__.py", line 458, in command_integration_filtered create_inventory(args, host_state, inventory_path, target) File "/root/ansible/test/lib/ansible_test/_internal/commands/integration/__init__.py", line 382, in create_inventory create_network_inventory(args, inventory_path, target_profiles) File "/root/ansible/test/lib/ansible_test/_internal/inventory.py", line 90, in create_network_inventory shutil.copyfile(first.config.path, path) File "/usr/lib/python3.9/shutil.py", line 243, in copyfile if _samefile(src, dst): File "/usr/lib/python3.9/shutil.py", line 220, in _samefile return os.path.samefile(src, dst) File "/usr/lib/python3.9/genericpath.py", line 100, in samefile s1 = os.stat(f1) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType ERROR: Command "docker exec -it ansible-test-controller-pVmIMX5s /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/cisco/meraki LC_ALL=en_US.UTF-8 /usr/bin/python3.9 /root/ansible/bin/ansible-test network-integration --containers '{}' --allow-unsupported meraki_network --metadata tests/output/.tmp/metadata-os7__ecv.json --truncate 137 --color yes --host-path tests/output/.tmp/host-_fjd92yd" returned exit status 1. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76464
https://github.com/ansible/ansible/pull/77255
b60a5eefb2bb93051b8b939889eb3a26e3319c7c
e8afdac06e3cdbb52885ec15660ea265e62d63ab
2021-12-04T02:09:37Z
python
2022-03-11T02:17:49Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,451
["lib/ansible/modules/uri.py"]
Need to document that src in URI won't work properly on 401 retries
### Summary The URI module supports a 'src' option to open a file on disk. If the remote end sends a 401 requiring authentication because force_basic_auth is not set then the remote end will never get the file on the retry when urlllib sends the headers again with the Authentication data. This is documented in urllib: https://docs.python.org/3/library/urllib.request.html#urllib.request.Request > Note The request will not work as expected if the data object is unable to deliver its content more than once (e.g. a file or an iterable that can produce the content only once) and the request is retried for HTTP redirects or authentication. The data is sent to the HTTP server right away after the headers. There is no support for a 100-continue expectation in the library. The Ansible Documentation should note this caveat so users can either use body and lookup or force_basic_auth as appropriate for their environment. ### Issue Type Documentation Report ### Component Name lib/ansible/modules/uri.py ### Ansible Version ```console $ ansible --version ansible 2.9.12 config file = None configured module search path = ['/home/wormley/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/wormley/ansible/lib/python3.8/site-packages/ansible executable location = /home/wormley/ansible/bin/ansible python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment Ubuntu 20.04.3 ### Additional Information Since this is documented behavior of the underlying library should just be a documentation update to save anyone else having to hunt down why it fails in an unexpected way. In our case it was a timeout as the second send the remote end was waiting for Content-Bytes to be sent again which never happened. ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76451
https://github.com/ansible/ansible/pull/78105
e8a77626a3b33832783433817108cbfbb84227ea
08b438c4ba2da34cfa6dd5f2edec6ab91c0067e0
2021-12-02T22:34:52Z
python
2022-06-22T17:52:53Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,449
["docs/docsite/rst/user_guide/playbooks_tests.rst"]
Little glitch in the Tests page
### Summary In the page https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html, and more specifically in the section https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#testing-if-a-list-value-is-true, the version in which the feature has been added seems to be above the title, when it should be below it. If someone confirms me that > New in version 2.4. indeed relates to > Testing if a list value is True Then, I'd be happy to open a PR fixing it. ### Issue Type Documentation Report ### Component Name docs/docsite/rst/user_guide/playbooks_tests.rst ### Ansible Version ```console latest in the docs ``` ### Additional Information Makes is clear that the version stated indeed relates to the section _Testing if a list value is True_ and not to the above section _Testing if a list contains a value_ ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76449
https://github.com/ansible/ansible/pull/76539
461f30c16012b7c6f2421047a44ef0e2d842617e
8a562ea14ac25778fbec4a4aef417a2dcc44abc6
2021-12-02T22:21:11Z
python
2021-12-13T20:23:50Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,446
["changelogs/fragments/ansible-test-links.yml", "test/lib/ansible_test/_internal/commands/integration/cloud/aws.py", "test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py", "test/lib/ansible_test/_internal/test.py", "test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py", "test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py"]
ansible-test sanity linking incorrect documentation
### Summary when running ansible-test over a collection, if there are errors or failures, it will link you to the correct documentation to help resolve the issue. this functionality is currently broken as it is linking to `docs.ansible.com/ansible/` instead of `docs.ansible.com/ansible-core/` which leads to 404s. ### Issue Type Bug Report ### Component Name ansible-test ### Ansible Version ```console $ ansible --version ansible [core 2.11.2] ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment Fedora 34 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) ansible-test sanity --docker ``` ### Expected Results Expect for docs link to correct navigate to the correct documentation. ### Actual Results ```console leads to documentation that 404s. Ex: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/pylint.html ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76446
https://github.com/ansible/ansible/pull/76514
19a58859d6ed96f9b68db94094795b532edb350c
16cdac66fe01a2492e6737849d0fb81e812ee96b
2021-12-02T21:08:12Z
python
2021-12-09T16:58:14Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,442
["lib/ansible/template/template.py"]
Investigate if AnsibleJ2Template should be based on NativeTemplate
### Summary `AnsibleEnvironment.from_string` returns `AnsibleJ2Template` which is based on jinja’s non-native `Template` at the moment but since we have moved over to `NativeEnvironment` it should be probably be based on `NativeTemplate` instead. If a `render` method is called on the returned template, its non-native version is called which is unexpected as `NativeEnvironment` was used to create the template. This [creates issues](https://dashboard.zuul.ansible.com/t/ansible/build/8e423341f7b74189a59983bd666b6212). We do not see this issue in ansible-core because we do not call the `render` method directly but do it in a custom way instead. However fixing this might prevent issues in the future. ### Issue Type Bug Report ### Component Name lib/ansible/template/template.py ### Ansible Version ```console $ ansible --version devel (2.13.0.dev0) only ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment N/A ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```python from ansible.template import Templar environment = Templar(loader=None).environment template = environment.from_string("{{ a }}") result = template.render({'a': 1}) ``` ### Expected Results - ### Actual Results ```console - ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76442
https://github.com/ansible/ansible/pull/76471
37c80ea89307dc2f6c8cb047905ab85c3217a11c
19a58859d6ed96f9b68db94094795b532edb350c
2021-12-02T17:29:01Z
python
2021-12-09T16:29:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,425
["changelogs/fragments/76579-fix-ansible-galaxy-collection-version-error.yml", "lib/ansible/galaxy/collection/__init__.py", "lib/ansible/galaxy/dependency_resolution/providers.py", "test/integration/targets/ansible-galaxy-collection-scm/tasks/main.yml", "test/integration/targets/ansible-galaxy-collection-scm/tasks/setup_collection_bad_version.yml", "test/integration/targets/ansible-galaxy-collection-scm/tasks/test_invalid_version.yml", "test/integration/targets/ansible-galaxy-collection-scm/vars/main.yml"]
AttributeError installing ansible-galaxy collection from git
### Summary Ansible thows an error just after processing the install dependency map. ```Process install dependency map ERROR! Unexpected Exception, this is probably a bug: 'float' object has no attribute 'startswith' ``` ### Issue Type Bug Report ### Component Name ansible-galaxy ### Ansible Version ```console [cloud-user@test-centos ~]$ ansible --version ansible [core 2.12.0] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/cloud-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /home/cloud-user/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.8 (main, Nov 8 2021, 00:00:00) [GCC 11.2.1 20211019 (Red Hat 11.2.1-6)] jinja version = 2.11.3 libyaml = True ``` ### Configuration ```console [cloud-user@test-centos ~]$ ansible-config dump --only-changed [cloud-user@test-centos ~]$ ``` ### OS / Environment CentOS Stream 9 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) galaxy.yml: namespace: my name: cool-collection version: 1.0 authors: David ***** readme: README.md ``` Install a collection from a git repo with this galaxy.yml: `ansible-galaxy collection install git+https://.../my_project.git,ISSUE-1` ### Expected Results The collection is installed ### Actual Results ```console [cloud-user@test-centos ~]$ ansible-galaxy -vvvv collection install git+https://....git,ISSUE-1 ansible-galaxy [core 2.12.0] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/cloud-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /home/cloud-user/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible-galaxy python version = 3.9.8 (main, Nov 8 2021, 00:00:00) [GCC 11.2.1 20211019 (Red Hat 11.2.1-6)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Cloning into '/home/cloud-user/.ansible/tmp/ansible-local-12630phroh0cw/tmpelcczl4o/netbox-addp5e_slda'... Username for 'https://...': my_user Password for 'https://my_user@my_gitsrv': remote: Enumerating objects: 425, done. remote: Counting objects: 100% (61/61), done. remote: Compressing objects: 100% (29/29), done. remote: Total 425 (delta 18), reused 52 (delta 14), pack-reused 364 Receiving objects: 100% (425/425), 47.25 KiB | 11.81 MiB/s, done. Resolving deltas: 100% (178/178), done. Branch 'ISSUE-1' set up to track remote branch 'ISSUE-1' from 'origin'. Switched to a new branch 'ISSUE-1' Starting galaxy collection install process Process install dependency map ERROR! Unexpected Exception, this is probably a bug: 'float' object has no attribute 'startswith' the full traceback was: Traceback (most recent call last): File "/usr/bin/ansible-galaxy", line 128, in <module> exit_code = cli.run() File "/usr/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 567, in run return context.CLIARGS['func']() File "/usr/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 86, in method_wrapper return wrapped_method(*args, **kwargs) File "/usr/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 1201, in execute_install self._execute_install_collection( File "/usr/lib/python3.9/site-packages/ansible/cli/galaxy.py", line 1228, in _execute_install_collection install_collections( File "/usr/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 513, in install_collections dependency_map = _resolve_depenency_map( File "/usr/lib/python3.9/site-packages/ansible/galaxy/collection/__init__.py", line 1327, in _resolve_depenency_map return collection_dep_resolver.resolve( File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 453, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 347, in resolve failure_causes = self._attempt_to_pin_criterion(name, criterion) File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 216, in _attempt_to_pin_criterion satisfied = all( File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 217, in <genexpr> self._p.is_satisfied_by(r, candidate) File "/usr/lib/python3.9/site-packages/ansible/galaxy/dependency_resolution/providers.py", line 280, in is_satisfied_by requirement.ver.startswith('<') or AttributeError: 'float' object has no attribute 'startswith' ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76425
https://github.com/ansible/ansible/pull/76579
6e57c8c0844c44a102dc081b93d5299cae9619e2
15ace5a854886cd75894e7214209e4b027034bdb
2021-12-01T22:41:01Z
python
2022-01-06T19:05:20Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,402
["docs/docsite/rst/shared_snippets/galaxy_server_list.txt"]
Docs: galaxy collection dependency resolution/installation behavior is outdated
### Summary The documentation currently has the following [snippet](https://github.com/ansible/ansible/blob/0afc0b8506cc80897073606157c984c9176f545c/docs/docsite/rst/shared_snippets/galaxy_server_list.txt#L86-L88): > Once a collection is found, any of its requirements are only searched within the same Galaxy instance as the parent > collection. The install process will not search for a collection requirement in a different Galaxy instance. @evgeni reported that this is no longer the case: ansible-galaxy can seek out dependencies on other configured Galaxy instances to support the use case where a collection can depend on a collection from another Galaxy instance. The behavior was changed in the following pull requests: - https://github.com/ansible/ansible/pull/72576 - https://github.com/ansible/ansible/pull/72685 Considering the security implications of the change, we should remove the outdated documentation and more importantly, document the new behavior to make it clear and manage expectations. ### Issue Type Documentation Report ### Component Name docs/docsite/rst/shared_snippets/galaxy_server_list.txt ### Ansible Version ```console not relevant ``` ### Configuration ```console not relevant ``` ### OS / Environment not relevant ### Additional Information not relevant ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76402
https://github.com/ansible/ansible/pull/78398
733a7679485c84d8ee6c4ebf95c76d172e0369de
d92f6da592283482e373c519d12afabe954b31f4
2021-11-30T14:33:56Z
python
2022-08-04T16:29:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,386
["changelogs/fragments/76386-httperror-no-fp.yml", "lib/ansible/module_utils/urls.py", "lib/ansible/modules/uri.py", "test/integration/targets/uri/tasks/main.yml"]
URI module does not respect or return a status code when auth fails with 401
### Summary The `ansible.builtin.uri` module does not return the status code when the authentication fails. It does not fail gracefully. Setting `status_code: [200, 401]` does not help. ### Issue Type Bug Report ### Component Name uri ### Ansible Version ```console ansible [core 2.11.6] config file = /home/mrmeszaros/Workspace/ansible.cfg configured module search path = ['/home/mrmeszaros/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible ansible collection location = /home/mrmeszaros/Workspace/.collections executable location = /usr/local/bin/ansible python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] jinja version = 3.0.2 libyaml = True ``` ### Configuration ```console ANSIBLE_NOCOWS(/home/mrmeszaros/Workspace/ansible.cfg) = True COLLECTIONS_PATHS(/home/mrmeszaros/Workspace/ansible.cfg) = ['/home/mrmeszaros/Workspace/.collections'] DEFAULT_FILTER_PLUGIN_PATH(/home/mrmeszaros/Workspace/ansible.cfg) = ['/home/mrmeszaros/Workspace/filter_plugins'] DEFAULT_HOST_LIST(/home/mrmeszaros/Workspace/ansible.cfg) = ['/home/mrmeszaros/Workspace/inventories/vcenter'] DEFAULT_LOG_PATH(/home/mrmeszaros/Workspace/ansible.cfg) = /home/mrmeszaros/Workspace/.ansible.log DEFAULT_ROLES_PATH(/home/mrmeszaros/Workspace/ansible.cfg) = ['/home/mrmeszaros/Workspace/.galaxy', '/home/mrmeszaros/Workspace/roles'] DEFAULT_STDOUT_CALLBACK(/home/mrmeszaros/Workspace/ansible.cfg) = yaml HOST_KEY_CHECKING(/home/mrmeszaros/Workspace/ansible.cfg) = False RETRY_FILES_ENABLED(/home/mrmeszaros/Workspace/ansible.cfg) = False ``` ### OS / Environment lsb_release -a: ``` Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal ``` ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> Prerequisites: Having moloch/arkime (or really any other web app with a REST API with authentication) installed on a machine. ```yaml (paste below) - name: Check users hosts: moloch gather_facts: no vars: moloch_admin_pass: notit tasks: - name: List users uri: method: POST url: http://localhost:8005/api/users url_username: admin url_password: "{{ moloch_admin_pass }}" status_code: - 200 - 401 changed_when: no register: list_users_cmd - debug: var=list_users_cmd ``` ### Expected Results I expected to see the http response with the headers and the `status: 401`, but instead it failed and did not even set the response headers or status. Something like curl would do: ``` curl -X POST --digest --user admin:notit 172.19.90.1:8005/api/users -v * Trying 172.19.90.1:8005... * TCP_NODELAY set * Connected to 172.19.90.1 (172.19.90.1) port 8005 (#0) * Server auth using Digest with user 'admin' > POST /api/users HTTP/1.1 > Host: 172.19.90.1:8005 > User-Agent: curl/7.68.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 401 Unauthorized < Vary: X-HTTP-Method-Override < X-Frame-Options: DENY < X-XSS-Protection: 1; mode=block < WWW-Authenticate: Digest realm="Moloch", nonce="VItPV2v3xTxcE3DOdbmMnF6t60Kxx3VM", qop="auth" < Date: Mon, 29 Nov 2021 15:16:18 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Transfer-Encoding: chunked < * Ignoring the response-body * Connection #0 to host 172.19.90.1 left intact * Issue another request to this URL: 'http://172.19.90.1:8005/api/users' * Found bundle for host 172.19.90.1: 0x563d9c519b50 [serially] * Can not multiplex, even if we wanted to! * Re-using existing connection! (#0) with host 172.19.90.1 * Connected to 172.19.90.1 (172.19.90.1) port 8005 (#0) * Server auth using Digest with user 'admin' > POST /api/users HTTP/1.1 > Host: 172.19.90.1:8005 > Authorization: Digest username="admin", realm="Moloch", nonce="VItPV2v3xTxcE3DOdbmMnF6t60Kxx3VM", uri="/api/users", cnonce="ZTllZjJmNDIyMzQ0Zjk3Yjc3ZjAyN2MzNGVkMGUzODU=", nc=00000001, qop=auth, response="03c569ff5b108921de0da31a768d56f5" > User-Agent: curl/7.68.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 401 Unauthorized < Vary: X-HTTP-Method-Override < X-Frame-Options: DENY < X-XSS-Protection: 1; mode=block * Authentication problem. Ignoring this. < WWW-Authenticate: Digest realm="Moloch", nonce="xNcghsGC2sX3w21sTDCFLK0cK9YStZ9M", qop="auth" < Date: Mon, 29 Nov 2021 15:16:18 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Transfer-Encoding: chunked < * Connection #0 to host 172.19.90.1 left intact Unauthorized⏎ ``` ### Actual Results ```console TASK [List users] *********************************************************************************************************************************************************************************************************** task path: /home/mrmeszaros/Workspace/playbooks/moloch.singleton.yml:316 <172.19.90.1> ESTABLISH SSH CONNECTION FOR USER: sysadm <172.19.90.1> SSH: EXEC sshpass -d11 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="roles/linux-base/files/id_rsa"' -o 'User="sysadm"' -o ConnectTimeout=10 -o ControlPath=/home/mrmeszaros/.ansible/cp/f5d1d80b39 172.19.90.1 '/bin/sh -c '"'"'echo ~sysadm && sleep 0'"'"'' <172.19.90.1> (0, b'/home/sysadm\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/mrmeszaros/.ssh/config\r\ndebug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 172.19.90.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1186335\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') <172.19.90.1> ESTABLISH SSH CONNECTION FOR USER: sysadm <172.19.90.1> SSH: EXEC sshpass -d11 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="roles/linux-base/files/id_rsa"' -o 'User="sysadm"' -o ConnectTimeout=10 -o ControlPath=/home/mrmeszaros/.ansible/cp/f5d1d80b39 172.19.90.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/sysadm/.ansible/tmp `"&& mkdir "` echo /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703 `" && echo ansible-tmp-1638198795.0287964-1186445-275398547896703="` echo /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703 `" ) && sleep 0'"'"'' <172.19.90.1> (0, b'ansible-tmp-1638198795.0287964-1186445-275398547896703=/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/mrmeszaros/.ssh/config\r\ndebug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 172.19.90.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1186335\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/uri.py <172.19.90.1> PUT /home/mrmeszaros/.ansible/tmp/ansible-local-1186405uxq7nnzk/tmpv42z4a9b TO /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py <172.19.90.1> SSH: EXEC sshpass -d11 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="roles/linux-base/files/id_rsa"' -o 'User="sysadm"' -o ConnectTimeout=10 -o ControlPath=/home/mrmeszaros/.ansible/cp/f5d1d80b39 '[172.19.90.1]' <172.19.90.1> (0, b'sftp> put /home/mrmeszaros/.ansible/tmp/ansible-local-1186405uxq7nnzk/tmpv42z4a9b /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/mrmeszaros/.ssh/config\r\ndebug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 172.19.90.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1186335\r\ndebug3: mux_client_request_session: session request sent\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/sysadm size 0\r\ndebug3: Looking up /home/mrmeszaros/.ansible/tmp/ansible-local-1186405uxq7nnzk/tmpv42z4a9b\r\ndebug3: Sent message fd 3 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:30321\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 30321 bytes at 131072\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') <172.19.90.1> ESTABLISH SSH CONNECTION FOR USER: sysadm <172.19.90.1> SSH: EXEC sshpass -d11 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="roles/linux-base/files/id_rsa"' -o 'User="sysadm"' -o ConnectTimeout=10 -o ControlPath=/home/mrmeszaros/.ansible/cp/f5d1d80b39 172.19.90.1 '/bin/sh -c '"'"'chmod u+x /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/ /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py && sleep 0'"'"'' <172.19.90.1> (0, b'', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/mrmeszaros/.ssh/config\r\ndebug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 172.19.90.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1186335\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') <172.19.90.1> ESTABLISH SSH CONNECTION FOR USER: sysadm <172.19.90.1> SSH: EXEC sshpass -d11 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="roles/linux-base/files/id_rsa"' -o 'User="sysadm"' -o ConnectTimeout=10 -o ControlPath=/home/mrmeszaros/.ansible/cp/f5d1d80b39 -tt 172.19.90.1 '/bin/sh -c '"'"'/usr/bin/python3 /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py && sleep 0'"'"'' <172.19.90.1> (1, b'Traceback (most recent call last):\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1755, in fetch_url\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1446, in open\r\n File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen\r\n return opener.open(url, data, timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed\r\n return self.retry_http_digest_auth(req, authreq)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth\r\n resp = self.parent.open(req, timeout=req.timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed\r\n return self.retry_http_digest_auth(req, authreq)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth\r\n resp = self.parent.open(req, timeout=req.timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed\r\n return self.retry_http_digest_auth(req, authreq)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth\r\n resp = self.parent.open(req, timeout=req.timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed\r\n return self.retry_http_digest_auth(req, authreq)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth\r\n resp = self.parent.open(req, timeout=req.timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed\r\n return self.retry_http_digest_auth(req, authreq)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth\r\n resp = self.parent.open(req, timeout=req.timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed\r\n return self.retry_http_digest_auth(req, authreq)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth\r\n resp = self.parent.open(req, timeout=req.timeout)\r\n File "/usr/lib/python3.8/urllib/request.py", line 531, in open\r\n response = meth(req, response)\r\n File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response\r\n response = self.parent.error(\r\n File "/usr/lib/python3.8/urllib/request.py", line 563, in error\r\n result = self._call_chain(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\r\n result = func(*args)\r\n File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401\r\n retry = self.http_error_auth_reqed(\'www-authenticate\',\r\n File "/usr/lib/python3.8/urllib/request.py", line 1117, in http_error_auth_reqed\r\n raise HTTPError(req.full_url, 401, "digest auth failed",\r\nurllib.error.HTTPError: HTTP Error 401: digest auth failed\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 100, in <module>\r\n _ansiballz_main()\r\n File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 92, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 40, in invoke_module\r\n runpy.run_module(mod_name=\'ansible.modules.uri\', init_globals=dict(_module_fqn=\'ansible.modules.uri\', _modlib_path=modlib_path),\r\n File "/usr/lib/python3.8/runpy.py", line 207, in run_module\r\n return _run_module_code(code, init_globals, run_name, mod_spec)\r\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File "/usr/lib/python3.8/runpy.py", line 87, in _run_code\r\n exec(code, run_globals)\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 793, in <module>\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 710, in main\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 599, in uri\r\n File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1804, in fetch_url\r\n File "/usr/lib/python3.8/tempfile.py", line 606, in __getattr__\r\n file = self.__dict__[\'file\']\r\nKeyError: \'file\'\r\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/mrmeszaros/.ssh/config\r\ndebug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 172.19.90.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1186335\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to 172.19.90.1 closed.\r\n') <172.19.90.1> Failed to connect to the host via ssh: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020 debug1: Reading configuration data /home/mrmeszaros/.ssh/config debug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.* debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug2: resolve_canonicalize: hostname 172.19.90.1 is address debug1: auto-mux: Trying existing master debug2: fd 3 setting O_NONBLOCK debug2: mux_client_hello_exchange: master version 4 debug3: mux_client_forwards: request forwardings: 0 local, 0 remote debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_client_request_alive: done pid = 1186335 debug3: mux_client_request_session: session request sent debug3: mux_client_read_packet: read header failed: Broken pipe debug2: Received exit status from master 1 Shared connection to 172.19.90.1 closed. <172.19.90.1> ESTABLISH SSH CONNECTION FOR USER: sysadm <172.19.90.1> SSH: EXEC sshpass -d11 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="roles/linux-base/files/id_rsa"' -o 'User="sysadm"' -o ConnectTimeout=10 -o ControlPath=/home/mrmeszaros/.ansible/cp/f5d1d80b39 172.19.90.1 '/bin/sh -c '"'"'rm -f -r /home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/ > /dev/null 2>&1 && sleep 0'"'"'' <172.19.90.1> (0, b'', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/mrmeszaros/.ssh/config\r\ndebug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.*\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 172.19.90.1 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 1186335\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1755, in fetch_url File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1446, in open File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1117, in http_error_auth_reqed raise HTTPError(req.full_url, 401, "digest auth failed", urllib.error.HTTPError: HTTP Error 401: digest auth failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 100, in <module> _ansiballz_main() File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 92, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 40, in invoke_module runpy.run_module(mod_name='ansible.modules.uri', init_globals=dict(_module_fqn='ansible.modules.uri', _modlib_path=modlib_path), File "/usr/lib/python3.8/runpy.py", line 207, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 793, in <module> File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 710, in main File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 599, in uri File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1804, in fetch_url File "/usr/lib/python3.8/tempfile.py", line 606, in __getattr__ file = self.__dict__['file'] KeyError: 'file' fatal: [moloch]: FAILED! => changed=false module_stderr: |- OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020 debug1: Reading configuration data /home/mrmeszaros/.ssh/config debug1: /home/mrmeszaros/.ssh/config line 1: Applying options for 172.19.* debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug2: resolve_canonicalize: hostname 172.19.90.1 is address debug1: auto-mux: Trying existing master debug2: fd 3 setting O_NONBLOCK debug2: mux_client_hello_exchange: master version 4 debug3: mux_client_forwards: request forwardings: 0 local, 0 remote debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_client_request_alive: done pid = 1186335 debug3: mux_client_request_session: session request sent debug3: mux_client_read_packet: read header failed: Broken pipe debug2: Received exit status from master 1 Shared connection to 172.19.90.1 closed. module_stdout: |- Traceback (most recent call last): File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1755, in fetch_url File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1446, in open File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1124, in http_error_auth_reqed return self.retry_http_digest_auth(req, authreq) File "/usr/lib/python3.8/urllib/request.py", line 1138, in retry_http_digest_auth resp = self.parent.open(req, timeout=req.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1244, in http_error_401 retry = self.http_error_auth_reqed('www-authenticate', File "/usr/lib/python3.8/urllib/request.py", line 1117, in http_error_auth_reqed raise HTTPError(req.full_url, 401, "digest auth failed", urllib.error.HTTPError: HTTP Error 401: digest auth failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 100, in <module> _ansiballz_main() File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 92, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/sysadm/.ansible/tmp/ansible-tmp-1638198795.0287964-1186445-275398547896703/AnsiballZ_uri.py", line 40, in invoke_module runpy.run_module(mod_name='ansible.modules.uri', init_globals=dict(_module_fqn='ansible.modules.uri', _modlib_path=modlib_path), File "/usr/lib/python3.8/runpy.py", line 207, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 793, in <module> File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 710, in main File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/modules/uri.py", line 599, in uri File "/tmp/ansible_ansible.legacy.uri_payload_e2qi06tp/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py", line 1804, in fetch_url File "/usr/lib/python3.8/tempfile.py", line 606, in __getattr__ file = self.__dict__['file'] KeyError: 'file' msg: |- MODULE FAILURE See stdout/stderr for the exact error rc: 1 PLAY RECAP **************************************************************************************************************************************************************************************************************************** moloch : ok=0 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/76386
https://github.com/ansible/ansible/pull/76421
82ff7efa9401ba0cc79b59e9d239492258e1791b
eca97a19a3d40d3ae1bc3e5e676edea159197157
2021-11-29T15:21:14Z
python
2021-12-02T19:42:29Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,382
["docs/docsite/rst/porting_guides/porting_guide_core_2.12.rst"]
Add undef() to the 2.12 porting guide
### Summary https://github.com/ansible/ansible/pull/75435 added a new global Jinja function, which people may need to account for in their templating if they were using `undef` for other purposes. For example, this template (simplified from an example that came up on IRC): ``` {% macro funroll_loops(parent=undef) %} {% if parent is defined %} {{ parent }} {% endif %} {% endmacro %} {{ funroll_loops() }} ``` In old versions of Ansible the output file would be empty. In 2.12, it is: ``` <bound method Templar._make_undefined of <ansible.template.Templar object at 0x7f668e0ead00>> ``` ### Issue Type Documentation Report ### Component Name porting_guide_core_2.12.rst ### Ansible Version ```console $ ansible --version ansible [core 2.12.0] config file = /home/ec2-user/ansible-aws/ansible/ansible.cfg configured module search path = ['/home/ec2-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ec2-user/ansible-aws/.venv/lib/python3.8/site-packages/ansible ansible collection location = /home/ec2-user/ansible-aws/ansible/collections executable location = /home/ec2-user/ansible-aws/.venv/bin/ansible python version = 3.8.5 (default, Feb 18 2021, 01:24:20) [GCC 7.3.1 20180712 (Red Hat 7.3.1-12)] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment n/a ### Additional Information 2.12 also hangs indefinitely with the following task, which I don't have time to dig into at the moment but is very odd behaviour: ``` - debug: msg: "{{ undef | default('') }}" ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76382
https://github.com/ansible/ansible/pull/76880
10fd7bf12c75d470c2fa6173c9ca055c322cbfc3
e1cf6af06d2aa36bc131505cd42270f01c94f057
2021-11-28T21:23:18Z
python
2022-02-03T19:45:11Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,379
["changelogs/fragments/76379-set-finalize-on-new-env.yml", "lib/ansible/template/__init__.py"]
template lookup `jinja2_native=0` does not convert `None` to an empty string
### Summary The option `jinja2_native=1` seems not well applied in template module. ### Issue Type Bug Report ### Component Name template ### Ansible Version ```console $ ansible --version ansible [core 2.11.6] config file = /usr/local/src/ansible.cfg 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.9 (main, Nov 17 2021, 16:20:40) [GCC 10.2.1 20210110] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed # empty output ``` ### OS / Environment Debian 11.1 (Bullseye) ### Steps to Reproduce Here my files: ```sh root@flhpz4:/usr/local/src# ls -al total 20 drwxr-xr-x 1 root root 4096 Nov 27 18:50 . drwxr-xr-x 1 root root 4096 Nov 15 00:00 .. -rw-r--r-- 1 root root 830 Nov 27 18:45 playbook-bug.yml -rw-r--r-- 1 root root 234 Nov 27 18:39 template.j2 ``` The `template.j2` file: ``` var_good is {% if var_good is not none %}NOT {% endif %}none, value=[{{ var_good }}], type={{ var_good | type_debug }} var_bad is {% if var_bad is not none %}NOT {% endif %}none, value=[{{ var_bad }}], type={{ var_bad | type_debug }} ``` And my playbook: ```yaml --- - name: "test produce a bug... It seems to me..." hosts: "localhost" connection: "local" gather_facts: false vars: d: x: null y: null var_good: "{{ y }}" var_bad: "{{ d.x }}" msg: |- var_good: type={{ var_good | type_debug }}, value=[{{ var_good }}] var_bad: type={{ var_bad | type_debug }}, value=[{{ var_bad }}] tasks: - ansible.builtin.debug: msg: "{{ msg.split('\n') }}" - name: "lookup without jinja2_native" ansible.builtin.debug: msg: "{{ lookup('template', 'template.j2') | trim | split('\n') }}" - name: "lookup with jinja2_native=yes" ansible.builtin.debug: msg: "{{ lookup('template', 'template.j2', jinja2_native='yes') | trim | split('\n') }}" - ansible.builtin.template: src: "template.j2" dest: "/tmp/template.yml" ``` Here is the command to produce the bug (according to me): ```sh rm -f /tmp/template.yml && ANSIBLE_JINJA2_NATIVE=1 ansible-playbook --diff -i 'localhost,' playbook-bug.yml ``` ### Expected Results To me, because `jinja2_native` is enabled, the tasks: - `lookup without jinja2_native` - and `lookup with jinja2_native=yes` should evaluate `var_good` **and** `var_bad` to `none`, and not just `var_good`, no? Currently, these tasks evaluate `var_good` to `none` (OK for me) and `var_bad` to the **string** `None`. By the way, with `jinja2_native` **disabled** (ie `ANSIBLE_JINJA2_NATIVE=0`), these tasks evaluate `var_bad` to an **empty string**. So `jinja2_native=1` changes the behavior of template module, but not in the expected way to me. ### Actual Results ```console PLAY [test produce a bug... It seems to me...] ************************************************* TASK [ansible.builtin.debug] ******************************************************************* ok: [localhost] => { "msg": [ "var_good: type=NoneType, value=[None]", "var_bad: type=NoneType, value=[None]" ] } TASK [lookup without jinja2_native] ************************************************************ ok: [localhost] => { "msg": [ "var_good is none, value=[None], type=NoneType", "var_bad is NOT none, value=[None], type=str" ] } TASK [lookup with jinja2_native=yes] *********************************************************** ok: [localhost] => { "msg": [ "var_good is none, value=[None], type=NoneType", "var_bad is none, value=[None], type=NoneType" ] } TASK [ansible.builtin.template] **************************************************************** --- before +++ after: /root/.ansible/tmp/ansible-local-19257luyp3lx/tmpt6d9t7gs/template.j2 @@ -0,0 +1,2 @@ +var_good is none, value=[None], type=NoneType +var_bad is NOT none, value=[None], type=str changed: [localhost] PLAY RECAP ************************************************************************************* localhost : ok=4 changed=1 unreachable=0 failed=0 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/76379
https://github.com/ansible/ansible/pull/76435
eca97a19a3d40d3ae1bc3e5e676edea159197157
4e7be293a5855f804ace91b2dbf548e4f7f3a633
2021-11-27T19:46:56Z
python
2021-12-02T19:55:28Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,372
["changelogs/fragments/76372-fix-pip-virtualenv-command-parsing.yml", "lib/ansible/modules/pip.py", "test/integration/targets/pip/tasks/pip.yml"]
When using `-m 'venv'` in virtualenv_command, quoting 'venv' breaks it
### Summary When using `ansible.builtin.pip`, if you wish to create a virtualenv using the `venv` module rather than one of the `virtualenv` wrapper script, the standard way to do so is `virtualenv_command: "FOO -m venv"`, where FOO is the absolute path to the Python interpreter you wish to use, e.g. `/usr/bin/python3.6`. However, if you wrap the 'venv' module name in quotes, to protect it as a shell string literal (e.g. `virtualenv_command: "/usr/bin/python3.6 -m 'venv'"`), an error occurs. Related: https://github.com/ansible/ansible/issues/52275 ### Issue Type Bug Report ### Component Name ansible.builtin.pip ### Ansible Version ```console $ ansible --version ansible [core 2.11.6] config file = None configured module search path = ['/home/votisupport/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/votisupport/test/venv/lib64/python3.6/site-packages/ansible ansible collection location = /home/votisupport/.ansible/collections:/usr/share/ansible/collections executable location = /home/votisupport/test/venv/bin/ansible python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment CentOS Linux release 7.9.2009 (Core) ### Steps to Reproduce ```yaml - name: "Demonstrate Ansible bug" hosts: "127.0.0.1" remote_user: "root" connection: "local" become: true become_user: "root" gather_facts: false tasks: - name: "Update pip in test virtualenv" ansible.builtin.pip: name: - "pip==21.1.2" virtualenv: "/test_venv" virtualenv_command: "/usr/bin/python3.6 -m 'venv'" ``` ### Expected Results * The value `/usr/bin/python3.6 -m venv` is treated as an executable path followed by 2 command-line arguments rather than a path which contains literal spaces in it * One of the example values given in [the documentation for the 'virtualenv_command' parameter](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html#parameter-virtualenv_command) is `~/bin/virtualenv` * Therefore the value is being passed to and parsed by a shell * Therefore: a. `/usr/bin/python3.6 -m 'venv'` should be functionally identical to `/usr/bin/python3.6 -m venv` b. Per shell scripting best practices, 'venv' should be quoted, even though it doesn't contain any whitespace or special characters, because it is a command-line argument which can take an arbitrary string values. ### Actual Results ```console (venv) [REDACTED@REDACTED test]$ ansible-playbook -vvvv 'playbook.yml' [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]. This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ansible-playbook [core 2.11.6] config file = None configured module search path = ['/home/REDACTED/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/REDACTED/test/venv/lib64/python3.6/site-packages/ansible ansible collection location = /home/REDACTED/.ansible/collections:/usr/share/ansible/collections executable location = /home/REDACTED/test/venv/bin/ansible-playbook python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] jinja version = 3.0.3 libyaml = True No config file found; using defaults setting up inventory plugins host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Skipping due to inventory source not existing or not being readable by the current user 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 Skipping due to inventory source not existing or not being readable by the current user yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Skipping due to inventory source not existing or not being readable by the current user ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Skipping due to inventory source not existing or not being readable by the current user toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method [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' Loading callback plugin default of type stdout, v2.0 from /home/REDACTED/test/venv/lib64/python3.6/site-packages/ansible/plugins/callback/default.py 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: playbook.yml ******************************************************************************************************************************************************************************************************************************************************** Positional arguments: playbook.yml verbosity: 4 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/etc/ansible/hosts',) forks: 5 1 plays in playbook.yml PLAY [Demonstrate Ansible bug] ************************************************************************************************************************************************************************************************************************************************ META: ran handlers TASK [Update pip in test virtualenv] ****************************************************************************************************************************************************************************************************************************************** task path: /home/REDACTED/test/playbook.yml:12 <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: REDACTED <127.0.0.1> EXEC /bin/sh -c 'echo ~REDACTED && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/REDACTED/.ansible/tmp `"&& mkdir "` echo /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678 `" && echo ansible-tmp-1637837031.3618085-76233-273600869189678="` echo /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678 `" ) && sleep 0' Using module file /home/REDACTED/test/venv/lib64/python3.6/site-packages/ansible/modules/pip.py <127.0.0.1> PUT /home/REDACTED/.ansible/tmp/ansible-local-76226li2q81vb/tmptxkwmgu5 TO /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678/AnsiballZ_pip.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678/ /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678/AnsiballZ_pip.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-ofcnvczhymkuiiofkpnkkjeubhdkhtym ; /home/REDACTED/test/venv/bin/python3.6 /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678/AnsiballZ_pip.py'"'"' && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/REDACTED/.ansible/tmp/ansible-tmp-1637837031.3618085-76233-273600869189678/ > /dev/null 2>&1 && sleep 0' fatal: [127.0.0.1]: FAILED! => { "changed": false, "cmd": [ "/usr/bin/python3.6", "-m", "venv", "-p/home/REDACTED/test/venv/bin/python3.6", "/test_venv" ], "invocation": { "module_args": { "chdir": null, "editable": false, "executable": null, "extra_args": null, "name": [ "pip==21.1.2" ], "requirements": null, "state": "present", "umask": null, "version": null, "virtualenv": "/test_venv", "virtualenv_command": "/usr/bin/python3.6 -m 'venv'", "virtualenv_python": null, "virtualenv_site_packages": false } }, "msg": "\n:stderr: usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]\n [--upgrade] [--without-pip] [--prompt PROMPT]\n ENV_DIR [ENV_DIR ...]\nvenv: error: unrecognized arguments: -p/home/REDACTED/test/venv/bin/python3.6\n" } PLAY RECAP ******************************************************************************************************************************************************************************************************************************************************************** 127.0.0.1 : ok=0 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/76372
https://github.com/ansible/ansible/pull/80624
251360314d0b385322d36001f3deb9820c3febc8
7f48fa01295e85f94437041688fb898e870c5154
2021-11-26T01:54:21Z
python
2023-05-02T07:52:11Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,357
["changelogs/fragments/fix_sudo_flag_mangling.yml", "lib/ansible/plugins/become/sudo.py", "test/units/plugins/become/test_sudo.py"]
sudo module doesn't handle --non-interactive flag
### Summary Setting ansible_become_flags to a value that includes "--non-interactive" results in "-on-interactive" being given to sudo because the sudo module is removing "-n" from flags, but isn't accounting for the long argument equivalent: `flags = flags.replace('-n', '')` ### Issue Type Bug Report ### Component Name lib/ansible/plugins/become/sudo.py ### Ansible Version ```console $ ansible --version ansible 2.9.25 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/<redacted>/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] ``` ### Configuration ```console $ ansible-config dump --only-changed DEFAULT_KEEP_REMOTE_FILES(env: ANSIBLE_KEEP_REMOTE_FILES) = False ``` ### OS / Environment CentOS Linux release 7.9.2009 (Core) ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) ansible_become_flags: '--set-home --non-interactive --stdin' # Run a play that requires escalation via sudo ansible-playbook <play> --ask-become-pass ``` ### Expected Results The run will have a fatal failure, whose output message will include this: `"module_stdout": "sudo: invalid option -- 'o'` If the ansible-playbook command is run with the -vvv option then the relevant ssh connection will include this in the command that it runs: `'/bin/sh -c '"'"'sudo --set-home -on-interactive --stdin -p "[sudo via ansible` ### Actual Results ```console <target-server-1> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/home/myuser/.ansible/cp/e98147b6a6 -tt target-server-1 '/bin/sh -c '"'"'sudo -on-interactive --set-home --stdin -p "[sudo via ansible, key=uldzwcgvhxenmnykzovhhyqccxmihgqv] password:" -u escalateuser /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-uldzwcgvhxenmnykzovhhyqccxmihgqv ; /usr/bin/python /var/tmp/ansible-tmp-1637749767.73-18596-268317325457036/AnsiballZ_command.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' <target-server-1> (1, "sudo: invalid option -- 'o'\r\nusage: sudo -h | -K | -k | -V\r\nusage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]\r\nusage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]\r\n [command]\r\nusage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p\r\n prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]\r\nusage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p\r\n prompt] [-T timeout] [-u user] file ...\r\n", 'Shared connection to target-server-1 closed.\r\n') <target-server-1> Failed to connect to the host via ssh: Shared connection to target-server-1 closed. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76357
https://github.com/ansible/ansible/pull/76389
480d47d071cc6ed08b80209a3fa75b64311ea648
b02168d644dfaff1f76f52931d7b41485c2753a3
2021-11-24T11:41:21Z
python
2021-12-02T16:58:01Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,336
["changelogs/fragments/76336-yum-makecache-fast.yml", "lib/ansible/modules/yum.py"]
yum module on RHEL7 fills up disk with large yum cache after a repo with repo_gpgcheck=1 is added
### Summary See #74962 (feel free to re-open that one and close this one as a duplicate). ### Issue Type Bug Report ### Component Name yum ### Ansible Version ```console $ ansible --version ansible [core 2.11.6] config file = None configured module search path = ['/home/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/username/.local/lib/python3.8/site-packages/ansible ansible collection location = /home/username/.ansible/collections:/usr/share/ansible/collections executable location = /home/username/.local/bin/ansible python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] jinja version = 2.11.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed [nothing] ``` ### OS / Environment RHEL 7.9 ### Steps to Reproduce As part of the playbook, there are some tasks that install repo's and download RPM's: <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) - name: Register ansible Yum repository become: yes ansible.builtin.yum_repository: name: ansible-epel7 description: Ansible Red Hat 7 EPEL baseurl: https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ gpgcheck: yes gpgkey: https://releases.ansible.com/keys/RPM-GPG-KEY-ansible-release.pub - name: Download Ansible RPMs to local controller Ansible RPM repository include_tasks: yum-download.yml vars: rpm_name: ansible ``` and: ```yaml - name: Register ansible-runner Yum repository become: yes ansible.builtin.yum_repository: name: ansible-runner description: Ansible target dependencies baseurl: https://releases.ansible.com/ansible-runner/rpm/epel-7-x86_64/ gpgcheck: yes gpgkey: https://releases.ansible.com/keys/RPM-GPG-KEY-ansible-release.pub - name: Download pexpect RPMs include_tasks: yum-download.yml vars: rpm_name: python2-pexpect ``` with `yum-download.yml` as: ```yaml - name: 'Download {{ rpm_name }} RPMs using yum' become: yes ansible.builtin.yum: name: '{{ rpm_name }}' download_only: yes download_dir: '{{local_rpm_repo_folder}}' environment: '{{ env_http_proxy }}' ``` ### Expected Results When running this playbook against a Red Hat 7.9 VM on Azure, I would expect just the RPM's to be downloaded (with maybe some small caching by yum). ### Actual Results When running this playbook against a Red Hat 7.9 VM on Azure, yum fills the entire `/var` with cached data. (In fact, because by default `/var` is 8G I had to extend it first; I end up with some 12G!) Only after changing: ```yaml gpgcheck: yes ``` to: ```yaml gpgcheck: no ``` does this work as expected (no huge amounts of data in `/var`, RPM's downloaded). ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76336
https://github.com/ansible/ansible/pull/76345
4e70156d7ece970a41f8d0e7245002ea9a7df0ab
461f30c16012b7c6f2421047a44ef0e2d842617e
2021-11-22T08:39:47Z
python
2021-12-13T16:38:20Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,334
["changelogs/fragments/json_filter_fix.yml", "lib/ansible/plugins/filter/core.py"]
to_json filter doesn't decrypt vaulted variables
### Summary Using docker_container_exec's stdin syntax doesn't decrypt vaulted variables. I was suggested in https://github.com/ansible-collections/community.docker/issues/241 that it's most likely issue with Ansible, not the collection. ### Issue Type Bug Report ### Component Name docker_container_exec ### Ansible Version ```console $ ansible --version ansible [core 2.11.6] python version = 3.9.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0] jinja version = 3.0.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ANSIBLE_NOCOWS(/home/user/.ansible.cfg) = True CACHE_PLUGIN(/home/user/.ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/home/user/.ansible.cfg) = /tmp/ansible-cachedir CACHE_PLUGIN_TIMEOUT(/home/user/.ansible.cfg) = 5 DEFAULT_GATHERING(/home/user/.ansible.cfg) = smart DEPRECATION_WARNINGS(/home/user/.ansible.cfg) = False DIFF_ALWAYS(/home/user/.ansible.cfg) = True HOST_KEY_CHECKING(/home/user/.ansible.cfg) = False ``` ### OS / Environment - Target: Ubuntu 20.04.3 ### Steps to Reproduce ```yaml - name: Upload key community.docker.docker_container_exec: argv: - tee - secret.json container: '{{ docker_id }}' stdin: '{{ secret_data | to_json }}' ``` Var file (vaulted value is embedded): ``` secret_data: priv_key: value: !vault | $ANSIBLE_VAULT;1.1;AES256 1161... .... pub_key: value: some_public_key ``` ### Expected Results Vaulted variable is properly decrypted. I've tested encryption with: ``` ansible localhost -m ansible.builtin.debug -a var=secret_data -e @all/vars.yml ``` and the syntax is valid (variable is decrypted as expected), but not when using docker collection. ### Actual Results ```console JSON file which was created consist ansible vault data, not decrypted string. below "value": {"__ansible_vault": "$ANSIBLE_VAULT;1.1;AES256;\n1161... ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76334
https://github.com/ansible/ansible/pull/76349
de11a1ce781482e280c55d99ce571a130ae474bc
480d47d071cc6ed08b80209a3fa75b64311ea648
2021-11-20T22:48:54Z
python
2021-12-02T16:02:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,322
["docs/docsite/rst/reference_appendices/faq.rst"]
Ansible crashes hard when using url lookup in an adhoc command on macOS
### Summary On macOS, Ansible crashes when using the `url` filter inside of an adhoc command. ### Issue Type Bug Report ### Component Name url filter in adhoc command ### Ansible Version ```console $ ansible --version ansible [core 2.12.0] config file = /Users/shanemcd/.ansible.cfg configured module search path = ['/Users/shanemcd/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.9/site-packages/ansible ansible collection location = /Users/shanemcd/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.9.7 (default, Oct 13 2021, 06:45:31) [Clang 13.0.0 (clang-1300.0.29.3)] jinja version = 2.11.2 libyaml = False ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment DEFAULT_STDOUT_CALLBACK(/Users/shanemcd/.ansible.cfg) = yaml DEFAULT_VERBOSITY(/Users/shanemcd/.ansible.cfg) = 1 ### Steps to Reproduce Run the command in the summary on macOS. I am currently on macOS 11.1. ### Expected Results It shouldn't crash. ### Actual Results ```console $ ansible localhost -m debug -a "msg={{ lookup('url', 'https://api.github.com/repos/ansible/awx/releases/latest') }}" Using /Users/shanemcd/.ansible.cfg as config file [WARNING]: No inventory was parsed, only implicit localhost is available objc[79826]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[79826]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. ERROR! A worker was found in a dead state ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76322
https://github.com/ansible/ansible/pull/77965
143e7fb45e7b916fa973613000e97ee889f5666c
0fae2383dafba38cdd0f02bcc4da1b89f414bf93
2021-11-19T07:31:04Z
python
2022-06-07T15:07:59Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,320
["changelogs/fragments/76375-fix-module-logging-WSL2.yml", "lib/ansible/module_utils/basic.py"]
Module Logging does not naturally work with WSL2
### Summary When developing a custom module on WSL2, and calling `AnsibleModule.log(msg)`, the underlying code in `ansible/module_utils/basic.py` incorrectly assumes systemd-journal is setup well as long as the corresponding python modules import correctly and do not throw errors. WSL2 does not naturally support systemd, and therefore the log messages are not falling back into syslog, which is much better supported by WSL2. Note that I do realize there is a workaround for systemd on WSL2 with `systemd-genie`, but that shouldn't be required just to get log messages out of Ansible. ### Issue Type Bug Report ### Component Name AnsibleModule.log() ### Ansible Version ```console 2.10.9 ``` ### Configuration ```console $ ansible-config dump --only-changed DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/inventory_localhost.yml'] DEFAULT_VERBOSITY(/etc/ansible/ansible.cfg) = 0 DISPLAY_SKIPPED_HOSTS(/etc/ansible/ansible.cfg) = False HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_silent ``` ### OS / Environment WSL2 ### Steps to Reproduce Just call `AnsibleModule.log()` on WSL2. ### Expected Results Log messages should go to syslog on WSL2. ### Actual Results ```console Log messages cannot be found. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76320
https://github.com/ansible/ansible/pull/76375
8febd37f325b049afe448af689064ee019d1099c
8c06aada1063b81409a5d8e95eaf7309fa72b9bd
2021-11-18T13:55:21Z
python
2022-01-21T16:27:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,316
["changelogs/fragments/76316-galaxy-install-role-inaccessible-dir-fix.yml", "lib/ansible/galaxy/role.py"]
ansible-galaxy install results in infinite loop when write permissions missing on target dir
### Summary If you use `ansible-galaxy` to install a role to a path specified by both environment variable `ANSIBLE_ROLES_PATH` and `--roles-path=` galaxy will fail to extract the role, and infinitely loop trying to extract the archive. ### Issue Type Bug Report ### Component Name galaxy ### Ansible Version ```console $ ansible --version ansible 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/ncelebic/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ncelebic/py3venv/lib/python3.8/site-packages/ansible executable location = /home/ncelebic/py3venv/bin/ansible python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment Ubuntu 20.04 Python 3.8 virtualenv ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ``` mkdir roles chmod -w roles ANSIBLE_ROLES_PATH=./roles/ ansible-galaxy install geerlingguy.repo-epel --roles-path=./roles ``` ### Expected Results If you use just the env var `ANSIBLE_ROLES_PATH` it errors out with: ``` /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel: [Errno 13] Permission denied: '/home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel' ``` That is the expected outcome ### Actual Results ```console $ ANSIBLE_ROLES_PATH=./roles/ ansible-galaxy install geerlingguy.repo-epel --roles-p ath=./roles - downloading role 'repo-epel', owned by geerlingguy - downloading role from https://github.com/geerlingguy/ansible-role-repo-epel/archive/3.1.0.tar.gz - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel - extracting geerlingguy.repo-epel to /home/ncelebic/test/galaxy_test/roles/geerlingguy.repo-epel ... forever ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76316
https://github.com/ansible/ansible/pull/76318
0ddaf6edd66dc7f7e24cd8ec66aaf9a5e23fd63f
f59d0456e1bd4e2a7d45366acfaed92f6157f0f6
2021-11-17T22:42:44Z
python
2021-11-22T12:28:02Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,242
["docs/docsite/rst/porting_guides/porting_guide_core_2.13.rst"]
Porting entry for module Python requirements is abmbiguous
### Summary ( https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/porting_guides/porting_guide_core_2.13.rst#modules ) I was reading the porting docs not about modules now requiring Python >= 2.7. ``` Python 2.7 is a hard requirement for module execution in this release. ``` While with the context I'm aware that this should be Python >= 2.7, as written it's slightly ambiguous and could be read as Python == 2.7 rather than Python >= 2.7. ### Issue Type Documentation Report ### Component Name docs/docsite/rst/porting_guides/porting_guide_core_2.13.rst ### Ansible Version ```console devel branch ``` ### Configuration ```console n/a ``` ### OS / Environment n/a ### Additional Information Mentioned it in #ansible-docs: > samccann > yeah I think we might need to wordsmith that porting guide entry a bit. "Python 2.7 or later is a hard requirement..." ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76242
https://github.com/ansible/ansible/pull/76258
5c225dc0f5bfa677addeac100a8018df3f3a9db1
f6ec773e6ef2e7153ae3b3a992d01957a9811b46
2021-11-08T14:57:08Z
python
2021-11-09T14:22:16Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,192
["changelogs/fragments/76192-dnf-specific-gpg-error.yml", "lib/ansible/modules/dnf.py", "test/integration/targets/dnf/tasks/gpg.yml"]
GPG Validation failed on DNF/YUM local RPM install.
### Summary When I try to use the yum/dnf module to install an RPM from a local file, not from a repo, it fails with a GPG error. `Failed to validate GPG signature for xyy.rpm` I've created a simple example here complete with a Vagrant to make it easy to reproduce: https://github.com/jeffmacdonald/ansible-yum-error ### Issue Type Bug Report ### Component Name dnf, yum ### Ansible Version ```console $ ansible --version ansible [core 2.11.1] config file = None configured module search path = ['/Users/jeff.macdonald/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/jeff.macdonald/.pyenv/versions/3.9.5/envs/python3.9.5/lib/python3.9/site-packages/ansible ansible collection location = /Users/jeff.macdonald/.ansible/collections:/usr/share/ansible/collections executable location = /Users/jeff.macdonald/.pyenv/versions/python3.9.5/bin/ansible python version = 3.9.5 (default, May 30 2021, 21:26:15) [Clang 12.0.5 (clang-1205.0.22.9)] jinja version = 3.0.1 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed No output ``` ### OS / Environment Ansible is being run from a Mac (latest) on Rocky Linux 8.3 ### Steps to Reproduce https://github.com/jeffmacdonald/ansible-yum-error ```yaml --- - name: Install Telegraf hosts: all tasks: - name: install influx gpg key become: yes rpm_key: key: "https://repos.influxdata.com/influxdb.key" state: present - name: download telegraf RPM get_url: url: https://dl.influxdata.com/telegraf/releases/telegraf-1.13.4-1.x86_64.rpm dest: /tmp/telegraf-1.13.4-1.x86_64.rpm - name: install telegraf packages become: yes yum: name: /tmp/telegraf-1.13.4-1.x86_64.rpm state: present ``` ### Expected Results I expect the RPM to install ### Actual Results ```console TASK [install telegraf packages] *********************************************** fatal: [node1]: FAILED! => {"changed": false, "msg": "Failed to validate GPG signature for telegraf-1.13.4-1.x86_64"} ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76192
https://github.com/ansible/ansible/pull/76194
fdc33488595e01ed39ee1c9482ad11acda3d4a66
150faf25d3e9a23afde4e16e66281f1fb88b824f
2021-11-01T19:52:09Z
python
2021-11-02T14:01:12Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,180
["docs/docsite/rst/user_guide/playbooks_reuse_roles.rst"]
The documentation is missing available data types for role parameters specification
### Summary https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#specification-format the 'type' entry declares roles param type, the docs says: ``` rst :type: * The data type of the option. Default is ``str``. * If an option is of type ``list``, ``elements`` should be specified. ``` I haven't found any other types, tho the example mentions 'int'. is there bool? dict? ### Issue Type Documentation Report ### Component Name user_guide/playbooks_reuse_roles.html#specification-format ### Ansible Version ```console $ ansible --version website - latest / 4 ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment I suspect it's the same on other OSes ### Additional Information It would make it easier to write roles ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76180
https://github.com/ansible/ansible/pull/76276
b6725ec6c994d725cc2190b784a422299fd98385
90de24da7be7a0e2d7fd173532222db0b116088d
2021-10-30T09:23:23Z
python
2021-11-10T15:06:33Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,142
["changelogs/fragments/76167-update-attributes-of-files-that-are-links.yml", "lib/ansible/modules/file.py", "test/integration/targets/file/tasks/main.yml", "test/integration/targets/file/tasks/state_link.yml", "test/sanity/ignore.txt"]
ansible.builtin.file fails to change permissions on hard links unless you explicitly define 'state: file'
### Summary When using the file module to iterate over a list of files, some of which could be hardlinks, the file module fails with "src is required for creating new hardlinks" However, I am simply trying to modify the permissions of the files, not create new ones. For example, I gather the list of files like so (keep in mind some of these are regular files, some of them are hardlinks): ``` - name: Finding all *.crt files in the pki directory find: paths: "{{ item }}" patterns: '*.crt' loop: "{{ crt_directories }}" register: crt_find ``` So at this point, `crt_find` is a list of files and hard links. Then, I iterate over `crt_find` to set the permissions on all of the files and hardlinks using the file module: ``` - name: Setting certificate file Permissions file: path: "{{ item.1.path }}" mode: 0644 loop: "{{ crt_find.results | subelements('files') }}" ``` This works perfectly fine for regular files. When it gets to a hardlink, it fails with "src is required for creating new hardlinks." The problem is, I'm not trying to create a new hardlink. I'm simply trying to modify the permissions. Interestingly, this goes away if I explicitly define `state: file` as a parameter on the file module task: ``` - name: Setting certificate file Permissions file: path: "{{ item.1.path }}" state: file # <---------------This fixes the problem mode: 0644 loop: "{{ crt_find.results | subelements('files') }}" ``` While I've clearly found a solution to my problem, it definitely seems like a bug with the file module, as `state: file` is the default if omitted. ### Issue Type Bug Report ### Component Name ansible.builtin.file ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = /Users/me/.ansible.cfg configured module search path = ['/Users/me/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/me/venv/lib/python3.8/site-packages/ansible ansible collection location = /Users/me/.ansible/collections:/usr/share/ansible/collections executable location = /Users/me/venv/bin/ansible python version = 3.8.2 (default, Jun 8 2021, 11:59:35) [Clang 12.0.5 (clang-1205.0.22.11)] jinja version = 3.0.1 libyaml = False ``` ### Configuration ```console $ ansible-config dump --only-changed DEFAULT_ROLES_PATH(/Users/me/.ansible.cfg) = ['/Users/me/repos'] DEFAULT_STDOUT_CALLBACK(env: ANSIBLE_STDOUT_CALLBACK) = yaml HOST_KEY_CHECKING(/Users/me/.ansible.cfg) = False ``` ### OS / Environment Control machine = MacOS Target machine = Ubuntu 20 ### Steps to Reproduce Stated in the Summary ### Expected Results Stated in the Summary ### Actual Results ```console Stated in the Summary ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76142
https://github.com/ansible/ansible/pull/76167
69c7e3f4a3e244b28eef919ff2c1356ea6d06b1c
3f1838bf918a055b491ab25d6caee2e5022db3c1
2021-10-26T14:18:11Z
python
2022-08-10T20:01:31Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,134
["docs/docsite/rst/installation_guide/intro_installation.rst"]
Documented install instructions for Ubuntu does not work
### Summary Followed the instructions at https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu installing on Ubuntu 20.4. Ran these commands per the documentation: ``` $ sudo apt update $ sudo apt install software-properties-common $ sudo add-apt-repository --yes --update ppa:ansible/ansible $ sudo apt install ansible ``` When I try to run any ansible command I get this error: ``` $ ansible --version ERROR! Unexpected Exception: No module named yaml the full traceback was: Traceback (most recent call last): File "/usr/local/bin/ansible", line 88, in <module> mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass) File "/usr/local/lib/python2.7/dist-packages/ansible/cli/__init__.py", line 28, in <module> import yaml ImportError: No module named yaml ``` ### Issue Type Documentation Report ### Component Name ansible? ### Ansible Version ```console $ ansible --version $ ansible --version ERROR! Unexpected Exception: No module named yaml the full traceback was: Traceback (most recent call last): File "/usr/local/bin/ansible", line 88, in <module> mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass) File "/usr/local/lib/python2.7/dist-packages/ansible/cli/__init__.py", line 28, in <module> import yaml ImportError: No module named yaml ``` ``` ### Configuration ```console $ ansible-config dump --only-changed No output ``` ### OS / Environment Ubuntu 20.4 ### Additional Information Need to improve documentation for Ubuntu 20.4 ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76134
https://github.com/ansible/ansible/pull/77137
0bb70b6b9f01a4de39d2824a0a5a91af339559d4
71dfe32ab664b1932d0fac051b2859d5b4fc2b95
2021-10-25T21:42:13Z
python
2022-02-24T14:29:06Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,133
["lib/ansible/modules/apt_repository.py"]
apt_repository module requires gpg to be installed target, but docs don't mention
### Summary The `apt_repository` will fail with a somewhat confusing error if gnugp, and dirmngr manager are not installed. Neither of these packages are Required/Essential/Important, and may not be already installed in minimal systems that you might want to run `apt_repository` on. The fix might be to just include `gnupg` in the requirements section of the docs. ### Issue Type Documentation Report ### Component Name apt_repository ### Ansible Version ```console $ ansible --version ansible [core 2.11.4] config file = ... configured module search path = ... ansible python module location = ... ansible collection location = ... 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.0.1 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment Mostly a docs issue so this is N/A. But apt_repository applies to Debian, Ubuntu, and forks. ### Additional Information Tells people that need gnupg when using apt_repository. ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76133
https://github.com/ansible/ansible/pull/78586
f1c56e988dbbb769b34a3c80baa40c916b4d0c88
3b9f1871e512ffc4106348cadb2ea369eb8b4fd0
2021-10-25T21:01:38Z
python
2022-08-23T15:06:11Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,124
["changelogs/fragments/76124-hostname-debianstrategy.yml", "lib/ansible/modules/hostname.py", "test/integration/targets/hostname/tasks/Debian.yml", "test/integration/targets/hostname/tasks/main.yml", "test/integration/targets/hostname/tasks/test_normal.yml", "test/units/modules/test_hostname.py"]
hostname module (devel) - KeyError: 'DebianStrategy' with `use: debian`
### Summary The documentation says that `debian` is a valid use for the hostname module `use` parameter, but when attempting to use it, a `KeyError` is thrown. Likely introduced in 502270c804c33d3bc963930dc85e0f4ca359674d and possibly just needs a docs fix. ``` Traceback (most recent call last): File "/home/pi/.ansible/tmp/ansible-tmp-1634987643.6837337-31154-42761744967868/AnsiballZ_hostname.py", line 107, in <module> _ansiballz_main() File "/home/pi/.ansible/tmp/ansible-tmp-1634987643.6837337-31154-42761744967868/AnsiballZ_hostname.py", line 99, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/pi/.ansible/tmp/ansible-tmp-1634987643.6837337-31154-42761744967868/AnsiballZ_hostname.py", line 48, in invoke_module run_name='__main__', alter_sys=True) File "/usr/lib/python3.7/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.7/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_hostname_payload_1ou9ee4b/ansible_hostname_payload.zip/ansible/modules/hostname.py", line 983, in <module> File "/tmp/ansible_hostname_payload_1ou9ee4b/ansible_hostname_payload.zip/ansible/modules/hostname.py", line 952, in main File "/tmp/ansible_hostname_payload_1ou9ee4b/ansible_hostname_payload.zip/ansible/modules/hostname.py", line 162, in __init__ KeyError: 'DebianStrategy' ``` ### Issue Type Bug Report ### Component Name hostname ### Ansible Version ```console $ ansible --version ansible [core 2.13.0.dev0] (devel b4cbe1adcf) last updated 2021/10/23 06:13:48 (GMT -500) config file = None configured module search path = ['/nvme/gentoo/rick/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /nvme/gentoo/rick/dev/ansible/ansible/lib/ansible ansible collection location = /nvme/gentoo/rick/.ansible/collections:/usr/share/ansible/collections executable location = /nvme/gentoo/rick/dev/ansible/ansible/bin/ansible python version = 3.8.9 (default, May 27 2021, 19:05:33) [GCC 10.2.0] jinja version = 2.11.2 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment ansible devel, gentoo controller, raspberry pi OS remote node ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) - name: Set hostname hostname: use: debian name: foo ``` ### Expected Results No traceback ### Actual Results ```console Traceback as above. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76124
https://github.com/ansible/ansible/pull/76929
522f9d1050baa3bdea4f3f9df5772c9acdc96f73
b1457329731b485910515dbd1c9753205767d81c
2021-10-23T11:24:28Z
python
2022-02-09T15:26:42Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,087
["changelogs/fragments/76108-fix-ansible-galaxy-collection-verify-help.yaml", "lib/ansible/cli/galaxy.py"]
"ansible-galaxy collection verify" claims to support .tar.gz as url or file but it doesn't
### Summary The help from ``ansible-galaxy collection verify`` reads: ``` positional arguments: collection_name The collection(s) name or path/url to a tar.gz collection artifact. This is mutually exclusive with --requirements-file. ``` However, only ``namespace.collection`` appears supported. ### Issue Type Bug Report ### Component Name ansible-galaxy ### Ansible Version ```console ansible [core 2.11.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/dmsimard/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/dmsimard/dev/virtualenvs/ansible/lib64/python3.9/site-packages/ansible ansible collection location = /home/dmsimard/.ansible/collections:/usr/share/ansible/collections executable location = /home/dmsimard/dev/virtualenvs/ansible/bin/ansible python version = 3.9.7 (default, Aug 30 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] jinja version = 3.0.2 libyaml = True ``` ### Configuration ```console not relevant ``` ### OS / Environment not relevant ### Steps to Reproduce From ``ansible-galaxy collection verify --help``: ``` > ansible-galaxy collection verify --help usage: ansible-galaxy collection verify [-h] [-s API_SERVER] [--token API_KEY] [-c] [-v] [-p COLLECTIONS_PATH] [-i] [--offline] [-r REQUIREMENTS] [collection_name ...] positional arguments: collection_name The collection(s) name or path/url to a tar.gz collection artifact. This is mutually exclusive with --requirements-file. ``` ^ **The collection(s) name or path/url to a tar.gz collection artifact.** However: ``` > wget https://galaxy.ansible.com/download/community-general-3.8.0.tar.gz 2021-10-19 12:37:28 (8.82 MB/s) - ‘community-general-3.8.0.tar.gz’ saved [2220728/2220728] > ansible-galaxy collection verify community-general-3.8.0.tar.gz ERROR! 'file' type is not supported. The format namespace.name is expected. > ansible-galaxy collection verify https://galaxy.ansible.com/download/community-general-3.8.0.tar.gz Downloading https://galaxy.ansible.com/download/community-general-3.8.0.tar.gz to /home/dmsimard/.ansible/tmp/ansible-local-821546820f8vxq/tmplac4iqqg/community-general-3.8.0-jg8r9knz ERROR! 'url' type is not supported. The format namespace.name is expected. ``` ### Expected Results Either it should work or the help text should be updated. ### Actual Results ```console > wget https://galaxy.ansible.com/download/community-general-3.8.0.tar.gz 2021-10-19 12:37:28 (8.82 MB/s) - ‘community-general-3.8.0.tar.gz’ saved [2220728/2220728] > ansible-galaxy collection verify community-general-3.8.0.tar.gz ERROR! 'file' type is not supported. The format namespace.name is expected. > ansible-galaxy collection verify https://galaxy.ansible.com/download/community-general-3.8.0.tar.gz Downloading https://galaxy.ansible.com/download/community-general-3.8.0.tar.gz to /home/dmsimard/.ansible/tmp/ansible-local-821546820f8vxq/tmplac4iqqg/community-general-3.8.0-jg8r9knz ERROR! 'url' type is not supported. The format namespace.name is expected. ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76087
https://github.com/ansible/ansible/pull/76108
e40a0e5c909386ba7c85264e36f7916af98ff0e4
0bf7b3f4efdf9b1aac2510e641076d3e673f00a6
2021-10-19T17:03:32Z
python
2021-10-21T21:50:33Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,067
["changelogs/fragments/76069-fix-unarchive-file-listing-in-zip.yaml", "lib/ansible/modules/unarchive.py", "test/integration/targets/unarchive/tasks/test_exclude.yml"]
Unarchive with "exclude" causes group/owner to be not set
### Summary Trying to unarchive a .zip file with the "exclude" parameter set makes the unarchived files have wrong "owner" and "group". I am 80% certain this did not happen in 2.9, it does happen in 2.11. ### Issue Type Bug Report ### Component Name unarchive ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/x/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/ansible/lib64/python3.6/site-packages/ansible ansible collection location = /home/x/.ansible/collections:/usr/share/ansible/collections executable location = /opt/ansible/bin/ansible python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] jinja version = 3.0.2 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed I don't think this is relevant. ``` ### OS / Environment CentOS 7 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) - name: fail to set owner and group to apache, instead they are root unarchive: src: https://builds.matomo.org/matomo-latest.zip dest: /tmp exclude: "How to install Matomo.html" group: apache owner: apache remote_src: true ``` ### Expected Results All files extracted from archive should have owner and group set to "apache". ### Actual Results ```console Files have owner and group set to "root". ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76067
https://github.com/ansible/ansible/pull/76069
173550f93269253b95fa67cfc9658de59dbdb5ec
f92830d16e2fcca394a69b13e1017350e07152a3
2021-10-18T08:29:50Z
python
2021-10-29T19:12:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,049
["changelogs/fragments/76049-task-debugger-run_once.yml", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/debugger/aliases", "test/integration/targets/debugger/inventory", "test/integration/targets/debugger/runme.sh", "test/integration/targets/debugger/test_run_once.py", "test/integration/targets/debugger/test_run_once_playbook.yml"]
A successful task redo from Ansible debugger does not reactivate previously active hosts if `any_errors_fatal=yes` and `run_once=yes`
### Summary I have a playbook that drivers a cluster software upgrade. Because I need to ensure that all hosts belonging to the cluster will be upgraded, I have set `any_errors_fatal=yes` at play level. Also, in order to perform on-the-fly fixes for any issue raised during the playbook execution, I also have set `debugger=on_failure` at play level. One of the upgrade steps requires an action to be performed in a single node of the cluster, so on that particular task, I defined `run_once=yes`. However, under the combination of `any_errors_fatal=yes`, `debugger=on_failure` and `run_once=yes`, Ansible is not reactivating hosts that were active when a task intended to run only once faiis and is repeated. Instead, only the host where the task is executed comes back to to the list active hosts. As a consequence, if the debugger is invoked, the cluster software upgrade becomes incomplete. ### Issue Type Bug Report ### Component Name lib/ansible/plugins/strategy/__init__.py ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/amg1127/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /home/amg1127/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.7 (default, Aug 31 2021, 13:28:12) [GCC 11.1.0] jinja version = 3.0.2 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed # (blank output) # ``` ### OS / Environment Arch Linux ### Steps to Reproduce Please store the below content as `inventory.yml`: ```yaml (paste below) --- all: hosts: host1: ansible_connection: local host2: ansible_connection: local ``` And store the below content as `playbook.yml`: ```yaml (paste below) --- - hosts: all gather_facts: no debugger: on_failed any_errors_fatal: yes tasks: - name: Task 1 debug: var: inventory_hostname - name: Task 2 assert: that: 'false' run_once: yes - name: Task 3 debug: var: inventory_hostname ``` Run this command line: `ansible-playbook -i inventory.yml playbook.yml` Once the Ansible debugger is invoked after the `Task 2` failure, update the `that` argument for the `assert` module so that the evaluation is always `true`. Afterwards, redo the failed task. ``` (debug)> task.args['that'] = 'true' (debug)> r ``` ### Expected Results I expected `host2` to execute `Task 3` after the successful execution of `Task 2`. ``` PLAY [all] ************************************************************************************************************* TASK [Task 1] ********************************************************************************************************** ok: [host1] => { "inventory_hostname": "host1" } ok: [host2] => { "inventory_hostname": "host2" } TASK [Task 2] ********************************************************************************************************** fatal: [host1]: FAILED! => { "assertion": "false", "changed": false, "evaluated_to": false, "msg": "Assertion failed" } [host1] TASK: Task 2 (debug)> task.args['that'] = 'true' [host1] TASK: Task 2 (debug)> r ok: [host1] => { "changed": false, "msg": "All assertions passed" } TASK [Task 3] ********************************************************************************************************** ok: [host1] => { "inventory_hostname": "host1" } ok: [host2] => { "inventory_hostname": "host2" } PLAY RECAP ************************************************************************************************************* host1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 host2 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ### Actual Results ```console PLAY [all] ************************************************************************************************************* TASK [Task 1] ********************************************************************************************************** ok: [host1] => { "inventory_hostname": "host1" } ok: [host2] => { "inventory_hostname": "host2" } TASK [Task 2] ********************************************************************************************************** fatal: [host1]: FAILED! => { "assertion": "false", "changed": false, "evaluated_to": false, "msg": "Assertion failed" } [host1] TASK: Task 2 (debug)> task.args['that'] = 'true' [host1] TASK: Task 2 (debug)> r ok: [host1] => { "changed": false, "msg": "All assertions passed" } TASK [Task 3] ********************************************************************************************************** ok: [host1] => { "inventory_hostname": "host1" } PLAY RECAP ************************************************************************************************************* host1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 host2 : ok=1 changed=0 unreachable=0 failed=0 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/76049
https://github.com/ansible/ansible/pull/76814
cad200406af5df3e5b5034b141578bc44b142f0d
29de2cccba67f1feda93f28e9056240de4e35c3c
2021-10-15T10:30:08Z
python
2022-01-26T14:43:12Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,036
["lib/ansible/modules/dnf.py", "lib/ansible/modules/yum.py"]
yum docs: strange skip_broken description
### Summary In https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html , skip_broken description says: Skip packages with broken dependencies(devsolve) and are causing problems. a) Missing space before the opening parenthesis. b) The sentence seems weird - not fully sure what it tries to convey. Perhaps "Skip packages with broken dependencies (devsolve) and packages that are causing problems." ? ### Issue Type Documentation Report ### Component Name yum ### Ansible Version ```console latest ``` ### Configuration ```console Not relevant ``` ### OS / Environment Not relevant ### Additional Information Readable docs ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76036
https://github.com/ansible/ansible/pull/76038
9a0fe189159069edc5457500d638a89d71408500
4cf290918fd516c1a2fdf0465c5d9f252ee8f7b8
2021-10-14T05:59:02Z
python
2021-10-14T19:10:53Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,027
["lib/ansible/modules/hostname.py", "test/units/modules/test_hostname.py"]
ansible.builtin.hostname, RedHat strategy assumes Python 2
### Summary The [`RedHatStrategy` class in `lib/ansible/modules/hostname.py`](https://github.com/ansible/ansible/blob/c5d8dc0e119c8a1632afae8b55fb15e2a4a44177/lib/ansible/modules/hostname.py#L283-L318) does not follow the [Unicode Sandwich principles](https://docs.ansible.com/ansible/latest/dev_guide/developing_python_3.html#unicode-sandwich-common-borders-places-to-convert-bytes-to-text-in-controller-code) and so runs into an exception when the module is executed with Python 3: ```python Traceback (most recent call last): File "/tmp/ansible_hostname_payload_zjjaaj3t/ansible_hostname_payload.zip/ansible/modules/hostname.py", line 315, in get_permanent_hostname TypeError: startswith first arg must be bytes or a tuple of bytes, not str ``` ### Issue Type Bug Report ### Component Name ansible.builtin.hostname ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = None configured module search path = ['/Users/mj/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/4.6.0/libexec/lib/python3.9/site-packages/ansible ansible collection location = /Users/mj/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.9.7 (default, Sep 3 2021, 12:37:55) [Clang 12.0.5 (clang-1205.0.22.9)] jinja version = 3.0.1 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment CentOS 8 Stream ### Steps to Reproduce The following commands start a CentOS 8 docker container in the background, then attempts to set the hostname on that container; the last command removes the container again: ```sh docker run -d --rm --cap-add SYS_ADMIN --name mcve-hostname centos:8 /bin/sh -c 'while true; do sleep 5; done' ansible -i mcve-hostname, -c docker -m ansible.builtin.hostname -a 'name=mcve-hostname use=redhat' all -vvvv docker stop mcve-hostname ``` Note: the `--cap-add SYS_ADMIN` option for `docker run` is used to [allow the `hostname` command to be used](https://github.com/moby/moby/issues/8902#issuecomment-218911749). ### Expected Results I expected the hostname command to run without issue. ### Actual Results ```console ansible [core 2.11.5] config file = None configured module search path = ['/Users/mj/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/4.6.0/libexec/lib/python3.9/site-packages/ansible ansible collection location = /Users/mj/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.9.7 (default, Sep 3 2021, 12:37:55) [Clang 12.0.5 (clang-1205.0.22.9)] jinja version = 3.0.1 libyaml = True No config file found; using defaults setting up inventory plugins Parsed mcve-hostname, inventory source with host_list plugin Loading callback plugin minimal of type stdout, v2.0 from /usr/local/Cellar/ansible/4.6.0/libexec/lib/python3.9/site-packages/ansible/plugins/callback/minimal.py 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. META: ran handlers redirecting (type: connection) ansible.builtin.docker to community.docker.docker Loading collection community.docker from /Users/mj/.ansible/collections/ansible_collections/community/docker <mcve-hostname> ESTABLISH DOCKER CONNECTION FOR USER: root <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', "/bin/sh -c 'echo ~ && sleep 0'"] <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', '/bin/sh -c \'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259 `" && echo ansible-tmp-1634119089.8989718-55435-22274985961259="` echo /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259 `" ) && sleep 0\''] <mcve-hostname> Attempting python interpreter discovery <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', '/bin/sh -c \'echo PLATFORM; uname; echo FOUND; command -v \'"\'"\'/usr/bin/python\'"\'"\'; command -v \'"\'"\'python3.9\'"\'"\'; command -v \'"\'"\'python3.8\'"\'"\'; command -v \'"\'"\'python3.7\'"\'"\'; command -v \'"\'"\'python3.6\'"\'"\'; command -v \'"\'"\'python3.5\'"\'"\'; command -v \'"\'"\'python2.7\'"\'"\'; command -v \'"\'"\'python2.6\'"\'"\'; command -v \'"\'"\'/usr/libexec/platform-python\'"\'"\'; command -v \'"\'"\'/usr/bin/python3\'"\'"\'; command -v \'"\'"\'python\'"\'"\'; echo ENDFOUND && sleep 0\''] <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', "/bin/sh -c '/usr/libexec/platform-python && sleep 0'"] Using module file /usr/local/Cellar/ansible/4.6.0/libexec/lib/python3.9/site-packages/ansible/modules/hostname.py <mcve-hostname> PUT /Users/mj/.ansible/tmp/ansible-local-55433gdx_vwgr/tmp6ggw39on TO /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259/AnsiballZ_hostname.py <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', "/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259/ /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259/AnsiballZ_hostname.py && sleep 0'"] <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', "/bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259/AnsiballZ_hostname.py && sleep 0'"] <mcve-hostname> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'mcve-hostname', '/bin/sh', '-c', "/bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1634119089.8989718-55435-22274985961259/ > /dev/null 2>&1 && sleep 0'"] The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ansible.builtin.hostname_payload_wgq1w34m/ansible_ansible.builtin.hostname_payload.zip/ansible/modules/hostname.py", line 315, in get_permanent_hostname TypeError: startswith first arg must be bytes or a tuple of bytes, not str mcve-hostname | FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": false, "invocation": { "module_args": { "name": "mcve-hostname", "use": "redhat" } }, "msg": "failed to read hostname: startswith first arg must be bytes or a tuple of bytes, not str" } ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76027
https://github.com/ansible/ansible/pull/76032
abac141122d3c3beac29dae7f04551fb05ed9c74
08af0fbf95220f94e9bdcfdb3bb27f1b4d58f930
2021-10-13T09:28:03Z
python
2021-11-15T06:15:20Z
closed
ansible/ansible
https://github.com/ansible/ansible
76,007
["changelogs/fragments/ssh_use_right_host.yml", "lib/ansible/executor/task_executor.py", "lib/ansible/plugins/connection/ssh.py", "test/integration/targets/delegate_to/delegate_facts_loop.yml", "test/integration/targets/delegate_to/inventory", "test/integration/targets/delegate_to/runme.sh", "test/integration/targets/delegate_to/test_delegate_to.yml"]
delegate_to executing on wrong host
### Summary I have an inventory with two hosts, say H1 an H2. On H2, I execute a task with `delegate_to: H1`. It seems, however, that the task is eventually executed on H2. ### Issue Type Bug Report ### Component Name core ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/mrks/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /home/mrks/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.7 (default, Aug 31 2021, 13:28:12) [GCC 11.1.0] jinja version = 3.0.2 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed <none> ``` ### OS / Environment Arch Linux ### Steps to Reproduce Playbook: ```yaml - hosts: H2 tasks: - shell: hostname register: foo delegate_to: H1 - debug: var: foo ``` ### Expected Results Expected foo.stdout = 'H1'. By the way, I am pretty sure that this worked for a long time. ### Actual Results ```console TASK [shell] ******************************************************************* changed: [H2 -> H1] TASK [debug] ******************************************************************* ok: [H2] => { "foo": { ... "stdout": "H2", "stdout_lines": [ "H2" ] } } ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/76007
https://github.com/ansible/ansible/pull/76017
a5eadaf3fd5496bd1f100ff14badf5c4947185a2
be19863e44cc6b78706147b25489a73d7c8fbcb5
2021-10-11T19:53:38Z
python
2022-02-07T20:13:40Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,977
["docs/docsite/rst/user_guide/intro_dynamic_inventory.rst", "docs/docsite/rst/user_guide/intro_inventory.rst", "docs/docsite/rst/user_guide/playbook_pathing.rst", "docs/docsite/rst/user_guide/playbooks_intro.rst", "docs/docsite/rst/user_guide/playbooks_lookups.rst", "docs/docsite/rst/user_guide/playbooks_python_version.rst", "docs/docsite/rst/user_guide/windows_dsc.rst", "docs/docsite/rst/user_guide/windows_faq.rst", "docs/docsite/rst/user_guide/windows_usage.rst"]
Docs: Wrap code examples in code-block elements in 9 files in user_guide
**Assigned to @NarayanAdithya** ### 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:** Wrap 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:** The following files in the User Guide contain a number of lead-in sentences ending with `::`: intro_dynamic_inventory.rst: 2 sentences intro_inventory.rst: 1 sentence playbooks_intro.rst: 2 playbooks_python_version.rst: 2 playbooks_lookups.rst: 1 playbook_pathing.rst: 1 windows_usage.rst: 2 windows_faq.rst: 1 windows_dsc.rst: 1 To identify the line numbers affected, navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./<filename.rst> ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/intro_dynamic_inventory.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/75977
https://github.com/ansible/ansible/pull/75994
221c7373db3398b57ebe8931705ad74e97c39bec
d26ff4e3765a1979c37f904555997dc883245bc8
2021-10-08T12:43:35Z
python
2021-10-11T21:28:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,971
["changelogs/fragments/71627-add_host-group_by-fix-changed_when-in-loop.yml", "lib/ansible/constants.py", "lib/ansible/executor/task_executor.py", "lib/ansible/playbook/task.py", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/add_host/tasks/main.yml", "test/integration/targets/changed_when/tasks/main.yml"]
add_host module cannot handle a variable in a condition
### Summary When I define `failed_when:` condition in the task using `add_host`, it caused an error that the variable was not found. ### Issue Type Bug Report ### Component Name task ### Ansible Version ```console $ ansible --version ansible [core 2.11.2] config file = /etc/ansible/ansible.cfg configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible ansible collection location = /var/lib/awx/.ansible/collections:/usr/share/ansible/collections executable location = /usr/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 = 2.10.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed $ (nothing) ``` ### OS / Environment $ cat /etc/redhat-release Red Hat Enterprise Linux release 8.4 (Ootpa) ### Steps to Reproduce ### pattern 1: using `add_host` module ``` --- - hosts: localhost gather_facts: false vars: test: 1 tasks: - add_host: name: "myhost" groups: "mygroup" ansible_host: "host46" ansible_ssh_host: "192.168.100.100" failed_when: test == 2 ``` When I ran the above playbook, it failed with error as below even the variable 'test' was defined in the play. ``` $ ansible-playbook -i localhost, conditional.yml PLAY [localhost] ********************************************************************************************************************************************************************************* TASK [add_host] ********************************************************************************************************************************************************************************** ERROR! The conditional check 'test == 2' failed. The error was: error while evaluating conditional (test == 2): 'test' is undefined ``` If I passed the variable as an extra_vars and specified to be true, it worked as expected. ``` $ ansible-playbook -i localhost, conditional.yml -e "{test: 2}" PLAY [localhost] ********************************************************************************************************************************************************************************* TASK [add_host] ********************************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"add_host": {"groups": ["mygroup"], "host_name": "myhost", "host_vars": {"ansible_host": "host46", "ansible_ssh_host": "192.168.100.100"}}, "changed": false, "failed_when_result": true} NO MORE HOSTS LEFT ******************************************************************************************************************************************************************************* PLAY RECAP *************************************************************************************************************************************************************************************** localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` On the other hand when "{test: 1}", it failed. ``` $ ansible-playbook -i localhost, conditional.yml -e "{test: 1}" PLAY [localhost] ********************************************************************************************************************************************************************************* TASK [add_host] ********************************************************************************************************************************************************************************** ERROR! The conditional check 'test == 2' failed. The error was: error while evaluating conditional (test == 2): 'test' is undefined ``` ### pattern 2: using `debug` module, it worked as desired ``` --- - hosts: localhost gather_facts: false vars: test: 1 tasks: - debug: msg: "debug message" failed_when: test == 2 ``` It works. ``` $ ansible-playbook -i localhost, debug.yml PLAY [localhost] ********************************************************************************************************************************************************************************* TASK [debug] ************************************************************************************************************************************************************************************* ok: [localhost] => { "msg": "debug message" } PLAY RECAP *************************************************************************************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` When passed `2`, it failed as expected. ``` $ ansible-playbook -i localhost, debug.yml -e "{test: 2}" PLAY [localhost] ********************************************************************************************************************************************************************************* TASK [debug] ************************************************************************************************************************************************************************************* fatal: [localhost]: FAILED! => { "msg": "debug message" } PLAY RECAP *************************************************************************************************************************************************************************************** localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` ### Expected Results The `pattern 1` should work as the `pattern 2` from the point of view of handling the conditional. ### Actual Results ```console (already pasted above) ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75971
https://github.com/ansible/ansible/pull/71719
2749d9fbf9242a59ed87f46ea057d84f4768a93e
394d216922d70709248a60f58da300f1e70f5894
2021-10-08T06:47:15Z
python
2022-02-04T11:35:23Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,937
["docs/docsite/rst/user_guide/playbooks_best_practices.rst"]
Add code-block elements to format 3 code examples in user_guide/playbooks_best_practices.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:** The `user_guide/playbooks_best_practices.rst` file in the User Guide, contains **3 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_best_practices.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_best_practices.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/75937
https://github.com/ansible/ansible/pull/75939
bc0caad2ad28851bb3030a3ac4cba81ded3c67f8
801db758d345201daba64603666d0ceab240bf50
2021-10-07T14:19:55Z
python
2021-10-07T16:56:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,936
["docs/docsite/rst/user_guide/playbooks_module_defaults.rst"]
Add code-block elements to format 5 code examples in user_guide/playbooks_module_defaults.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:** The `user_guide/playbooks_module_defaults.rst` file in the User Guide, contains **5 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_module_defaults.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_module_defaults.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/75936
https://github.com/ansible/ansible/pull/75942
a2ff765e065d515bd449a742504461a15277048b
81eec4a05a4b91b4bd30de73369413931b1f63e4
2021-10-07T13:29:39Z
python
2021-10-11T12:14:56Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,933
["docs/docsite/rst/user_guide/playbooks_prompts.rst"]
Add code-block elements to format 4 code examples in user_guide/playbooks_prompts.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:** The `user_guide/playbooks_prompts.rst` file in the User Guide, contains **4 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_prompts.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_prompts.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/75933
https://github.com/ansible/ansible/pull/75935
d0b88eecd859f5e280d4627564d0b29c74b4efe6
b03afeec6c3bf866316f60910722b0c5e1dfc8ae
2021-10-07T12:32:56Z
python
2021-10-08T20:01:50Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,926
["docs/docsite/rst/user_guide/playbooks_handlers.rst"]
Add code-block elements to format 5 code examples in user_guide/playbooks_handlers.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:** The `user_guide/playbooks_handlers.rst` file in the User Guide, contains **5 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_handlers.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_handlers.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/75926
https://github.com/ansible/ansible/pull/75928
81eec4a05a4b91b4bd30de73369413931b1f63e4
5c4bbed2de4d881a1c9077510cdf1cc228302c59
2021-10-06T20:04:13Z
python
2021-10-11T15:48:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,925
["docs/docsite/rst/user_guide/playbooks_checkmode.rst"]
Add code-block elements to format 5 code examples in user_guide/playbooks_checkmode.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:** The `user_guide/playbooks_checkmode.rst` file in the User Guide, contains **5 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_checkmode.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_checkmode.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/75925
https://github.com/ansible/ansible/pull/75931
22a540e109fc6331b3a600238c1326ee605371ea
71811407c5997244316919454f8606ba97dc6e8c
2021-10-06T19:58:34Z
python
2021-10-11T17:42:06Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,924
["docs/docsite/rst/user_guide/modules_intro.rst"]
Add code-block elements to format 5 code examples in user_guide/modules_intro.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:** The `user_guide/modules_intro.rst` file in the User Guide, contains **5 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./modules_intro.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/modules_intro.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/75924
https://github.com/ansible/ansible/pull/75932
a4a7a348936b9d2ea346ef465c1958c459ec83ee
a2ff765e065d515bd449a742504461a15277048b
2021-10-06T19:52:55Z
python
2021-10-11T11:26:53Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,923
["docs/docsite/rst/user_guide/playbooks_advanced_syntax.rst"]
Add code-block elements to format 6 code examples in user_guide/playbooks_advanced_syntax.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:** The `user_guide/playbooks_advanced_syntax.rst` file in the User Guide, contains **6 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_advanced_syntax.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_advanced_syntax.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/75923
https://github.com/ansible/ansible/pull/75981
8e77943a977ee6c0cc5519baef29ff27b64b63a0
89bc7ebfe67e7f6fde4f447ae929e0fefe8fa590
2021-10-06T19:48:39Z
python
2021-10-08T17:13:46Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,922
["docs/docsite/rst/user_guide/playbooks_environment.rst"]
Add code-block elements to format 6 code examples in user_guide/playbooks_environment.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:** The `user_guide/playbooks_environment.rst` file in the User Guide, contains **6 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_environment.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_environment.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/75922
https://github.com/ansible/ansible/pull/75929
b03afeec6c3bf866316f60910722b0c5e1dfc8ae
4381336fbb2cc374fac561d1aee126401628bf8a
2021-10-06T19:32:00Z
python
2021-10-08T20:27:33Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,921
["docs/docsite/rst/user_guide/vault.rst"]
Add code-block elements to format 7 code examples in user_guide/vault.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:** The `user_guide/vault.rst` file in the User Guide, contains **7 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./vault.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/vault.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/75921
https://github.com/ansible/ansible/pull/75963
71811407c5997244316919454f8606ba97dc6e8c
fffa9412f40d3191723cf17046cfc828ca2718da
2021-10-06T19:24:58Z
python
2021-10-11T18:09:18Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,920
["docs/docsite/rst/user_guide/playbooks_async.rst"]
Add code-block elements to format 7 code examples in user_guide/playbooks_async.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:** The `user_guide/playbooks_async.rst` file in the User Guide, contains **7 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_async.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_async.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/75920
https://github.com/ansible/ansible/pull/75947
fffa9412f40d3191723cf17046cfc828ca2718da
cd540544fd735c217291622f7abb660d457efa42
2021-10-06T19:19:37Z
python
2021-10-11T18:30:39Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,919
["docs/docsite/rst/user_guide/playbooks_debugger.rst"]
Add code-block elements to format 7 code examples in user_guide/playbooks_debugger.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:** The `user_guide/playbooks_debugger.rst` file in the User Guide, contains **7 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_debugger.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_debugger.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/75919
https://github.com/ansible/ansible/pull/75968
cd540544fd735c217291622f7abb660d457efa42
d0edf69fe0db2f81ae0814648e627e40626c93ab
2021-10-06T19:15:52Z
python
2021-10-11T19:43:22Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,918
["docs/docsite/rst/user_guide/playbooks_delegation.rst"]
Add code-block elements to format 8 code examples in user_guide/playbooks_delegation.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:** The `user_guide/playbooks_delegation.rst` file in the User Guide, contains **8 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_delegation.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_delegation.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/75918
https://github.com/ansible/ansible/pull/75973
d0edf69fe0db2f81ae0814648e627e40626c93ab
84ec9763788bb40e3319b2ab36ab62f157ba14a7
2021-10-06T18:50:54Z
python
2021-10-11T19:59:42Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,915
["docs/docsite/rst/user_guide/windows_winrm.rst"]
Add code-block elements to format 11 code examples in user_guide/windows_winrm.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:** The `user_guide/windows_winrm.rst` file in the User Guide, contains **11 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./windows_winrm.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/windows_winrm.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/75915
https://github.com/ansible/ansible/pull/75974
84ec9763788bb40e3319b2ab36ab62f157ba14a7
37eefb47c55c39ac853ed8f7327eee0197bf9d0c
2021-10-06T17:48:07Z
python
2021-10-11T20:15:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,914
["docs/docsite/rst/user_guide/windows_setup.rst"]
Add code-block elements to format 13 code examples in user_guide/windows_setup.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:** The `user_guide/windows_setup.rst` file in the User Guide, contains **13 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./windows_setup.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/windows_setup.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/75914
https://github.com/ansible/ansible/pull/75956
89bc7ebfe67e7f6fde4f447ae929e0fefe8fa590
d0b88eecd859f5e280d4627564d0b29c74b4efe6
2021-10-06T17:43:16Z
python
2021-10-08T17:49:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,912
["docs/docsite/rst/user_guide/playbooks_vars_facts.rst"]
Add code-block elements to format 13 code examples in user_guide/playbooks_vars_facts.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:** The `user_guide/playbooks_vars_facts.rst` file in the User Guide, contains **13 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_vars_facts.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_vars_facts.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/75912
https://github.com/ansible/ansible/pull/75961
37eefb47c55c39ac853ed8f7327eee0197bf9d0c
fd346565d3f681844e6223b93930b8039db59e95
2021-10-06T17:24:53Z
python
2021-10-11T20:28:35Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,911
["docs/docsite/rst/user_guide/playbooks_strategies.rst"]
Add code-block elements to format 13 code examples in user_guide/playbooks_strategies.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:** The `user_guide/playbooks_strategies.rst` file in the User Guide, contains **13 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_strategies.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_strategies.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/75911
https://github.com/ansible/ansible/pull/75960
fd346565d3f681844e6223b93930b8039db59e95
221c7373db3398b57ebe8931705ad74e97c39bec
2021-10-06T17:10:57Z
python
2021-10-11T20:53:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,909
["docs/docsite/rst/user_guide/intro_patterns.rst"]
Add code-block elements to format 13 code examples in user_guide/intro_patterns.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:** The `user_guide/intro_patterns.rst` file in the User Guide, contains **13 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./intro_patterns.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/intro_patterns.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/75909
https://github.com/ansible/ansible/pull/75941
4381336fbb2cc374fac561d1aee126401628bf8a
a4a7a348936b9d2ea346ef465c1958c459ec83ee
2021-10-06T17:03:24Z
python
2021-10-08T21:12:06Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,908
["docs/docsite/rst/user_guide/playbooks_error_handling.rst"]
Add code-block elements to format 14 code examples in user_guide/playbooks_error_handling.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:** The `user_guide/playbooks_error_handling.rst` file in the User Guide, contains **23 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_error_handling.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_error_handling.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/75908
https://github.com/ansible/ansible/pull/75978
4d8a724071769f86cbaa3c3b59be7177f4acdd79
d6dbc1a26f1a02a0eca1ecb80eeab658ba104fb6
2021-10-06T16:48:47Z
python
2021-10-11T22:18:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,906
["docs/docsite/rst/user_guide/playbooks_conditionals.rst"]
Add code-block elements to format 14 code examples in user_guide/playbooks_conditionals.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:** The `user_guide/playbooks_conditionals.rst` file in the User Guide, contains **14 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_conditionals.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_conditionals.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/75906
https://github.com/ansible/ansible/pull/75965
d26ff4e3765a1979c37f904555997dc883245bc8
4d8a724071769f86cbaa3c3b59be7177f4acdd79
2021-10-06T15:58:03Z
python
2021-10-11T21:40:01Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,905
["docs/docsite/rst/user_guide/sample_setup.rst"]
Add code-block elements to format 18 code examples in user_guide/sample_setup.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:** The `user_guide/sample_setup.rst` file in the User Guide, contains **18 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./sample_setup.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/sample_setup.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/75905
https://github.com/ansible/ansible/pull/75964
44446924364ca32fe1b62a80243b15fafe64b125
2a3aa66fbd2a41a64048f75658080783ce3525be
2021-10-06T15:53:09Z
python
2021-10-12T11:21:30Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,902
["docs/docsite/rst/user_guide/playbooks_tests.rst"]
Add code-block elements to format 18 code examples in user_guide/playbooks_tests.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:** The `user_guide/playbooks_tests.rst.rst` file in the User Guide, contains **18 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_tests.rst.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_tests.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/75902
https://github.com/ansible/ansible/pull/75952
6319a0f415e5fcc966e5424bb2191b19e770cf49
6bf65f624610c6c1c5fb03f17b10e4f970357cf3
2021-10-06T15:30:03Z
python
2021-10-12T09:39:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,900
["docs/docsite/rst/user_guide/playbooks_loops.rst"]
Docs: Add code-block elements to format 21 code examples in user_guide/playbooks_loops.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:** The `user_guide/playbooks_loops.rst` file in the User Guide, contains **21 instances** of lead-in sentences ending with `::`. Navigate to the `docs/docsite/rst/user_guide/` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_loops.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_guide/playbooks_loops.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/75900
https://github.com/ansible/ansible/pull/75916
afbef70bad14d4b9dfe0ea74ea1fec956710221d
6319a0f415e5fcc966e5424bb2191b19e770cf49
2021-10-06T14:28:09Z
python
2021-10-12T09:25:13Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,897
["docs/docsite/rst/user_guide/playbooks_filters_ipaddr.rst"]
Docs: Add code-block elements to format 61 code examples in user_guide/playbooks_filters_ipaddr.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:** The `user_guide/playbooks_filters_ipaddr.rst` file in the User Guide, contains **61 instances** of lead-in sentences ending with `::`. Navigate to the `user_guide` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_filters_ipaddr.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_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.
https://github.com/ansible/ansible/issues/75897
https://github.com/ansible/ansible/pull/75951
2a3aa66fbd2a41a64048f75658080783ce3525be
fa4a92f221e4b8044433a9eae023ead24e08f81d
2021-10-06T13:11:48Z
python
2021-10-12T12:08:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,896
["docs/docsite/rst/user_guide/playbooks_filters.rst"]
Docs: Add code-block elements to format 163 code examples in user_guide/playbooks_filters.rst
### Summary **Problem**: Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`. **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:** The `user_guide/playbooks_filters.rst` file in the User Guide, contains **163 instances** of lead-in sentences ending with `::`. Navigate to the `user_guide` directory and use the following `grep` command to identify the line numbers: ``` $ grep -rn "^[[:blank:]]*[^[:blank:]\.\.].*::$" ./playbooks_filters.rst ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` 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/user_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/75896
https://github.com/ansible/ansible/pull/75953
aff5e5dfc629dadf6a8f9672b7975aec6d50f490
9eeaf1c5b56b142c09967201dd3f2713a226f803
2021-10-06T12:05:19Z
python
2021-10-14T15:11:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,890
["docs/docsite/rst/user_guide/collections_using.rst"]
Invalid characters for collection playbook filenames
### Summary When I try to run a collection playbook with `ansible-core` from the `devel` branch on GitHub, an error occurs if the playbook contains a dash (`-`) in the playbook filename. ### Issue Type Documentation Report ### Component Name ansible-playbook ### 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.13.0.dev0] (devel 000ae00cfd) last updated 2021/10/05 10:34:48 (GMT -400) config file = /etc/ansible/ansible.cfg configured module search path = ['/home/dank/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/dank/git/ansible/lib/ansible ansible collection location = /home/dank/.ansible/collections:/usr/share/ansible/collections executable location = /home/dank/git/ansible/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 $ ansible-config dump --only-changed [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. ``` ### OS / Environment RHEL 8.4 ### Steps to Reproduce ## Step 1 I created a test collection on GitHub, and used the following requirements file: ```yaml collections: - name: https://github.com/dkolepp/test_collection.git type: git ``` ## Step 2 I installed the collection: ```bash [prompt] $ ansible-galaxy install -r requirements.yml [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. Cloning into '/home/dank/.ansible/tmp/ansible-local-163750xtswmblv/tmptlqigevj/test_collection0_77vi8h'... remote: Enumerating objects: 9, done. remote: Counting objects: 100% (9/9), done. remote: Compressing objects: 100% (7/7), done. remote: Total 9 (delta 1), reused 9 (delta 1), pack-reused 0 Receiving objects: 100% (9/9), done. Resolving deltas: 100% (1/1), done. Your branch is up to date with 'origin/main'. Starting galaxy collection install process Process install dependency map Starting collection install process Installing 'dkolepp.test_collection:1.0.0' to '/home/dank/.ansible/collections/ansible_collections/dkolepp/test_collection' Created collection for dkolepp.test_collection:1.0.0 at /home/dank/.ansible/collections/ansible_collections/dkolepp/test_collection dkolepp.test_collection:1.0.0 was installed successfully ``` ## Step 3 I ran a playbook in the collection that does not contain a dash (`-`) in the filename (`dkolepp.test_collection.this_works.yml`): ```bash [prompt] $ ansible-playbook dkolepp.test_collection.this_works.yml [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. [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' [WARNING]: running playbook inside collection dkolepp.test_collection PLAY [Test Playbook (No Dashes)] *********************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Show a message] ********************************************************** ok: [localhost] => { "msg": "Hello World" } PLAY RECAP ********************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` and compared that to a playbook in the collection that **does** have a dash (`-`) in the filename (`dkolepp.test_collection.this-doesnt-work.yml`): ```bash [prompt] $ ansible-playbook dkolepp.test_collection.this-doesnt-work.yml [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. ERROR! the playbook: dkolepp.test_collection.this-doesnt-work.yml could not be found ``` ### Expected Results I expected the `dkolepp.test_collection.this-doesnt-work.yml` playbook to be "findable" by ansible-playbook. If the fullpath works, then the shortcut should also work also: ## Step 4 I did verify that the playbook is included with the collection, and can be executed using the full path location of the playbook: ```bash [prompt] $ ansible-playbook ~/.ansible/collections/ansible_collections/dkolepp/test_collection/playbooks/this-doesnt-work.yml [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. [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' [WARNING]: running playbook inside collection dkolepp.test_collection PLAY [Test Playbook (No Dashes)] *********************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Show a message] ********************************************************** ok: [localhost] => { "msg": "Hello Hidden World" } PLAY RECAP ********************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ### Actual Results ```console (venv) ✔ ~/git/ansible [devel|✔] 10:54 $ ansible-playbook dkolepp.test_collection.this-doesnt-work.yml -vvvv [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-playbook [core 2.13.0.dev0] (devel 000ae00cfd) last updated 2021/10/05 10:34:48 (GMT -400) config file = /etc/ansible/ansible.cfg configured module search path = ['/home/dank/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/dank/git/ansible/lib/ansible ansible collection location = /home/dank/.ansible/collections:/usr/share/ansible/collections executable location = /home/dank/git/ansible/bin/ansible-playbook 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 Using /etc/ansible/ansible.cfg as config file ERROR! the playbook: dkolepp.test_collection.this-doesnt-work.yml could not be found ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75890
https://github.com/ansible/ansible/pull/75891
9eeaf1c5b56b142c09967201dd3f2713a226f803
ff792d252e84ab0cbfa8d40d1ff8c2bf19adffe0
2021-10-05T14:58:20Z
python
2021-10-14T15:25:14Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,889
["lib/ansible/modules/user.py"]
'groups' feature of user builtin doesn't mention deleting groups
### Summary I was surprised to after using Ansible to add some users to a group, that they had been removed from all other groups (crucially, including one used to grant them `sudo` rights!). ### Issue Type Documentation Report ### Component Name user_module ### Ansible Version ```console nsible [core 2.11.5] config file = /redacted/git/devops-ansible/ansible.cfg configured module search path = ['/home/mark/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /home/mark/.ansible/collections:/usr/share/ansible/collections executable location = /sbin/ansible python version = 3.9.7 (default, Aug 31 2021, 13:28:12) [GCC 11.1.0] jinja version = 3.0.1 libyaml = True ``` ### Configuration ```console N/A ``` ### OS / Environment Arch Linux ### Additional Information I re-read the docs for the `user` built-in and it only mentions that the user will be *added* to groups mentioned in the groups list. The docs currently fail to mention that they will be removed from all groups *not* in the groups array. I presume this behavior is as intended, but the docs should clarify that the user's non-primary groups will be set to exactly those in the list, any other pre-existing group memberships will be removed. Here's a sample playbook that illustrated the behavior: ```yaml --- - hosts: fave-server become: true become_user: root tasks: - name: "add users to some group" loop: - sue - john user: name: "{{ item }}" state: present groups: - some ``` Try having the users already exist with other group memberships and they will be removed and replace with only a `some` group membership. (I tested with Ansible 2.11.5). ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75889
https://github.com/ansible/ansible/pull/76096
f92830d16e2fcca394a69b13e1017350e07152a3
765924a3a4cda6bce843b28f3453dd87df43b105
2021-10-05T14:16:14Z
python
2021-10-29T20:01:21Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,873
["changelogs/fragments/ansible-test-inventory-path.yaml", "test/lib/ansible_test/_internal/cli/compat.py"]
default inventory path not found when running network-integration tests
### Summary When running `ansible-test network-integration` on the `devel` branch the inventory file fails to be found. This problem is being caused because the default inventory path uses `test` instead of `tests`. https://github.com/ansible/ansible/blob/f4d4391a1f5d4d2b4159d9976216c5861023be2c/test/lib/ansible_test/_internal/cli/compat.py#L472 Although I am only running network-integration tests, it appears that windows integration tests would encounter the same issue. https://github.com/ansible/ansible/blob/f4d4391a1f5d4d2b4159d9976216c5861023be2c/test/lib/ansible_test/_internal/cli/compat.py#L470 From what I can tell this was introduced in #75605 ### Issue Type Bug Report ### Component Name test/lib/ansible_test/_internal/cli/compat.py ### Ansible Version ```console $ ansible --version ansible [core 2.13.0.dev0] (devel f4d4391a1f) last updated 2021/10/02 08:11:28 (GMT -500) config file = None configured module search path = ['/Users/pinkman/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/pinkman/DEV/ansible/lib/ansible ansible collection location = /Users/pinkman/.ansible/collections:/usr/share/ansible/collections executable location = /Users/pinkman/DEV/ansible/bin/ansible python version = 3.9.7 (v3.9.7:1016ef3790, Aug 30 2021, 16:39:15) [Clang 6.0 (clang-600.0.57)] jinja version = 3.0.1 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment MacOS ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> You can observe this behavior by running networking integration tests with: ``` ansible-test networking-integration ``` ### Expected Results Inventory should be found and network integration tests should be ran against targets. ### Actual Results ```console ERROR: Inventory not found: /Users/pinkman/DEV/ansible-datapower/ansible_collections/community/datapower/test/integration/inventory.networking Use --inventory to specify the inventory path. Use --platform to provision resources and generate an inventory file. See also inventory template: /Users/pinkman/DEV/ansible/test/lib/ansible_test/config/inventory.networking.template ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75873
https://github.com/ansible/ansible/pull/75944
801db758d345201daba64603666d0ceab240bf50
8cef40f839510010ad83f70bd2bbe26aef2060e0
2021-10-02T19:39:01Z
python
2021-10-07T17:19:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,834
["changelogs/fragments/ssh_debug_noparse.yml", "lib/ansible/plugins/connection/ssh.py", "test/units/plugins/connection/test_ssh.py"]
Extra Verbosity fails play
### Summary When I use `become: yes` and turn the logging verbosity to `-vvv` it works perfectly fine. When the verbosity is increased to `-vvvv` every run fails at the very beginning. Without `become: yes` even the `-vvvv` passes. ### Issue Type Bug Report ### Component Name Core ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] jinja version = 3.0.1 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ANSIBLE_PIPELINING(/workspace/ansible.cfg) = True CALLBACKS_ENABLED(/workspace/ansible.cfg) = ['ansible.posix.profile_tasks', 'community.general.log_plays'] DEFAULT_FORKS(/workspace/ansible.cfg) = 10 DEFAULT_GATHERING(/workspace/ansible.cfg) = smart DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = ['/workspace/common-ansible/roles'] INTERPRETER_PYTHON(/workspace/ansible.cfg) = auto ``` ### OS / Environment Ubuntu 20.04.3 LTS ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) --- - hosts: gitlab_runners become: true tasks: - debug: msg=Success ``` ### Expected Results Play should run through with a lot of debug messages. ### Actual Results Ouptut with `-vvvv` ```console ansible-playbook [core 2.11.5] config file = /workspace/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible-playbook python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] jinja version = 3.0.1 libyaml = True Using /workspace/ansible.cfg as config file setting up inventory plugins host_list declined parsing /workspace/inventories/test/hosts.yml as it did not pass its verify_file() method script declined parsing /workspace/inventories/test/hosts.yml as it did not pass its verify_file() method Parsed /workspace/inventories/test/hosts.yml inventory source with yaml plugin Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.8/dist-packages/ansible/plugins/callback/default.py Loading collection ansible.posix from /usr/local/lib/python3.8/dist-packages/ansible_collections/ansible/posix Loading collection community.general from /usr/local/lib/python3.8/dist-packages/ansible_collections/community/general 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. Loading callback plugin ansible.posix.profile_tasks of type aggregate, v2.0 from /usr/local/lib/python3.8/dist-packages/ansible_collections/ansible/posix/plugins/callback/profile_tasks.py Loading callback plugin community.general.log_plays of type notification, v2.0 from /usr/local/lib/python3.8/dist-packages/ansible_collections/community/general/plugins/callback/log_plays.py PLAYBOOK: test.yml ************************************************************* Positional arguments: test.yml verbosity: 4 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/workspace/inventories/test/hosts.yml',) forks: 10 1 plays in test.yml PLAY [gitlab_runners] ********************************************************** Trying secret ScriptVaultSecret(filename='/opt/print_vault_password.py') for vault_id=default TASK [Gathering Facts] ********************************************************* task path: /workspace/test.yml:2 Thursday 30 September 2021 14:38:16 +0000 (0:00:00.060) 0:00:00.060 **** Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/setup.py Pipelining is enabled. <10.1.1.201> ESTABLISH SSH CONNECTION FOR USER: manager <10.1.1.201> SSH: EXEC sshpass -d10 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="manager"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/48372ad7a3 10.1.1.201 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:" -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-muszsaqzcjtetkenkeiiqhqnnsdqlvmx ; python3'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded <10.1.1.201> (1, b'', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 10.1.1.201 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/root/.ansible/cp/48372ad7a3" does not exist\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to 10.1.1.201 [10.1.1.201] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: SELinux support disabled\r\ndebug1: identity file /root/.ssh/id_rsa type -1\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: identity file /root/.ssh/id_dsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa_sk type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519 type -1\r\ndebug1: identity file /root/.ssh/id_ed25519-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519_sk type -1\r\ndebug1: identity file /root/.ssh/id_ed25519_sk-cert type -1\r\ndebug1: identity file /root/.ssh/id_xmss type -1\r\ndebug1: identity file /root/.ssh/id_xmss-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.3\r\ndebug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 10.1.1.201:22 as \'manager\'\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c\r\ndebug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],ssh-ed25519,[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: [email protected],zlib,none\r\ndebug2: compression stoc: [email protected],zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256\r\ndebug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected]\r\ndebug2: compression stoc: none,[email protected]\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ecdsa-sha2-nistp256\r\ndebug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: [email protected]\r\ndebug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: [email protected]\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:LylIOfTqWm+geE35hisc6xKHr/ZHTHTs/UQn80pYXOo\r\nWarning: Permanently added \'10.1.1.201\' (ECDSA) to the list of known hosts.\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey out after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey in after 134217728 blocks\r\ndebug1: Will attempt key: /root/.ssh/id_rsa \r\ndebug1: Will attempt key: /root/.ssh/id_dsa \r\ndebug1: Will attempt key: /root/.ssh/id_ecdsa \r\ndebug1: Will attempt key: /root/.ssh/id_ecdsa_sk \r\ndebug1: Will attempt key: /root/.ssh/id_ed25519 \r\ndebug1: Will attempt key: /root/.ssh/id_ed25519_sk \r\ndebug1: Will attempt key: /root/.ssh/id_xmss \r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]>\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug3: start over, passed a different list publickey,password\r\ndebug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: keyboard-interactive,password\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Trying private key: /root/.ssh/id_rsa\r\ndebug3: no such identity: /root/.ssh/id_rsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_dsa\r\ndebug3: no such identity: /root/.ssh/id_dsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ecdsa\r\ndebug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ecdsa_sk\r\ndebug3: no such identity: /root/.ssh/id_ecdsa_sk: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ed25519\r\ndebug3: no such identity: /root/.ssh/id_ed25519: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ed25519_sk\r\ndebug3: no such identity: /root/.ssh/id_ed25519_sk: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_xmss\r\ndebug3: no such identity: /root/.ssh/id_xmss: No such file or directory\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup password\r\ndebug3: remaining preferred: ,password\r\ndebug3: authmethod_is_enabled password\r\ndebug1: Next authentication method: password\r\ndebug3: send packet: type 50\r\ndebug2: we sent a password packet, wait for reply\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (password).\r\nAuthenticated to 10.1.1.201 ([10.1.1.201]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /root/.ansible/cp/48372ad7a3.XW29Aj350ciuha3l\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/root/.ansible/cp/48372ad7a3]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 16\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: mux_master_process_hello: channel 1 slave version 4\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: mux_master_process_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 18\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 256\r\ndebug3: mux_master_process_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 6 setting O_NONBLOCK\r\ndebug2: fd 7 setting O_NONBLOCK\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: mux_master_process_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype [email protected] want_reply 0\r\ndebug3: receive packet: type 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = C.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c \'sudo -H -S -p "[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:" -u root /bin/sh -c \'"\'"\'echo BECOME-SUCCESS-muszsaqzcjtetkenkeiiqhqnnsdqlvmx ; python3\'"\'"\' && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: channel_input_open_confirmation: channel 2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug2: channel 2: read<=0 rfd 6 len 0\r\ndebug2: channel 2: read failed\r\ndebug2: channel 2: chan_shutdown_read (i0 o0 sock -1 wfd 6 efd 8 [write])\r\ndebug2: channel 2: input open -> drain\r\ndebug2: channel 2: ibuf empty\r\ndebug2: channel 2: send eof\r\ndebug3: send packet: type 96\r\ndebug2: channel 2: input drain -> closed\r\ndebug2: channel 2: rcvd adjust 65536\r\ndebug2: channel 2: rcvd ext data 66\r\n[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8\r\ndebug2: channel 2: rcvd ext data 18\r\nSorry, try again.\ndebug2: channel 2: written 18 to efd 8\r\ndebug2: channel 2: rcvd ext data 66\r\n[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8\r\ndebug2: channel 2: rcvd ext data 18\r\nSorry, try again.\ndebug2: channel 2: written 18 to efd 8\r\ndebug2: channel 2: rcvd ext data 66\r\n[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8\r\ndebug2: channel 2: rcvd ext data 36\r\nsudo: 3 incorrect password attempts\ndebug2: channel 2: written 36 to efd 8\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype [email protected] reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: chan_shutdown_write (i3 o1 sock -1 wfd 7 efd 8 [write])\r\ndebug2: channel 2: output drain -> closed\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug3: channel 2: will not send data after close\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 1\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: channel 1: chan_shutdown_read (i0 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: input open -> closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n #1 mux-control (t16 nr0 i3/0 o1/16 e[closed]/0 fd 5/5/-1 sock 5 cc -1)\r\n #2 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/8 sock -1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: chan_shutdown_write (i3 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: output drain -> closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux_master_control_cleanup_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n #1 mux-control (t16 nr0 i3/0 o3/0 e[closed]/0 fd 5/5/-1 sock 5 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n') <10.1.1.201> Failed to connect to the host via ssh: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug2: resolve_canonicalize: hostname 10.1.1.201 is address debug1: auto-mux: Trying existing master debug1: Control socket "/root/.ansible/cp/48372ad7a3" does not exist debug2: ssh_connect_direct debug1: Connecting to 10.1.1.201 [10.1.1.201] port 22. debug2: fd 3 setting O_NONBLOCK debug1: fd 3 clearing O_NONBLOCK debug1: Connection established. debug3: timeout: 10000 ms remain after connect debug1: SELinux support disabled debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa_sk type -1 debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /root/.ssh/id_ed25519 type -1 debug1: identity file /root/.ssh/id_ed25519-cert type -1 debug1: identity file /root/.ssh/id_ed25519_sk type -1 debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /root/.ssh/id_xmss type -1 debug1: identity file /root/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.3 debug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to 10.1.1.201:22 as 'manager' debug3: send packet: type 20 debug1: SSH2_MSG_KEXINIT sent debug3: receive packet: type 20 debug1: SSH2_MSG_KEXINIT received debug2: local client KEXINIT proposal debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],ssh-ed25519,[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: [email protected],zlib,none debug2: compression stoc: [email protected],zlib,none debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[email protected] debug2: compression stoc: none,[email protected] debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: [email protected] debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: [email protected] debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: Server host key: ecdsa-sha2-nistp256 SHA256:LylIOfTqWm+geE35hisc6xKHr/ZHTHTs/UQn80pYXOo Warning: Permanently added '10.1.1.201' (ECDSA) to the list of known hosts. debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug1: SSH2_MSG_NEWKEYS received debug2: set_newkeys: mode 0 debug1: rekey in after 134217728 blocks debug1: Will attempt key: /root/.ssh/id_rsa debug1: Will attempt key: /root/.ssh/id_dsa debug1: Will attempt key: /root/.ssh/id_ecdsa debug1: Will attempt key: /root/.ssh/id_ecdsa_sk debug1: Will attempt key: /root/.ssh/id_ed25519 debug1: Will attempt key: /root/.ssh/id_ed25519_sk debug1: Will attempt key: /root/.ssh/id_xmss debug2: pubkey_prepare: done debug3: send packet: type 5 debug3: receive packet: type 7 debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]> debug3: receive packet: type 6 debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug3: send packet: type 50 debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,password debug3: start over, passed a different list publickey,password debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/id_rsa debug3: no such identity: /root/.ssh/id_rsa: No such file or directory debug1: Trying private key: /root/.ssh/id_dsa debug3: no such identity: /root/.ssh/id_dsa: No such file or directory debug1: Trying private key: /root/.ssh/id_ecdsa debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /root/.ssh/id_ecdsa_sk debug3: no such identity: /root/.ssh/id_ecdsa_sk: No such file or directory debug1: Trying private key: /root/.ssh/id_ed25519 debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory debug1: Trying private key: /root/.ssh/id_ed25519_sk debug3: no such identity: /root/.ssh/id_ed25519_sk: No such file or directory debug1: Trying private key: /root/.ssh/id_xmss debug3: no such identity: /root/.ssh/id_xmss: No such file or directory debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: ,password debug3: authmethod_is_enabled password debug1: Next authentication method: password debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 52 debug1: Enabling compression at level 6. debug1: Authentication succeeded (password). Authenticated to 10.1.1.201 ([10.1.1.201]:22). debug1: setting up multiplex master socket debug3: muxserver_listen: temporary control path /root/.ansible/cp/48372ad7a3.XW29Aj350ciuha3l debug2: fd 4 setting O_NONBLOCK debug3: fd 4 is O_NONBLOCK debug3: fd 4 is O_NONBLOCK debug1: channel 0: new [/root/.ansible/cp/48372ad7a3] debug3: muxserver_listen: mux listener channel 0 fd 4 debug2: fd 3 setting TCP_NODELAY debug3: ssh_packet_set_tos: set IP_TOS 0x08 debug1: control_persist_detach: backgrounding master process debug2: control_persist_detach: background process is 16 debug2: fd 4 setting O_NONBLOCK debug1: forking to background debug1: Entering interactive session. debug1: pledge: id debug2: set_control_persist_exit_time: schedule exit in 60 seconds debug1: multiplexing control connection debug2: fd 5 setting O_NONBLOCK debug3: fd 5 is O_NONBLOCK debug1: channel 1: new [mux-control] debug3: channel_post_mux_listener: new mux channel 1 fd 5 debug3: mux_master_read_cb: channel 1: hello sent debug2: set_control_persist_exit_time: cancel scheduled exit debug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4 debug2: mux_master_process_hello: channel 1 slave version 4 debug2: mux_client_hello_exchange: master version 4 debug3: mux_client_forwards: request forwardings: 0 local, 0 remote debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4 debug2: mux_master_process_alive_check: channel 1: alive check debug3: mux_client_request_alive: done pid = 18 debug3: mux_client_request_session: session request sent debug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 256 debug3: mux_master_process_new_session: got fds stdin 6, stdout 7, stderr 8 debug2: fd 6 setting O_NONBLOCK debug2: fd 7 setting O_NONBLOCK debug2: fd 8 setting O_NONBLOCK debug1: channel 2: new [client-session] debug2: mux_master_process_new_session: channel_new: 2 linked to control channel 1 debug2: channel 2: send open debug3: send packet: type 90 debug3: receive packet: type 80 debug1: client_input_global_request: rtype [email protected] want_reply 0 debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 2: callback start debug2: client_session2_setup: id 2 debug1: Sending environment. debug1: Sending env LANG = C.UTF-8 debug2: channel 2: request env confirm 0 debug3: send packet: type 98 debug1: Sending command: /bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:" -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-muszsaqzcjtetkenkeiiqhqnnsdqlvmx ; python3'"'"' && sleep 0' debug2: channel 2: request exec confirm 1 debug3: send packet: type 98 debug3: mux_session_confirm: sending success reply debug2: channel_input_open_confirmation: channel 2: callback done debug2: channel 2: open confirm rwindow 0 rmax 32768 debug2: channel 2: rcvd adjust 2097152 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 2 debug2: exec request accepted on channel 2 debug2: channel 2: read<=0 rfd 6 len 0 debug2: channel 2: read failed debug2: channel 2: chan_shutdown_read (i0 o0 sock -1 wfd 6 efd 8 [write]) debug2: channel 2: input open -> drain debug2: channel 2: ibuf empty debug2: channel 2: send eof debug3: send packet: type 96 debug2: channel 2: input drain -> closed debug2: channel 2: rcvd adjust 65536 debug2: channel 2: rcvd ext data 66 [sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8 debug2: channel 2: rcvd ext data 18 Sorry, try again. debug2: channel 2: written 18 to efd 8 debug2: channel 2: rcvd ext data 66 [sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8 debug2: channel 2: rcvd ext data 18 Sorry, try again. debug2: channel 2: written 18 to efd 8 debug2: channel 2: rcvd ext data 66 [sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8 debug2: channel 2: rcvd ext data 36 sudo: 3 incorrect password attempts debug2: channel 2: written 36 to efd 8 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 2 rtype [email protected] reply 0 debug2: channel 2: rcvd eow debug3: receive packet: type 96 debug2: channel 2: rcvd eof debug2: channel 2: output open -> drain debug2: channel 2: obuf empty debug2: channel 2: chan_shutdown_write (i3 o1 sock -1 wfd 7 efd 8 [write]) debug2: channel 2: output drain -> closed debug2: channel 2: send close debug3: send packet: type 97 debug3: channel 2: will not send data after close debug3: receive packet: type 98 debug1: client_input_channel_req: channel 2 rtype exit-status reply 0 debug3: mux_exit_message: channel 2: exit message, exitval 1 debug3: receive packet: type 97 debug2: channel 2: rcvd close debug3: channel 2: will not send data after close debug2: channel 2: is dead debug2: channel 2: gc: notify user debug3: mux_master_session_cleanup_cb: entering for channel 2 debug2: channel 1: rcvd close debug2: channel 1: output open -> drain debug2: channel 1: chan_shutdown_read (i0 o1 sock 5 wfd 5 efd -1 [closed]) debug2: channel 1: input open -> closed debug2: channel 2: gc: user detached debug2: channel 2: is dead debug2: channel 2: garbage collecting debug1: channel 2: free: client-session, nchannels 3 debug3: channel 2: status: The following connections are open: #1 mux-control (t16 nr0 i3/0 o1/16 e[closed]/0 fd 5/5/-1 sock 5 cc -1) #2 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/8 sock -1 cc -1) debug2: channel 1: obuf empty debug2: channel 1: chan_shutdown_write (i3 o1 sock 5 wfd 5 efd -1 [closed]) debug2: channel 1: output drain -> closed debug2: channel 1: is dead (local) debug2: channel 1: gc: notify user debug3: mux_master_control_cleanup_cb: entering for channel 1 debug2: channel 1: gc: user detached debug2: channel 1: is dead (local) debug2: channel 1: garbage collecting debug1: channel 1: free: mux-control, nchannels 2 debug3: channel 1: status: The following connections are open: #1 mux-control (t16 nr0 i3/0 o3/0 e[closed]/0 fd 5/5/-1 sock 5 cc -1) debug2: set_control_persist_exit_time: schedule exit in 60 seconds debug3: mux_client_read_packet: read header failed: Broken pipe debug2: Received exit status from master 1 fatal: [test1]: FAILED! => { "ansible_facts": {}, "changed": false, "failed_modules": { "ansible.legacy.setup": { "failed": true, "module_stderr": "OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 10.1.1.201 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/root/.ansible/cp/48372ad7a3\" does not exist\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to 10.1.1.201 [10.1.1.201] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: SELinux support disabled\r\ndebug1: identity file /root/.ssh/id_rsa type -1\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: identity file /root/.ssh/id_dsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa_sk type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519 type -1\r\ndebug1: identity file /root/.ssh/id_ed25519-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519_sk type -1\r\ndebug1: identity file /root/.ssh/id_ed25519_sk-cert type -1\r\ndebug1: identity file /root/.ssh/id_xmss type -1\r\ndebug1: identity file /root/.ssh/id_xmss-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.3\r\ndebug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 10.1.1.201:22 as 'manager'\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c\r\ndebug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],ssh-ed25519,[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: [email protected],zlib,none\r\ndebug2: compression stoc: [email protected],zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256\r\ndebug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected]\r\ndebug2: compression stoc: none,[email protected]\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ecdsa-sha2-nistp256\r\ndebug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: [email protected]\r\ndebug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: [email protected]\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:LylIOfTqWm+geE35hisc6xKHr/ZHTHTs/UQn80pYXOo\r\nWarning: Permanently added '10.1.1.201' (ECDSA) to the list of known hosts.\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey out after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey in after 134217728 blocks\r\ndebug1: Will attempt key: /root/.ssh/id_rsa \r\ndebug1: Will attempt key: /root/.ssh/id_dsa \r\ndebug1: Will attempt key: /root/.ssh/id_ecdsa \r\ndebug1: Will attempt key: /root/.ssh/id_ecdsa_sk \r\ndebug1: Will attempt key: /root/.ssh/id_ed25519 \r\ndebug1: Will attempt key: /root/.ssh/id_ed25519_sk \r\ndebug1: Will attempt key: /root/.ssh/id_xmss \r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]>\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug3: start over, passed a different list publickey,password\r\ndebug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: keyboard-interactive,password\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Trying private key: /root/.ssh/id_rsa\r\ndebug3: no such identity: /root/.ssh/id_rsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_dsa\r\ndebug3: no such identity: /root/.ssh/id_dsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ecdsa\r\ndebug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ecdsa_sk\r\ndebug3: no such identity: /root/.ssh/id_ecdsa_sk: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ed25519\r\ndebug3: no such identity: /root/.ssh/id_ed25519: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_ed25519_sk\r\ndebug3: no such identity: /root/.ssh/id_ed25519_sk: No such file or directory\r\ndebug1: Trying private key: /root/.ssh/id_xmss\r\ndebug3: no such identity: /root/.ssh/id_xmss: No such file or directory\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup password\r\ndebug3: remaining preferred: ,password\r\ndebug3: authmethod_is_enabled password\r\ndebug1: Next authentication method: password\r\ndebug3: send packet: type 50\r\ndebug2: we sent a password packet, wait for reply\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (password).\r\nAuthenticated to 10.1.1.201 ([10.1.1.201]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /root/.ansible/cp/48372ad7a3.XW29Aj350ciuha3l\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/root/.ansible/cp/48372ad7a3]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 16\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: mux_master_process_hello: channel 1 slave version 4\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: mux_master_process_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 18\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 256\r\ndebug3: mux_master_process_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 6 setting O_NONBLOCK\r\ndebug2: fd 7 setting O_NONBLOCK\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: mux_master_process_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype [email protected] want_reply 0\r\ndebug3: receive packet: type 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = C.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c 'sudo -H -S -p \"[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:\" -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-muszsaqzcjtetkenkeiiqhqnnsdqlvmx ; python3'\"'\"' && sleep 0'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: channel_input_open_confirmation: channel 2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug2: channel 2: read<=0 rfd 6 len 0\r\ndebug2: channel 2: read failed\r\ndebug2: channel 2: chan_shutdown_read (i0 o0 sock -1 wfd 6 efd 8 [write])\r\ndebug2: channel 2: input open -> drain\r\ndebug2: channel 2: ibuf empty\r\ndebug2: channel 2: send eof\r\ndebug3: send packet: type 96\r\ndebug2: channel 2: input drain -> closed\r\ndebug2: channel 2: rcvd adjust 65536\r\ndebug2: channel 2: rcvd ext data 66\r\n[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8\r\ndebug2: channel 2: rcvd ext data 18\r\nSorry, try again.\ndebug2: channel 2: written 18 to efd 8\r\ndebug2: channel 2: rcvd ext data 66\r\n[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8\r\ndebug2: channel 2: rcvd ext data 18\r\nSorry, try again.\ndebug2: channel 2: written 18 to efd 8\r\ndebug2: channel 2: rcvd ext data 66\r\n[sudo via ansible, key=muszsaqzcjtetkenkeiiqhqnnsdqlvmx] password:debug2: channel 2: written 66 to efd 8\r\ndebug2: channel 2: rcvd ext data 36\r\nsudo: 3 incorrect password attempts\ndebug2: channel 2: written 36 to efd 8\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype [email protected] reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: chan_shutdown_write (i3 o1 sock -1 wfd 7 efd 8 [write])\r\ndebug2: channel 2: output drain -> closed\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug3: channel 2: will not send data after close\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 1\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: channel 1: chan_shutdown_read (i0 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: input open -> closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n #1 mux-control (t16 nr0 i3/0 o1/16 e[closed]/0 fd 5/5/-1 sock 5 cc -1)\r\n #2 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/8 sock -1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: chan_shutdown_write (i3 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: output drain -> closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux_master_control_cleanup_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n #1 mux-control (t16 nr0 i3/0 o3/0 e[closed]/0 fd 5/5/-1 sock 5 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } }, "msg": "The following modules failed to execute: ansible.legacy.setup\n" } PLAY RECAP ********************************************************************* test1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Thursday 30 September 2021 14:38:33 +0000 (0:00:17.037) 0:00:17.098 **** =============================================================================== Gathering Facts -------------------------------------------------------- 17.04s /workspace/test.yml:2 --------------------------------------------------------- ``` Ouptut with `-vvv` ```console ansible-playbook [core 2.11.5] config file = /workspace/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible-playbook python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] jinja version = 3.0.1 libyaml = True Using /workspace/ansible.cfg as config file host_list declined parsing /workspace/inventories/test/hosts.yml as it did not pass its verify_file() method script declined parsing /workspace/inventories/test/hosts.yml as it did not pass its verify_file() method Parsed /workspace/inventories/test/hosts.yml inventory source with yaml plugin 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: test.yml ************************************************************* 1 plays in test.yml PLAY [gitlab_runners] ********************************************************** TASK [Gathering Facts] ********************************************************* task path: /workspace/test.yml:2 Thursday 30 September 2021 14:39:02 +0000 (0:00:00.044) 0:00:00.044 **** Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/setup.py Pipelining is enabled. <10.1.1.201> ESTABLISH SSH CONNECTION FOR USER: manager <10.1.1.201> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="manager"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/48372ad7a3 10.1.1.201 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=emwqvsoxlkrjzgibgvumxuqwnsbstafh] password:" -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-emwqvsoxlkrjzgibgvumxuqwnsbstafh ; python3'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded <10.1.1.201> (0, b'\n{"ansible_facts": {"ansible_system": "Linux", "ansible_kernel": "5.4.0-86-generic", "ansible_kernel_version": "#97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021", "ansible_machine": "x86_64", "ansible_python_version": "3.8.10", "ansible_fqdn": "test1", "ansible_hostname": "test1", "ansible_nodename": "test1", "ansible_domain": "", "ansible_userspace_bits": "64", "ansible_architecture": "x86_64", "ansible_userspace_architecture": "x86_64", "ansible_machine_id": "c47dd6e16b184c00a0226434c8d1b693", "ansible_user_id": "root", "ansible_user_uid": 0, "ansible_user_gid": 0, "ansible_user_gecos": "root", "ansible_user_dir": "/root", "ansible_user_shell": "/bin/bash", "ansible_real_user_id": 0, "ansible_effective_user_id": 0, "ansible_real_group_id": 0, "ansible_effective_group_id": 0, "ansible_python": {"version": {"major": 3, "minor": 8, "micro": 10, "releaselevel": "final", "serial": 0}, "version_info": [3, 8, 10, "final", 0], "executable": "/usr/bin/python3", "has_sslcontext": true, "type": "cpython"}, "ansible_fibre_channel_wwn": [], "ansible_is_chroot": false, "ansible_dns": {"nameservers": ["127.0.0.53"], "options": {"edns0": true, "trust-ad": true}, "search": ["frauscher.intern"]}, "ansible_processor": ["0", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz", "1", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz"], "ansible_processor_count": 1, "ansible_processor_cores": 2, "ansible_processor_threads_per_core": 1, "ansible_processor_vcpus": 2, "ansible_processor_nproc": 2, "ansible_memtotal_mb": 1987, "ansible_memfree_mb": 1459, "ansible_swaptotal_mb": 0, "ansible_swapfree_mb": 0, "ansible_memory_mb": {"real": {"total": 1987, "used": 528, "free": 1459}, "nocache": {"free": 1790, "used": 197}, "swap": {"total": 0, "free": 0, "used": 0, "cached": 0}}, "ansible_bios_date": "12/01/2006", "ansible_bios_vendor": "innotek GmbH", "ansible_bios_version": "VirtualBox", "ansible_board_asset_tag": "NA", "ansible_board_name": "VirtualBox", "ansible_board_serial": "0", "ansible_board_vendor": "Oracle Corporation", "ansible_board_version": "1.2", "ansible_chassis_asset_tag": "NA", "ansible_chassis_serial": "NA", "ansible_chassis_vendor": "Oracle Corporation", "ansible_chassis_version": "NA", "ansible_form_factor": "Other", "ansible_product_name": "VirtualBox", "ansible_product_serial": "0", "ansible_product_uuid": "e0eea82f-53ae-3447-bc29-87fb43fa6de8", "ansible_product_version": "1.2", "ansible_system_vendor": "innotek GmbH", "ansible_devices": {"loop1": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "4096", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "137728", "sectorsize": "512", "size": "67.25 MB", "host": "", "holders": []}, "sdb": {"virtual": 1, "links": {"ids": [], "uuids": ["2021-09-23-22-20-32-00"], "labels": ["cidata"], "masters": []}, "vendor": "VBOX", "model": "HARDDISK", "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "20480", "sectorsize": "512", "size": "10.00 MB", "host": "SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI", "holders": []}, "loop6": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "0", "sectorsize": "512", "size": "0.00 Bytes", "host": "", "holders": []}, "loop4": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "0", "sectorsize": "512", "size": "0.00 Bytes", "host": "", "holders": []}, "loop2": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "4096", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "66168", "sectorsize": "512", "size": "32.31 MB", "host": "", "holders": []}, "loop0": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "4096", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "126504", "sectorsize": "512", "size": "61.77 MB", "host": "", "holders": []}, "loop7": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "0", "sectorsize": "512", "size": "0.00 Bytes", "host": "", "holders": []}, "sda": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": "VBOX", "model": "HARDDISK", "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {"sda1": {"links": {"ids": [], "uuids": ["94aefc52-4039-4b4a-8b2a-65124174d9b9"], "labels": ["cloudimg-rootfs"], "masters": []}, "start": "2048", "sectors": "83883999", "sectorsize": 512, "size": "40.00 GB", "uuid": "94aefc52-4039-4b4a-8b2a-65124174d9b9", "holders": []}}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "83886080", "sectorsize": "512", "size": "40.00 GB", "host": "SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI", "holders": []}, "loop5": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "0", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "0", "sectorsize": "512", "size": "0.00 Bytes", "host": "", "holders": []}, "loop3": {"virtual": 1, "links": {"ids": [], "uuids": [], "labels": [], "masters": []}, "vendor": null, "model": null, "sas_address": null, "sas_device_handle": null, "removable": "0", "support_discard": "4096", "partitions": {}, "rotational": "1", "scheduler_mode": "mq-deadline", "sectors": "0", "sectorsize": "512", "size": "0.00 Bytes", "host": "", "holders": []}}, "ansible_device_links": {"ids": {}, "uuids": {"sda1": ["94aefc52-4039-4b4a-8b2a-65124174d9b9"], "sdb": ["2021-09-23-22-20-32-00"]}, "labels": {"sda1": ["cloudimg-rootfs"], "sdb": ["cidata"]}, "masters": {}}, "ansible_uptime_seconds": 319, "ansible_lvm": {"lvs": {}, "vgs": {}, "pvs": {}}, "ansible_mounts": [{"mount": "/", "device": "/dev/sda1", "fstype": "ext4", "options": "rw,relatime", "size_total": 41567858688, "size_available": 40172617728, "block_size": 4096, "block_total": 10148403, "block_available": 9807768, "block_used": 340635, "inode_total": 5120000, "inode_available": 5047941, "inode_used": 72059, "uuid": "94aefc52-4039-4b4a-8b2a-65124174d9b9"}, {"mount": "/snap/core20/1081", "device": "/dev/loop0", "fstype": "squashfs", "options": "ro,nodev,relatime", "size_total": 64880640, "size_available": 0, "block_size": 131072, "block_total": 495, "block_available": 0, "block_used": 495, "inode_total": 11720, "inode_available": 0, "inode_used": 11720, "uuid": "N/A"}, {"mount": "/snap/lxd/21545", "device": "/dev/loop1", "fstype": "squashfs", "options": "ro,nodev,relatime", "size_total": 70516736, "size_available": 0, "block_size": 131072, "block_total": 538, "block_available": 0, "block_used": 538, "inode_total": 796, "inode_available": 0, "inode_used": 796, "uuid": "N/A"}, {"mount": "/snap/snapd/13170", "device": "/dev/loop2", "fstype": "squashfs", "options": "ro,nodev,relatime", "size_total": 33947648, "size_available": 0, "block_size": 131072, "block_total": 259, "block_available": 0, "block_used": 259, "inode_total": 474, "inode_available": 0, "inode_used": 474, "uuid": "N/A"}], "ansible_system_capabilities_enforced": "False", "ansible_system_capabilities": [], "ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBANhTZfF+TbSqS3c3V0mYbiGOOHdB+wzCQlw73P/orjE3GaQQ3u3x4FA5RZcrfaBXKxgCatn4oTHbYN1vPhRECVvasTgZtyNP418lXaEsd4fJ7SLc0ju4BKaq8Pr5ppNSbcOEKru96ENnbHHrDi/XC7fKSpHijjGDhK86+HYs724/AAAAFQDGLonRqAKyuVczMoJLceaRShaCAwAAAIArdhTSkCW1LKS6II0NSonSQWeFb6f0X2kGVmfyvy9wFDgwdx5BkMEdaJBZrdIrROHQF+IPcK3jNfEAeJjfJ07YSFPiTQGzV6Y3clHchT/y6z0t0yHn+eP3w3OEjAPwRB4NAOdGsQdpg7Qs/sgSLjJ47EbLpf6P+ImfH7L8NMNB+wAAAIBIIpiFAEOa670brc4+aIJhObs3vuCKkmr9lOHBBqtMM/a8CQprG8PrbacZ3TRUBzBMTmWyFVSsniEpAhy1V7BHt7sgUBWu27A4fb1O94Vb1r7cXZ8BSKnT8TRmzdnxMdYPAiYhgQYF3uRfPB97AjBlDOaZGIug7quxtoM8+lg6YQ==", "ansible_ssh_host_key_dsa_public_keytype": "ssh-dss", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDYA8nuLROQD6tE5QAyK/7j+ewLYa+xOLFcDelQ2ack4gh8+2cM11oEvuz6QcL4xVKIOz308M8WK9x6dKGF2ujCaSEp2/DWXLbpCX/Rn6pB6OOeolq6Cop/OTE8M9tutCzyG1mr9UZZTkPks/j3bsIPPHjHNf/554BH4beG7zTlzARp4MABqkmTQ1XGGzZLxzRGKUUJaLo+6mxxf+3mcKKpzHTHiaGf20s57WXIbokJ1PJ4iwh/zdT93ebG7VwxxPcxDs+UwHcTJMnhXHpOwlXaBxUyawzOWGceWnpmlXs/aycqZ/5LbZf1BQp13WnDiLfuD1tzXCHq0Dl05cnMuOJhwSSb+13UZr1uxk7y8EUiYKKbOoamj7+8wvfi++3mGwHW1kokm1wWsu79EBxaVu7r0nTxs57JuCHFIUvDt63ajI0G4+U9Qhu7Kxi9NmNyoyv1JSPVXyv2dSZFQZwh6phzyyztirQSR4wbTzlEbmhKHESMUkhE0mgdMWajxzLUIXM=", "ansible_ssh_host_key_rsa_public_keytype": "ssh-rsa", "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOrElzJrdktqNP+A5xDLWb3KLPYOjn9q/0v0+/15rBMNgTvkQXyVhbV/b8OxEpjo7evCk4XNM6Zg17N5AxdDX7k=", "ansible_ssh_host_key_ecdsa_public_keytype": "ecdsa-sha2-nistp256", "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAICHStriNsa0rVUQpwU7t4cmg+DNXSPVS+csFo7nbnlHx", "ansible_ssh_host_key_ed25519_public_keytype": "ssh-ed25519", "ansible_iscsi_iqn": "", "ansible_fips": false, "ansible_distribution": "Ubuntu", "ansible_distribution_release": "focal", "ansible_distribution_version": "20.04", "ansible_distribution_major_version": "20", "ansible_distribution_file_path": "/etc/os-release", "ansible_distribution_file_variety": "Debian", "ansible_distribution_file_parsed": true, "ansible_os_family": "Debian", "ansible_virtualization_role": "guest", "ansible_virtualization_type": "virtualbox", "ansible_virtualization_tech_guest": ["virtualbox"], "ansible_virtualization_tech_host": [], "ansible_lsb": {"id": "Ubuntu", "description": "Ubuntu 20.04.3 LTS", "release": "20.04", "codename": "focal", "major_release": "20"}, "ansible_cmdline": {"BOOT_IMAGE": "/boot/vmlinuz-5.4.0-86-generic", "root": "UUID=94aefc52-4039-4b4a-8b2a-65124174d9b9", "ro": true, "console": "ttyS0"}, "ansible_proc_cmdline": {"BOOT_IMAGE": "/boot/vmlinuz-5.4.0-86-generic", "root": "UUID=94aefc52-4039-4b4a-8b2a-65124174d9b9", "ro": true, "console": ["tty1", "ttyS0"]}, "ansible_hostnqn": "", "ansible_local": {}, "ansible_env": {"SUDO_GID": "1900", "MAIL": "/var/mail/root", "USER": "root", "HOME": "/root", "SUDO_UID": "1900", "LOGNAME": "root", "TERM": "unknown", "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin", "LANG": "C.UTF-8", "SUDO_COMMAND": "/bin/sh -c echo BECOME-SUCCESS-emwqvsoxlkrjzgibgvumxuqwnsbstafh ; python3", "SHELL": "/bin/bash", "SUDO_USER": "manager", "PWD": "/home/manager"}, "ansible_interfaces": ["enp0s8", "enp0s3", "lo"], "ansible_enp0s8": {"device": "enp0s8", "macaddress": "08:00:27:67:8d:69", "mtu": 1500, "active": true, "module": "e1000", "type": "ether", "pciid": "0000:00:08.0", "speed": 1000, "promisc": false, "ipv4": {"address": "10.1.1.201", "broadcast": "10.1.1.255", "netmask": "255.255.255.0", "network": "10.1.1.0"}, "ipv6": [{"address": "fe80::a00:27ff:fe67:8d69", "prefix": "64", "scope": "link"}], "features": {"rx_checksumming": "off", "tx_checksumming": "on", "tx_checksum_ipv4": "off [fixed]", "tx_checksum_ip_generic": "on", "tx_checksum_ipv6": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "scatter_gather": "on", "tx_scatter_gather": "on", "tx_scatter_gather_fraglist": "off [fixed]", "tcp_segmentation_offload": "on", "tx_tcp_segmentation": "on", "tx_tcp_ecn_segmentation": "off [fixed]", "tx_tcp_mangleid_segmentation": "off", "tx_tcp6_segmentation": "off [fixed]", "generic_segmentation_offload": "on", "generic_receive_offload": "on", "large_receive_offload": "off [fixed]", "rx_vlan_offload": "on", "tx_vlan_offload": "on [fixed]", "ntuple_filters": "off [fixed]", "receive_hashing": "off [fixed]", "highdma": "off [fixed]", "rx_vlan_filter": "on [fixed]", "vlan_challenged": "off [fixed]", "tx_lockless": "off [fixed]", "netns_local": "off [fixed]", "tx_gso_robust": "off [fixed]", "tx_fcoe_segmentation": "off [fixed]", "tx_gre_segmentation": "off [fixed]", "tx_gre_csum_segmentation": "off [fixed]", "tx_ipxip4_segmentation": "off [fixed]", "tx_ipxip6_segmentation": "off [fixed]", "tx_udp_tnl_segmentation": "off [fixed]", "tx_udp_tnl_csum_segmentation": "off [fixed]", "tx_gso_partial": "off [fixed]", "tx_sctp_segmentation": "off [fixed]", "tx_esp_segmentation": "off [fixed]", "tx_udp_segmentation": "off [fixed]", "fcoe_mtu": "off [fixed]", "tx_nocache_copy": "off", "loopback": "off [fixed]", "rx_fcs": "off", "rx_all": "off", "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "rx_vlan_stag_filter": "off [fixed]", "l2_fwd_offload": "off [fixed]", "hw_tc_offload": "off [fixed]", "esp_hw_offload": "off [fixed]", "esp_tx_csum_hw_offload": "off [fixed]", "rx_udp_tunnel_port_offload": "off [fixed]", "tls_hw_tx_offload": "off [fixed]", "tls_hw_rx_offload": "off [fixed]", "rx_gro_hw": "off [fixed]", "tls_hw_record": "off [fixed]"}, "timestamping": ["tx_software", "rx_software", "software"], "hw_timestamp_filters": []}, "ansible_enp0s3": {"device": "enp0s3", "macaddress": "02:de:69:7f:c7:01", "mtu": 1500, "active": true, "module": "e1000", "type": "ether", "pciid": "0000:00:03.0", "speed": 1000, "promisc": false, "ipv4": {"address": "10.0.2.15", "broadcast": "10.0.2.255", "netmask": "255.255.255.0", "network": "10.0.2.0"}, "ipv6": [{"address": "fe80::de:69ff:fe7f:c701", "prefix": "64", "scope": "link"}], "features": {"rx_checksumming": "off", "tx_checksumming": "on", "tx_checksum_ipv4": "off [fixed]", "tx_checksum_ip_generic": "on", "tx_checksum_ipv6": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "scatter_gather": "on", "tx_scatter_gather": "on", "tx_scatter_gather_fraglist": "off [fixed]", "tcp_segmentation_offload": "on", "tx_tcp_segmentation": "on", "tx_tcp_ecn_segmentation": "off [fixed]", "tx_tcp_mangleid_segmentation": "off", "tx_tcp6_segmentation": "off [fixed]", "generic_segmentation_offload": "on", "generic_receive_offload": "on", "large_receive_offload": "off [fixed]", "rx_vlan_offload": "on", "tx_vlan_offload": "on [fixed]", "ntuple_filters": "off [fixed]", "receive_hashing": "off [fixed]", "highdma": "off [fixed]", "rx_vlan_filter": "on [fixed]", "vlan_challenged": "off [fixed]", "tx_lockless": "off [fixed]", "netns_local": "off [fixed]", "tx_gso_robust": "off [fixed]", "tx_fcoe_segmentation": "off [fixed]", "tx_gre_segmentation": "off [fixed]", "tx_gre_csum_segmentation": "off [fixed]", "tx_ipxip4_segmentation": "off [fixed]", "tx_ipxip6_segmentation": "off [fixed]", "tx_udp_tnl_segmentation": "off [fixed]", "tx_udp_tnl_csum_segmentation": "off [fixed]", "tx_gso_partial": "off [fixed]", "tx_sctp_segmentation": "off [fixed]", "tx_esp_segmentation": "off [fixed]", "tx_udp_segmentation": "off [fixed]", "fcoe_mtu": "off [fixed]", "tx_nocache_copy": "off", "loopback": "off [fixed]", "rx_fcs": "off", "rx_all": "off", "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "rx_vlan_stag_filter": "off [fixed]", "l2_fwd_offload": "off [fixed]", "hw_tc_offload": "off [fixed]", "esp_hw_offload": "off [fixed]", "esp_tx_csum_hw_offload": "off [fixed]", "rx_udp_tunnel_port_offload": "off [fixed]", "tls_hw_tx_offload": "off [fixed]", "tls_hw_rx_offload": "off [fixed]", "rx_gro_hw": "off [fixed]", "tls_hw_record": "off [fixed]"}, "timestamping": ["tx_software", "rx_software", "software"], "hw_timestamp_filters": []}, "ansible_lo": {"device": "lo", "mtu": 65536, "active": true, "type": "loopback", "promisc": false, "ipv4": {"address": "127.0.0.1", "broadcast": "", "netmask": "255.0.0.0", "network": "127.0.0.0"}, "ipv6": [{"address": "::1", "prefix": "128", "scope": "host"}], "features": {"rx_checksumming": "on [fixed]", "tx_checksumming": "on", "tx_checksum_ipv4": "off [fixed]", "tx_checksum_ip_generic": "on [fixed]", "tx_checksum_ipv6": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_sctp": "on [fixed]", "scatter_gather": "on", "tx_scatter_gather": "on [fixed]", "tx_scatter_gather_fraglist": "on [fixed]", "tcp_segmentation_offload": "on", "tx_tcp_segmentation": "on", "tx_tcp_ecn_segmentation": "on", "tx_tcp_mangleid_segmentation": "on", "tx_tcp6_segmentation": "on", "generic_segmentation_offload": "on", "generic_receive_offload": "on", "large_receive_offload": "off [fixed]", "rx_vlan_offload": "off [fixed]", "tx_vlan_offload": "off [fixed]", "ntuple_filters": "off [fixed]", "receive_hashing": "off [fixed]", "highdma": "on [fixed]", "rx_vlan_filter": "off [fixed]", "vlan_challenged": "on [fixed]", "tx_lockless": "on [fixed]", "netns_local": "on [fixed]", "tx_gso_robust": "off [fixed]", "tx_fcoe_segmentation": "off [fixed]", "tx_gre_segmentation": "off [fixed]", "tx_gre_csum_segmentation": "off [fixed]", "tx_ipxip4_segmentation": "off [fixed]", "tx_ipxip6_segmentation": "off [fixed]", "tx_udp_tnl_segmentation": "off [fixed]", "tx_udp_tnl_csum_segmentation": "off [fixed]", "tx_gso_partial": "off [fixed]", "tx_sctp_segmentation": "on", "tx_esp_segmentation": "off [fixed]", "tx_udp_segmentation": "off [fixed]", "fcoe_mtu": "off [fixed]", "tx_nocache_copy": "off [fixed]", "loopback": "on [fixed]", "rx_fcs": "off [fixed]", "rx_all": "off [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "rx_vlan_stag_filter": "off [fixed]", "l2_fwd_offload": "off [fixed]", "hw_tc_offload": "off [fixed]", "esp_hw_offload": "off [fixed]", "esp_tx_csum_hw_offload": "off [fixed]", "rx_udp_tunnel_port_offload": "off [fixed]", "tls_hw_tx_offload": "off [fixed]", "tls_hw_rx_offload": "off [fixed]", "rx_gro_hw": "off [fixed]", "tls_hw_record": "off [fixed]"}, "timestamping": ["tx_software", "rx_software", "software"], "hw_timestamp_filters": []}, "ansible_default_ipv4": {"gateway": "10.0.2.2", "interface": "enp0s3", "address": "10.0.2.15", "broadcast": "10.0.2.255", "netmask": "255.255.255.0", "network": "10.0.2.0", "macaddress": "02:de:69:7f:c7:01", "mtu": 1500, "type": "ether", "alias": "enp0s3"}, "ansible_default_ipv6": {}, "ansible_all_ipv4_addresses": ["10.1.1.201", "10.0.2.15"], "ansible_all_ipv6_addresses": ["fe80::a00:27ff:fe67:8d69", "fe80::de:69ff:fe7f:c701"], "ansible_selinux_python_present": true, "ansible_selinux": {"status": "disabled"}, "ansible_apparmor": {"status": "enabled"}, "ansible_date_time": {"year": "2021", "month": "09", "weekday": "Thursday", "weekday_number": "4", "weeknumber": "39", "day": "30", "hour": "14", "minute": "39", "second": "09", "epoch": "1633012749", "date": "2021-09-30", "time": "14:39:09", "iso8601_micro": "2021-09-30T14:39:09.397030Z", "iso8601": "2021-09-30T14:39:09Z", "iso8601_basic": "20210930T143909397030", "iso8601_basic_short": "20210930T143909", "tz": "UTC", "tz_dst": "UTC", "tz_offset": "+0000"}, "ansible_service_mgr": "systemd", "ansible_pkg_mgr": "apt", "gather_subset": ["all"], "module_setup": true}, "invocation": {"module_args": {"gather_subset": ["all"], "gather_timeout": 10, "filter": [], "fact_path": "/etc/ansible/facts.d"}}}\n', b"Warning: Permanently added '10.1.1.201' (ECDSA) to the list of known hosts.\r\n") ok: [test1] META: ran handlers TASK [debug] ******************************************************************* task path: /workspace/test.yml:5 Thursday 30 September 2021 14:39:19 +0000 (0:00:17.449) 0:00:17.494 **** ok: [test1] => { "msg": "Success" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* test1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 30 September 2021 14:39:19 +0000 (0:00:00.040) 0:00:17.534 **** =============================================================================== Gathering Facts -------------------------------------------------------- 17.45s /workspace/test.yml:2 --------------------------------------------------------- debug ------------------------------------------------------------------- 0.04s /workspace/test.yml:5 --------------------------------------------------------- ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75834
https://github.com/ansible/ansible/pull/76732
9142be2f6cabbe6597c9254c5bb9186d17036d55
0ff80a15ba40c2aff3b96c1152f19c97a92d3c97
2021-09-30T08:41:28Z
python
2022-01-13T21:28:09Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,829
["test/support/integration/plugins/modules/ec2_ami_info.py"]
ec2_ami_info contains deprecated call to be removed in 2.13
##### SUMMARY ec2_ami_info contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` test/support/integration/plugins/modules/ec2_ami_info.py:273:8: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` test/support/integration/plugins/modules/ec2_ami_info.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75829
https://github.com/ansible/ansible/pull/75841
f7742924391ed51c099a2b54d4f033ebedf64107
9de4f24d7ac3a205cdc723402f78d03a1fc961f8
2021-09-29T18:15:44Z
python
2021-09-30T19:50:48Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,828
["changelogs/fragments/75828-remove-deprecated-set_available_variables.yml", "lib/ansible/template/__init__.py"]
template contains deprecated call to be removed in 2.13
##### SUMMARY template contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/template/__init__.py:780:8: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/template/__init__.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75828
https://github.com/ansible/ansible/pull/75836
963a272b2895a2ee2cdb4f26d873a28b2b4629a4
13e535c3bcf8903f36e1eb7140a3577e7a1da5e1
2021-09-29T18:15:42Z
python
2021-09-30T19:46:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,827
["changelogs/fragments/psrp-put_file-dep.yaml", "lib/ansible/plugins/connection/psrp.py", "test/sanity/ignore.txt"]
psrp contains deprecated call to be removed in 2.13
##### SUMMARY psrp contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/plugins/connection/psrp.py:481:12: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/plugins/connection/psrp.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75827
https://github.com/ansible/ansible/pull/76252
a734da5e821c53075829f1d6b82c2e022db9d606
fb55d878db0a114c49bd3b0384f4f5c9593ea536
2021-09-29T18:15:41Z
python
2021-11-12T00:57:28Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,826
["changelogs/fragments/75825-75826-get_url-uri-remove-deprecated-thirsty-alias.yml", "lib/ansible/module_utils/urls.py", "lib/ansible/modules/get_url.py", "lib/ansible/modules/uri.py", "lib/ansible/plugins/doc_fragments/url.py"]
uri contains deprecated call to be removed in 2.13
##### SUMMARY uri contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/modules/uri.py:673:8: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/modules/uri.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75826
https://github.com/ansible/ansible/pull/75838
13e535c3bcf8903f36e1eb7140a3577e7a1da5e1
44095caca946d59fa557f6c6e2699d7746fc25c3
2021-09-29T18:15:40Z
python
2021-09-30T19:48:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,825
["changelogs/fragments/75825-75826-get_url-uri-remove-deprecated-thirsty-alias.yml", "lib/ansible/module_utils/urls.py", "lib/ansible/modules/get_url.py", "lib/ansible/modules/uri.py", "lib/ansible/plugins/doc_fragments/url.py"]
get_url contains deprecated call to be removed in 2.13
##### SUMMARY get_url contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/modules/get_url.py:483:8: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/modules/get_url.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75825
https://github.com/ansible/ansible/pull/75838
13e535c3bcf8903f36e1eb7140a3577e7a1da5e1
44095caca946d59fa557f6c6e2699d7746fc25c3
2021-09-29T18:15:39Z
python
2021-09-30T19:48:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,824
["changelogs/fragments/75824-copy-remove-deprecated-thirsty-alias.yml", "lib/ansible/modules/copy.py"]
copy contains deprecated call to be removed in 2.13
##### SUMMARY copy contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/modules/copy.py:553:8: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/modules/copy.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75824
https://github.com/ansible/ansible/pull/75839
44095caca946d59fa557f6c6e2699d7746fc25c3
239dbcb24f01f130ee0a2a56e02151094138151e
2021-09-29T18:15:38Z
python
2021-09-30T19:48:48Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,823
["changelogs/fragments/75823-cli-remove-deprecated-verbosity-before-sub-cmd.yml", "lib/ansible/cli/__init__.py", "test/units/cli/test_galaxy.py", "test/units/cli/test_vault.py"]
cli contains deprecated call to be removed in 2.13
##### SUMMARY cli contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/cli/__init__.py:358:16: ansible-deprecated-version: Deprecated version ('2.13') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/cli/__init__.py ``` ##### ANSIBLE VERSION ``` 2.13 ``` ##### 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/75823
https://github.com/ansible/ansible/pull/75840
239dbcb24f01f130ee0a2a56e02151094138151e
f7742924391ed51c099a2b54d4f033ebedf64107
2021-09-29T18:15:37Z
python
2021-09-30T19:50:18Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,794
["docs/docsite/rst/playbook_guide/complex_data_manipulation.rst"]
Example doesn't work: use a loop to create exponential backoff for retries/until
### Summary In the **Data manipulation** page of the User Guide, the section [Loops and list comprehensions](https://docs.ansible.com/ansible/latest/user_guide/complex_data_manipulation.html#loops-and-list-comprehensions) contains this example code: ```yaml - name: retry ping 10 times with exponential backup delay ping: retries: 10 delay: '{{item|int}}' loop: '{{ range(1, 10)|map('pow', 2) }}' ``` This code will not work: - Ping ["does not make sense in playbooks"](https://docs.ansible.com/ansible/2.3/ping_module.html#synopsis) - The loop expression contains unescaped quotes - `retries` is used with `until` to repeat a task until a condition is met. Combining it with a loop creates a loop within a loop. In any case, in this example it might be cleaner not to use `map` at all, but to use a simple integer sequence as the loop variable and apply the exponential function to the delay: ```yaml delay: "{{ item| power(2) | int }}" loop: "{{ range(1, 10) }}" ``` These changes can be made, e.g. using `uri` instead of `ping`, but it takes extra code to achieve the desired result. E.g. consider this playbook: ```yaml --- - name: Test URI delay hosts: localhost tasks: - name: URI call vars: uri_task: status: -1 uri: url: https://{{ site | default("google") }}.com timeout: 1 failed_when: false retries: 1 delay: "{{ item | pow(2) | int }}" until: uri_task.status != -1 loop: "{{ range(1, 4) }}" register: uri_task when: uri_task.status != 200 - name: Count URI calls set_fact: uri_count: "{{ uri_task.results | selectattr('skipped', 'undefined') | length }}" - name: Report result debug: msg: "{{ 'HTTP response ' ~ uri_task.results[uri_count | int - 1].status ~ ' on try ' ~ uri_count }}" ``` Running it with an invalid site name gives exponentially delayed retries, as desired: `ansible-playbook test-uri.yml -e "site=googlez"` ``` TASK [URI call] ********************************************************************************************************************************************************* FAILED - RETRYING: URI call (1 retries left). ok: [localhost] => (item=1) FAILED - RETRYING: URI call (1 retries left). ok: [localhost] => (item=2) FAILED - RETRYING: URI call (1 retries left). ok: [localhost] => (item=3) TASK [Count URI calls] ************************************************************************************************************************************************** ok: [localhost] TASK [Report result] **************************************************************************************************************************************************** ok: [localhost] => { "msg": "HTTP response -1 on try 3" } ``` Running it with the default valid site name ("google") skips the retries and skips remaining loop iterations: `ansible-playbook test-uri.yml` ``` TASK [URI call] ********************************************************************************************************************************************************* ok: [localhost] => (item=1) skipping: [localhost] => (item=2) skipping: [localhost] => (item=3) TASK [Count URI calls] ************************************************************************************************************************************************** ok: [localhost] TASK [Report result] **************************************************************************************************************************************************** ok: [localhost] => { "msg": "HTTP response 200 on try 1" } ``` For the purpose of this documentation page, it might be better to choose a different example, e.g. converting each element in a list to Title Case: ```yaml - name: Create list set_fact: my_list: - foo - bar - name: Convert each list element to title case debug: msg: "{{ my_list | map('title') }}" ``` ``` => { "msg": [ "Foo", "Bar" ] } ``` ### Issue Type Documentation Report ### Component Name docs/docsite/rst/user_guide/complex_data_manipulation.rst ### Ansible Version ```console $ ansible --version ansible 2.10.6 config file = /home/jdoig/repos/emmet-iac/ansible.cfg configured module search path = ['/home/jdoig/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /var/lib/awx/venv/sputnik-default/lib/python3.6/site-packages/ansible executable location = /var/lib/awx/venv/sputnik-default/bin/ansible python version = 3.6.12 (default, Sep 15 2020, 12:49:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-37)] ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment Red Hat Enterprise Linux Server release 7.9 (Maipo) ### Additional Information The suggested change replaces a broken code example with a working one. The broken example code was introduced as described in [this comment on issue 20226](https://github.com/ansible/ansible/issues/20226#issuecomment-726853897) which should perhaps be reopened. ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75794
https://github.com/ansible/ansible/pull/79356
d72326b6af7dab2b2fdf0a13e6ae6946b734375e
e7730f5d6cfceba69b99808e7d390ef60d014ec3
2021-09-27T03:53:36Z
python
2022-11-09T21:03:50Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,765
["changelogs/fragments/set_fact_delegation.yml", "lib/ansible/executor/task_executor.py", "test/integration/targets/delegate_to/delegate_facts_loop.yml", "test/integration/targets/delegate_to/runme.sh"]
`set_fact` only runs on first host with `delegate_to` and `when`
### Summary When using `set_fact` in combination with `delegate_to`, `delegate_facts` and `when` it seems to actually be only run on the first host: ```yaml - hosts: localhost gather_facts: no connection: local tasks: - set_fact: test: 123 delegate_to: "{{ item }}" delegate_facts: true when: test is not defined loop: "{{ groups['all'] }}" # note: the following will STILL fail! #loop: "{{ groups['all'] | difference(["localhost"]) }}" ``` The problem only arises when setting the variable that is actually used in the `when` clause. If I had to guess, I assume the `when` is checked in the wrong loop iteration. Setting a fact that is not used in `when` will work fine. #20508 seems to be related in some regard but was fixed some time ago. ### Issue Type Bug Report ### Component Name set_fact ### Ansible Version ```console $ ansible --version ansible [core 2.11.5] config file = /Users/hojerst/.ansible.cfg configured module search path = ['/Users/hojerst/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/hojerst/.pyenv/versions/3.9.4/lib/python3.9/site-packages/ansible ansible collection location = /Users/hojerst/.ansible/collections:/usr/share/ansible/collections executable location = /Users/hojerst/.pyenv/versions/3.9.4/bin/ansible python version = 3.9.4 (default, Apr 11 2021, 17:03:42) [Clang 12.0.0 (clang-1200.0.32.29)] jinja version = 2.11.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed DEFAULT_VAULT_PASSWORD_FILE(/Users/hojerst/.ansible.cfg) = /Users/hojerst/.ansible/vault-pass% ``` ### OS / Environment MacOS 12.0 Beta (21A5506j) ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: localhost gather_facts: no connection: local tasks: - set_fact: test: 123 delegate_to: "{{ item }}" delegate_facts: true when: test is not defined loop: "{{ groups['all'] | difference(['localhost']) }}" - debug: var: test ``` ```sh ansible-playbook playbook.yml -i host1,host2,host3 ``` ### Expected Results PLAY [localhost] ************************************************************************************************************** TASK [set_fact] *************************************************************************************************************** ok: [localhost -> host1] => (item=host1) ok: [localhost -> host2] => (item=host2) ok: [localhost -> host3] => (item=host3) PLAY RECAP ******************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ### Actual Results ```console PLAY [localhost] ************************************************************************************************************** TASK [set_fact] *************************************************************************************************************** ok: [localhost -> host1] => (item=host1) skipping: [localhost] => (item=host2) skipping: [localhost] => (item=host3) TASK [debug] ****************************************************************************************************************** ok: [localhost] => { "test": "VARIABLE IS NOT DEFINED!" } PLAY RECAP ******************************************************************************************************************** localhost : ok=2 changed=0 unreachable=0 failed=0 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/75765
https://github.com/ansible/ansible/pull/75768
8bbecc7cac96203fedf99953a06eb32d74c7a4d7
7bec19606172e67ac4dbe5d10a6853b01b22ca8c
2021-09-23T14:57:58Z
python
2021-11-01T15:25:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,726
["changelogs/fragments/77781-callback-crash.yml", "lib/ansible/plugins/callback/__init__.py"]
Callback plugins will crash if a module returns exception=None
### Summary If a module calls `fail_json()` and provides `exception=None`, this will crash every callback that uses `_handle_exception` from `CallbackBase`: if verbosity is < 3, it will try to call `split` on `None`, and otherwise it will try to concatenate a string with `None` (which results in `TypeError`). ### Issue Type Bug Report ### Component Name lib/ansible/plugins/callback/__init__.py ### Ansible Version ```console devel ``` ### 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/75726
https://github.com/ansible/ansible/pull/77781
5f5c4ef2ef85c33279f4419d86553c337ce78a04
570379ef985c5645ac8cb6996fa6ce22e40c3c9a
2021-09-17T06:11:33Z
python
2022-06-08T19:58:55Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,686
["docs/docsite/rst/dev_guide/platforms/vmware_guidelines.rst", "docs/docsite/rst/dev_guide/platforms/vmware_rest_guidelines.rst", "docs/docsite/rst/dev_guide/testing.rst", "docs/docsite/rst/dev_guide/testing/sanity/ignores.rst", "docs/docsite/rst/dev_guide/testing_integration.rst", "docs/docsite/rst/dev_guide/testing_units.rst", "docs/docsite/rst/dev_guide/testing_units_modules.rst"]
Docs: Update section header notation in Developer Guide
### Summary #### Problem Some section headers in the Ansible docs do not follow the [allowed section header notation](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#header-notation). #### Action Update these section headers in the Developer Guide. #### Scope Navigate to `docs/docsite/rst/dev_guide` run the following `grep` command to identify the files and line numbers with incorrect section header notation: ``` $ grep -E -rn --include "*.rst" '([^#=*[:alnum:][:space:][:blank:]\"\^\.\-])\1{5}' * ``` ### 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 Updates incorrect section header notation in the Ansible docs to comply with the [allowed section header notation](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#header-notation). ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75686
https://github.com/ansible/ansible/pull/75721
8dc5516c83d5688467eae0bd600c5b282bf8fc0e
17122edfc500c9133c7ca9c12d8c85f9fb6f3ecb
2021-09-10T19:23:52Z
python
2021-09-17T14:52:46Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,685
["docs/docsite/rst/dev_guide/style_guide/grammar_punctuation.rst", "docs/docsite/rst/dev_guide/style_guide/resources.rst", "docs/docsite/rst/dev_guide/style_guide/spelling_word_choice.rst", "docs/docsite/rst/dev_guide/style_guide/trademarks.rst", "docs/docsite/rst/dev_guide/style_guide/voice_style.rst", "docs/docsite/rst/dev_guide/style_guide/why_use.rst"]
Docs: Update section header notation in Style Guide
### Summary #### Problem Some section headers in the Ansible docs do not follow the [allowed section header notation](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#header-notation). #### Action Update these section headers in the Style Guide. #### Scope Navigate to `docs/docsite/rst/dev_guide/style_guide` and run the following `grep` command to identify the files and line numbers with incorrect section header notation: ``` $ grep -E -rn --include "*.rst" '([^#=*[:alnum:][:space:][:blank:]\"\^\.\-])\1{4}' * ``` ### 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 Updates incorrect section header notation in the Ansible docs to comply with the [allowed section header notation](https://docs.ansible.com/ansible/latest/dev_guide/style_guide/index.html#header-notation). ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75685
https://github.com/ansible/ansible/pull/75720
17122edfc500c9133c7ca9c12d8c85f9fb6f3ecb
2346f939612b352c7e901a3c01433b61ad847762
2021-09-10T19:04:43Z
python
2021-09-17T14:55:05Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,683
["docs/docsite/rst/user_guide/complex_data_manipulation.rst", "docs/docsite/rst/user_guide/playbooks_advanced_syntax.rst"]
Docs: Update reference tag syntax: User Guide
### Summary Update documentation to replace old `:doc:` reference tags with correct `:ref:` tags. The old `:doc:` tags appear in the following files in the User Guide: ``` $ grep -rn ':doc:' ./* ./user_guide/playbooks_advanced_syntax.rst:107: :doc:`complex_data_manipulation` ./user_guide/complex_data_manipulation.rst:309: :doc:`playbooks_filters` ./user_guide/complex_data_manipulation.rst:311: :doc:`playbooks_tests` ``` ### Issue Type Documentation Report ### Component Name docs/docsite/rst/user_guide/playbooks_advanced_syntax.rst ### Ansible Version ```console n/a ``` ### Configuration ```console n/a ``` ### OS / Environment n/a ### Additional Information Updates documentation to replace old `:doc:` reference tags with correct `:ref:` tags. ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75683
https://github.com/ansible/ansible/pull/75693
3e7a6222047aae29db4ce0005c0bdf320c7f7918
01f0c38aa5cd9f4785fcfcc1215652a2df793739
2021-09-10T17:45:57Z
python
2021-09-13T14:19:48Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,677
["changelogs/fragments/75710-ansible-galaxy-validate-certs.yml", "lib/ansible/cli/galaxy.py", "test/units/galaxy/test_collection.py"]
A per-server Galaxy verify_ssl option
### Summary I would like to configure several Galaxy servers with a fallback precedence defined by the `ANSIBLE_GALAXY_SERVER_LIST` environment variable... https://docs.ansible.com/ansible/latest/reference_appendices/config.html#galaxy-server-list and I would like to have 1 of those severs set to not verify SSL. So say that I `export ANSIBLE_GALAXY_SERVER_LIST=A,B`, then I would like to `export ANSIBLE_GALAXY_SERVER_B_VERIFY_SSL=false`, and leave it true for server A. ### Issue Type Feature Idea ### Component Name lib/ansible/cli/galaxy.py ### Additional Information Followup from AWX issue https://github.com/ansible/tower/issues/5182 Right now we have a global setting to turn off Galaxy SSL verification, however, it is argued that this is impractical from a security standpoint, and if someone wanted to bypass the rules, they would like to do it specific to one specific server they have added a credential for. ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75677
https://github.com/ansible/ansible/pull/75710
9558f53a582fde66b3c80edea2bbe5968020793a
72ba2bdc82944f904245a044a9c917a3bfad4c78
2021-09-10T13:57:19Z
python
2021-09-16T17:54:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,676
["docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst", "docs/docsite/rst/network/user_guide/network_working_with_command_output.rst"]
Docs: Use code-block elements to format code examples: Network guides
### Summary **Problem**: Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`. **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 Guides, there are 6 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:]\.\.].*::$" . ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` ### Issue Type Documentation Report ### Component Name docs/docsite/rst/dev_guide ### 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 ### Issue Type Documentation Report ### Component Name docs/docsite/rst/network ### 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/75676
https://github.com/ansible/ansible/pull/75850
f4d4391a1f5d4d2b4159d9976216c5861023be2c
4d398ca3a4347581bd167a73f117e2c5c0cf30dc
2021-09-10T13:38:59Z
python
2021-10-04T17:29:14Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,675
["docs/docsite/rst/community/communication.rst", "docs/docsite/rst/community/development_process.rst"]
Docs: Use code-block elements to format code examples: Community Guide
### Summary **Problem**: Throughout the Ansible docs, there are instances where example code is preceded with a lead-in sentence ending in `::`. **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 Community Guide, there is 1 instance of a lead-in sentence ending with `::`. Use the following `grep` command to identify the files and line numbers: ``` $ grep -rn --include "*.rst" "^[[:blank:]]*[^[:blank:]\.\.].*::$" . ` ``` **Example:** Before: ``` * If the file has a unique title, use that for the main page anchor:: .. _unique_page:: ``` After: ``` * If the file has a unique title, use that for the main page anchor. .. code-block:: rst .. _unique_page:: ``` ### Issue Type Documentation Report ### Component Name docs/docsite/rst/dev_guide ### 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/75675
https://github.com/ansible/ansible/pull/75847
4d398ca3a4347581bd167a73f117e2c5c0cf30dc
4aede377d2d4b8368c6c685e0684acb382d1730b
2021-09-10T12:52:59Z
python
2021-10-04T17:46:43Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,671
["changelogs/fragments/75671-ansible-doc-ignore-deprecations.yml", "lib/ansible/plugins/loader.py"]
ansible-doc: The '-l' option prints loads of deprecation warnings.
### Summary Running `ansible-doc -l` generates 430 deprecation warnings on stderr before printing anything to stdout. ``` [DEPRECATION WARNING]: amazon.aws.aws_az_facts has been deprecated. aws_az_facts was renamed in Ansible 2.9 to aws_az_info. Please update your tasks. This feature will be removed from amazon.aws in a release after 2022-06-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. [DEPRECATION WARNING]: amazon.aws.aws_caller_facts has been deprecated. aws_caller_facts was renamed in Ansible 2.9 to aws_caller_info. Please update your tasks. This feature will be removed from amazon.aws in a release after 2021-12-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ... ``` ### Issue Type Bug Report ### Component Name ansible-doc ### Ansible Version ```console $ ansible-doc --version ansible-doc 2.10.6 config file = None configured module search path = [u'/home/charleshowes/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible executable location = /usr/local/bin/ansible-doc python version = 2.7.17 (default, Sep 30 2020, 13:38:04) [GCC 7.5.0] ``` ### Configuration ```console $ ansible-config dump --only-changed (no output) ``` ### OS / Environment Ubuntu 18.04 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```shell (paste below) ansible-doc -l ``` ### Expected Results I expected to see a list of available plugins, and was shocked to have pages and pages of warnings. ### Actual Results ```console $ ansible-doc -l 2>&1 | head [DEPRECATION WARNING]: amazon.aws.aws_az_facts has been deprecated. aws_az_facts was renamed in Ansible 2.9 to aws_az_info. Please update your tasks. This feature will be removed from amazon.aws in a release after 2022-06-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. [DEPRECATION WARNING]: amazon.aws.aws_caller_facts has been deprecated. aws_caller_facts was renamed in Ansible 2.9 to aws_caller_info. Please update your tasks. This feature will be removed from amazon.aws in a release after 2021-12-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. $ ansible-doc -l 2>&1 | grep -c 'DEPRECATION WARNING' 430 ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75671
https://github.com/ansible/ansible/pull/75674
8cef40f839510010ad83f70bd2bbe26aef2060e0
23b9d197ebf8e281965003675ae480bc09264e99
2021-09-09T22:57:14Z
python
2021-10-07T18:01:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,642
["changelogs/fragments/75642-free-strat-fix-executing-includes.yml", "lib/ansible/plugins/strategy/free.py", "test/integration/targets/strategy_free/aliases", "test/integration/targets/strategy_free/inventory", "test/integration/targets/strategy_free/last_include_tasks.yml", "test/integration/targets/strategy_free/runme.sh", "test/integration/targets/strategy_free/test_last_include_in_always.yml"]
Role does not get called when calling include_role as the last task in an always block after a failure, with the free strategy
### Summary When include_role is the last task in an "always" block after a failure, the role does not get executed. When an additional task is after the include_role, both the role and the last task get executed. I found that this only happens with the free strategy and not the linear strategy. ### Issue Type Bug Report ### Component Name ansible/plugins/strategy/free.py ### Ansible Version ```console $ ansible --version ansible [core 2.11.0] config file = /home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg configured module search path = ['/home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/modules', '/usr/share/ansible/collections/ansible_collections/tfdm/utils/plugins/modules', '/home/users/gbg/*****/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-packages/ansible ansible collection location = /home/users/gbg/*****/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.8.3 (default, Aug 18 2020, 08:56:04) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] jinja version = 3.0.0 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed ANSIBLE_PIPELINING(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = True BECOME_ALLOW_SAME_USER(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = True BECOME_PLUGIN_PATH(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/become', '/usr/share/ansible/collections/ansible_collections/tfdm/utils/plugins/becom> CALLBACKS_ENABLED(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['tfdm.utils.tfdm_log', 'tfdm.utils.profile_tasks_custom'] DEFAULT_ACTION_PLUGIN_PATH(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/action', '/usr/share/ansible/collections/ansible_collections/tfdm/utils/plugi> DEFAULT_FILTER_PLUGIN_PATH(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/filter', '/usr/share/ansible/collections/ansible_collections/tfdm/utils/plugi> DEFAULT_FORKS(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = 100 DEFAULT_HOST_LIST(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/inventory.yml'] DEFAULT_LOAD_CALLBACK_PLUGINS(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = True DEFAULT_LOCAL_TMP(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = /tmp/.ansible_*****/ansible-local-1796160cr3o3nna DEFAULT_MODULE_PATH(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/modules', '/usr/share/ansible/collections/ansible_collections/tfdm/utils/plugins/mod> DEFAULT_ROLES_PATH(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/roles', '/usr/share/ansible/tfdm_roles', '/home/users/gbg/*****/.ansible/roles', '/usr/share/ansible/roles', '/etc/ansible/roles'] DEFAULT_STDOUT_CALLBACK(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = tfdm.utils.yaml_custom DEFAULT_STRATEGY(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = free DEFAULT_TEST_PLUGIN_PATH(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['/home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/test', '/usr/share/ansible/collections/ansible_collections/tfdm/utils/plugins/t> DEFAULT_VAULT_PASSWORD_FILE(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = /home/users/gbg/*****/git/config/ile/playbooks/tfdm_key DIFF_ALWAYS(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = True DIFF_CONTEXT(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = 0 DISPLAY_SKIPPED_HOSTS(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = False DUPLICATE_YAML_DICT_KEY(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ignore HOST_KEY_CHECKING(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = False INTERPRETER_PYTHON(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = auto_silent INVENTORY_CACHE_ENABLED(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = True INVENTORY_ENABLED(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['tfdm.utils.tfdm_inventory', 'host_list', 'script', 'auto', 'yaml', 'ini'] LOCALHOST_WARNING(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = False MAX_FILE_SIZE_FOR_DIFF(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = 10485760 VARIABLE_PLUGINS_ENABLED(/home/users/gbg/*****/git/config/ile/playbooks/ansible.cfg) = ['host_group_vars', 'tfdm.utils.tfdm_site_vars'] ``` ### OS / Environment RHEL8.2 ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) test.yml --- - hosts: localhost gather_facts: False tasks: - block: - fail: msg: "Intentional failure" always: - debug: msg: "In the always block" - include_role: name: test_role #- debug: #msg: "After calling the role in the always block" ``` ``` roles/test_role/tasks/main.yml --- - debug: msg: "INSIDE THE ROLE" ``` ### Expected Results ``` PLAY [localhost] *************************************************************************************************************************************************************************************** Friday 03 September 2021 18:14:34 +0000 (0:00:00.147) 0:00:00.147 ****** TASK [fail] ******************************************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => changed=false msg: Intentional failure Friday 03 September 2021 18:14:34 +0000 (0:00:00.026) 0:00:00.173 ****** TASK [debug] ******************************************************************************************************************************************************************************************* ok: [localhost] => msg: In the always block Friday 03 September 2021 18:14:34 +0000 (0:00:00.023) 0:00:00.197 ****** TASK [include_role : test_role] ************************************************************************************************************************************************************************ Friday 03 September 2021 18:14:34 +0000 (0:00:00.034) 0:00:00.232 ****** TASK [test_role : debug] ******************************************************************************************************************************************************************************* ok: [localhost] => msg: INSIDE THE ROLE Friday 03 September 2021 18:14:34 +0000 (0:00:00.032) 0:00:00.264 ****** PLAY RECAP ********************************************************************************************************************************************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` ### Actual Results ```console PLAY [localhost] ************************************************************************************************************************************************************************************************************************************************************** Friday 03 September 2021 18:25:11 +0000 (0:00:00.144) 0:00:00.144 ****** TASK [fail] ******************************************************************************************************************************************************************************************************************************************************************* fatal: [localhost]: FAILED! => changed=false msg: Intentional failure Friday 03 September 2021 18:25:11 +0000 (0:00:00.026) 0:00:00.171 ****** TASK [debug] ****************************************************************************************************************************************************************************************************************************************************************** ok: [localhost] => msg: In the always block Friday 03 September 2021 18:25:11 +0000 (0:00:00.024) 0:00:00.195 ****** TASK [include_role : test_role] *********************************************************************************************************************************************************************************************************************************************** PLAY RECAP ******************************************************************************************************************************************************************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` The last two tasks with ANSIBLE_DEBUG enabled: ``` TASK [debug] ******************************************************************* task path: /home/users/gbg/*****/git/config/ile/playbooks/test.yml:10 ok: [localhost] => msg: In the always block 1796974 1630693258.82070: next free host: localhost 1796974 1630693258.82079: getting the next task for host localhost 1796974 1630693258.82087: done getting next task for host localhost 1796974 1630693258.82093: ^ task is: TASK: include_role : test_role 1796974 1630693258.82098: ^ state is: HOST STATE: block=2, task=1, rescue=0, always=2, run_state=ITERATING_ALWAYS, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 1796974 1630693258.82104 [localhost]: free host state: HOST STATE: block=2, task=1, rescue=0, always=2, run_state=ITERATING_ALWAYS, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 1796974 1630693258.82110 [localhost]: free host task: TASK: include_role : test_role 1796974 1630693258.82115 [localhost]: this host has work to do 1796974 1630693258.82119 [localhost]: getting variables 1796974 1630693258.82125: in VariableManager get_vars() 1796974 1630693258.82162: Calling all_inventory to load vars for localhost 1796974 1630693258.82173: Calling groups_inventory to load vars for localhost 1796974 1630693258.82186: Calling all_plugins_inventory to load vars for localhost 1796974 1630693258.82228: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82266: Loading VarsModule 'ansible_collections.tfdm.utils.plugins.vars.tfdm_site_vars' from /home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/vars/tfdm_site_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82314: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/dev_sites.yml 1796974 1630693258.82327: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/lab_to_rack_size_mapping.yml 1796974 1630693258.82341: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_adapter_networks.yml 1796974 1630693258.82351: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_facts.yml 1796974 1630693258.82363: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_facts_dev.yml 1796974 1630693258.82374: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_host_ids.yml 1796974 1630693258.82386: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_ipa_settings.yml 1796974 1630693258.82397: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_user_group_ids.yml 1796974 1630693258.82408: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vars.yml 1796974 1630693258.82417: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vault.yml 1796974 1630693258.82425: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vm_instances.yml 1796974 1630693258.82433: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vmware_module_defaults.yml 1796974 1630693258.82450: Loading data from /backups/vault/group_vars/all/vault.yml 1796974 1630693258.82460: Calling all_plugins_play to load vars for localhost 1796974 1630693258.82486: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82507: Loading VarsModule 'ansible_collections.tfdm.utils.plugins.vars.tfdm_site_vars' from /home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/vars/tfdm_site_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82539: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/dev_sites.yml 1796974 1630693258.82549: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/lab_to_rack_size_mapping.yml 1796974 1630693258.82558: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_adapter_networks.yml 1796974 1630693258.82566: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_facts.yml 1796974 1630693258.82574: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_facts_dev.yml 1796974 1630693258.82583: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_host_ids.yml 1796974 1630693258.82592: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_ipa_settings.yml 1796974 1630693258.82599: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/tfdm_user_group_ids.yml 1796974 1630693258.82606: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vars.yml 1796974 1630693258.82613: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vault.yml 1796974 1630693258.82620: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vm_instances.yml 1796974 1630693258.82627: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/all/vmware_module_defaults.yml 1796974 1630693258.82642: Loading data from /backups/vault/group_vars/all/vault.yml 1796974 1630693258.82652: Calling groups_plugins_inventory to load vars for localhost 1796974 1630693258.82678: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82701: Loading VarsModule 'ansible_collections.tfdm.utils.plugins.vars.tfdm_site_vars' from /home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/vars/tfdm_site_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82803: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/rhel/vars.yml 1796974 1630693258.82814: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/rhel/vault.yml 1796974 1630693258.82872: Loading data from /backups/vault/group_vars/rhel/vault.yml 1796974 1630693258.82891: Calling groups_plugins_play to load vars for localhost 1796974 1630693258.82916: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.82938: Loading VarsModule 'ansible_collections.tfdm.utils.plugins.vars.tfdm_site_vars' from /home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/vars/tfdm_site_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.83036: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/rhel/vars.yml 1796974 1630693258.83048: Loading data from /home/users/gbg/*****/git/config/ile/playbooks/group_vars/rhel/vault.yml 1796974 1630693258.83104: Loading data from /backups/vault/group_vars/rhel/vault.yml 1796974 1630693258.83149: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.83172: Loading VarsModule 'ansible_collections.tfdm.utils.plugins.vars.tfdm_site_vars' from /home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/vars/tfdm_site_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.83230: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.8/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.83253: Loading VarsModule 'ansible_collections.tfdm.utils.plugins.vars.tfdm_site_vars' from /home/users/gbg/*****/git/config/ile/playbooks/collections/ansible_collections/tfdm/utils/plugins/vars/tfdm_site_vars.py (found_in_cache=True, class_only=False) 1796974 1630693258.83339: done with get_vars() 1796974 1630693258.83358 [localhost]: done getting variables 1796974 1630693258.83369: getting the next task for host localhost 1796974 1630693258.83376: done getting next task for host localhost 1796974 1630693258.83384: ^ task is: TASK: include_role : test_role 1796974 1630693258.83389: ^ state is: HOST STATE: block=2, task=1, rescue=0, always=2, run_state=ITERATING_ALWAYS, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 1796974 1630693258.83417 [localhost]: done templating Friday 03 September 2021 18:20:58 +0000 (0:00:00.035) 0:00:04.711 ****** 1796974 1630693258.83447: entering _queue_task() for localhost/include_role 1796974 1630693258.83454: Creating lock for include_role 1796974 1630693258.83757: worker is 1 (out of 1 available) 1796974 1630693258.83830: exiting _queue_task() for localhost/include_role 1796994 1630693258.83931: running TaskExecutor() for localhost/TASK: include_role : test_role 1796994 1630693258.84035: in run() - task 00505600-0571-bb4d-838a-00000000025f 1796974 1630693258.84040: next free host: localhost 1796974 1630693258.84052: getting the next task for host localhost 1796994 1630693258.84060: variable 'ansible_search_path' from source: unknown 1796974 1630693258.84066: done getting next task for host localhost 1796974 1630693258.84071: ^ task is: None 1796974 1630693258.84079: ^ state is: HOST STATE: block=2, task=1, rescue=0, always=2, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 1796974 1630693258.84088 [localhost]: free host state: HOST STATE: block=2, task=1, rescue=0, always=2, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 1796974 1630693258.84093 [localhost]: free host task: None 1796994 1630693258.84100: calling self._execute() 1796994 1630693258.84162: variable 'ansible_connection' from source: host vars for 'localhost' 1796994 1630693258.84174: variable 'ansible_become' from source: group vars, precedence entry 'groups_plugins_play' 1796994 1630693258.84188: variable 'omit' from source: magic vars 1796974 1630693258.84213: waiting for pending results... 1796994 1630693258.84299: _execute() done 1796994 1630693258.84310: dumping result to json 1796994 1630693258.84317: done dumping result, returning 1796994 1630693258.84325: done running TaskExecutor() for localhost/TASK: include_role : test_role [00505600-0571-bb4d-838a-00000000025f] 1796994 1630693258.84343: sending task result for task 00505600-0571-bb4d-838a-00000000025f 1796994 1630693258.84396: done sending task result for task 00505600-0571-bb4d-838a-00000000025f 1796994 1630693258.84440: WORKER PROCESS EXITING TASK [include_role : test_role] ************************************************ task path: /home/users/gbg/*****/git/config/ile/playbooks/test.yml:13 1796974 1630693258.84583: no more pending results, returning what we have 1796974 1630693258.84592: getting the next task for host localhost 1796974 1630693258.84599: done getting next task for host localhost 1796974 1630693258.84604: ^ task is: None 1796974 1630693258.84609: ^ state is: HOST STATE: block=2, task=1, rescue=0, always=2, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False 1796974 1630693258.84616: running handlers PLAY RECAP ********************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 1796974 1630693258.84748: RUNNING CLEANUP ``` ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75642
https://github.com/ansible/ansible/pull/75649
7a28246248cdb7fdbfde281488d813c953aa8e75
b1211429d5a493c55914d9a97257859fe7d1208c
2021-09-03T18:27:33Z
python
2021-10-12T16:15:37Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,624
["lib/ansible/modules/getent.py"]
misleading examples in getent documentation
### Summary While reading the online docs for the `getent` module, all the examples show various `debug` statements like: ``` - debug: var: getent_passwd ``` However, this only works if `inject_facts_as_vars = true`. The examples should, instead, show: ``` - debug: var: ansible_facts.getent_passwd ``` The second works regardless of the `inject_facts_as_vars` value. ### Issue Type Documentation Report ### Component Name ansible.builtin.getent ### Ansible Version ```console $ ansible --version ansible 2.9.25 config file = /home/doug/.ansible.cfg configured module search path = ['/home/doug/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/doug/.virtualenvs/a29/lib/python3.9/site-packages/ansible executable location = /home/doug/.virtualenvs/a29/bin/ansible python version = 3.9.7 (default, Sep 1 2021, 00:07:56) [GCC 11.2.0] But this affects all online versions of the documentation and is **not* 2.9-specific ``` ### Configuration ```console $ ansible-config dump --only-changed ANSIBLE_NOCOWS(/home/doug/.ansible.cfg) = True ANSIBLE_PIPELINING(/home/doug/.ansible.cfg) = True DEFAULT_CALLBACK_WHITELIST(/home/doug/.ansible.cfg) = ['unixy', 'yaml'] DEFAULT_GATHERING(/home/doug/.ansible.cfg) = smart DEFAULT_INTERNAL_POLL_INTERVAL(/home/doug/.ansible.cfg) = 0.001 DEFAULT_LOAD_CALLBACK_PLUGINS(/home/doug/.ansible.cfg) = True DEFAULT_PRIVATE_KEY_FILE(/home/doug/.ansible.cfg) = /home/doug/.vagrant.d/insecure_private_key DEFAULT_REMOTE_USER(/home/doug/.ansible.cfg) = vagrant DEFAULT_STDOUT_CALLBACK(/home/doug/.ansible.cfg) = unixy DEFAULT_VAULT_PASSWORD_FILE(/home/doug/.ansible.cfg) = /home/doug/.ansible/vaultpass.txt HOST_KEY_CHECKING(/home/doug/.ansible.cfg) = False RETRY_FILES_ENABLED(/home/doug/.ansible.cfg) = False USE_PERSISTENT_CONNECTIONS(/home/doug/.ansible.cfg) = True ``` ### OS / Environment Firefox on macOS ### Additional Information This change would prevent task failure due to `getent_*` being undefined for those with `inject_facts_as_vars = false` and continues to work for those with it set to `true` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75624
https://github.com/ansible/ansible/pull/75633
7ff2a55f3feab1eef5c6a9c38bf654b1160ff4de
ccf8a7da8283e72ae8ad565d80c5a100477ea8d2
2021-09-01T19:19:27Z
python
2021-09-02T19:27:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,612
["changelogs/fragments/75635-fix-role-argspec-suboption-validation.yml", "lib/ansible/module_utils/common/parameters.py", "test/integration/targets/roles_arg_spec/roles/test1/meta/argument_specs.yml", "test/integration/targets/roles_arg_spec/test_complex_role_fails.yml"]
Unexpected exception when validating a role argspec when a dict with suboptions is expected but a str is given
### Summary An exception is thrown when an argspec expecting a dict with suboptions is given a string. This only occurs when the argument in the argspec has suboptions. ### Issue Type Bug Report ### Component Name module_utils/common/parameters.py ### Ansible Version ```console ansible [core 2.11.4] ``` ### Configuration ```console $ ansible-config dump --only-changed ``` ### OS / Environment RHEL 8 ### Steps to Reproduce `meta/argument_specs.yml` ```yaml --- argument_specs: main: options: dict_option: type: dict options: some_option: type: str ``` Playbook: ``` --- - hosts: localhost gather_facts: false vars: dict_option: this is a string roles: - test ``` ### Expected Results An exception should not be thrown. ### Actual Results ```console The full traceback is: Traceback (most recent call last): File "/home/user/ansible4/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 158, in run res = self._execute() File "/home/user/ansible4/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 582, in _execute result = self._handler.run(task_vars=variables) File "/home/user/ansible4/lib/python3.8/site-packages/ansible/plugins/action/validate_argument_spec.py", line 83, in run validation_result = validator.validate(provided_arguments) File "/home/user/ansible4/lib/python3.8/site-packages/ansible/module_utils/common/arg_spec.py", line 244, in validate _validate_sub_spec(self.argument_spec, result._validated_parameters, File "/home/user/ansible4/lib/python3.8/site-packages/ansible/module_utils/common/parameters.py", line 761, in _validate_sub_spec unsupported_parameters.update(_get_unsupported_parameters(sub_spec, sub_parameters, legal_inputs, options_context)) File "/home/user/ansible4/lib/python3.8/site-packages/ansible/module_utils/common/parameters.py", line 177, in _get_unsupported_parameters for k in parameters.keys(): AttributeError: 'str' object has no attribute 'keys' fatal: [localhost]: FAILED! => { "msg": "Unexpected failure during module execution.", "stdout": "" } ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75612
https://github.com/ansible/ansible/pull/75635
7bec19606172e67ac4dbe5d10a6853b01b22ca8c
b5ed41edb34a387c560e172ee2928cc8ac9b4959
2021-09-01T06:26:06Z
python
2021-11-01T16:06:49Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,608
["changelogs/fragments/75608-git-fix-submodule-path.yml", "lib/ansible/modules/git.py", "test/integration/targets/git/tasks/submodules.yml"]
Undefined behaviour when using submodules and '.git' is present anywhere in the repo path
### Summary See: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/git.py#L760 : ```py repo_path = os.path.join(repo_path.split('.git')[0], gitdir) ``` the intention of this code seems to be to strip `.git` from the end of the path. If the repo path contains `.git` anywhere, like `/tmp/music.gittern/myrepo`, tasks will unexpectedly fail: ``` fatal: [localhost]: FAILED! => {"changed": false, "details": "/tmp/music/../.git/modules/submodule is not a directory", "msg": "Current repo does not have a valid reference to a separate Git dir or it refers to the invalid path"} ``` For a playbook like: ```yaml --- - hosts: localhost tasks: - name: test git git: repo: ... dest: /tmp/music.gittern/myrepo/submodule ``` I can't tell if this is a potential security issue or just an unexpected corner case. What I am pretty sure I can tell, is that that's not how one strips `.git` from the end of a path. ### Issue Type Bug Report ### Component Name git ### Ansible Version ```console $ ansible --version 2.11 ``` ### Configuration ```console $ ansible-config dump --only-changed ANSIBLE_NOCOWS(/home/enrico/dev/transilience/ansible.cfg) = True ``` ### OS / Environment Debian Bullseye ### Steps to Reproduce Use submodules in a repo whose path contains `.git` anywhere as part of a file name. For example: ```yaml --- - hosts: localhost tasks: - name: test git git: repo: ... dest: /tmp/music.gittern/myrepo/submodule ``` ### Expected Results I'd expect directory names like `gato.gito` not to be interpreted specially by mistake ### Actual Results ```console fatal: [localhost]: FAILED! => {"changed": false, "details": "/tmp/music/../.git/modules/submodule is not a directory", "msg": "Current repo does not have a valid reference to a separate Git dir or it refers to the invalid path"} ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75608
https://github.com/ansible/ansible/pull/75655
3d081b6ca5d4e7f31db3378d0a649f81494afc10
9558f53a582fde66b3c80edea2bbe5968020793a
2021-08-31T17:15:05Z
python
2021-09-16T13:46:50Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,606
["lib/ansible/modules/known_hosts.py"]
known_hosts: fails when ~/.ssh missing and path=default
### Summary When running the builtin `known_hosts` module without a `path` argument (thus defaulting to `~/.ssh/known_hosts`), it will fail when `~/.ssh/` does not exist. https://github.com/ansible/awx/issues/10984 ### Issue Type Documentation Report ### Component Name known_hosts ### Ansible Version ```console $ ansible --version ansible [core 2.12.0.dev0] config file = None configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-packages/ansible ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.8.6 (default, Jan 29 2021, 17:38:16) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] jinja version = 2.10.3 libyaml = True ``` ### Configuration ```console $ ansible-config dump --only-changed [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. ``` ### OS / Environment Docker image quay.io/ansible/awx-ee:latest (Image id 139d0f567124 ) ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```sh bash-4.4$ ansible localhost -m known_hosts -a 'name=example.com key="example.com ssh-rsa test"' ``` ### Expected Results Success & the given key in a new `~/.ssh/known_hosts` ### Actual Results ```console localhost | FAILED! => { "changed": false, "msg": "Failed to write to file /home/runner/.ssh/known_hosts: [Errno 2] No such file or directory: '/home/runner/.ssh/tmpkqkq1oke'" } ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75606
https://github.com/ansible/ansible/pull/75615
ccf8a7da8283e72ae8ad565d80c5a100477ea8d2
e60ee8234312dc181513fb6dd272bc0f81293a91
2021-08-31T10:29:02Z
python
2021-09-02T19:43:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,593
["changelogs/fragments/75593-ansible-galaxy-keycloak-clientid.yml", "docs/docsite/rst/shared_snippets/galaxy_server_list.txt", "lib/ansible/cli/galaxy.py", "lib/ansible/galaxy/token.py", "test/units/galaxy/test_token.py"]
Allow ansible-galaxy command to supply a clientID override
### Summary GalaxyNG just added the capability to use [Keycloak for user integration/authentication](https://github.com/ansible/galaxy_ng/pull/889), instead of using DRF tokens it would be great to be able to use Keycloak tokens with `ansible-galaxy` CLI. `ansible-galaxy` CLI has the ability to use Keycloak tokens today in order to work with Public Automation Hub on console.redhat.com. However, it won't work with GalaxyNG + Keycloak because the client ID in the code for refreshing tokens is [hardcoded](https://github.com/ansible/ansible/blob/bf7d4ce260dc4ffc6074b2a392b9ff4d3794308b/lib/ansible/galaxy/token.py#L60) to `cloud-services` to work with the Red Hat SSO. It would be great to be able to supply an override configuration variable for the client ID. ### Issue Type Feature Idea ### Component Name ansible-galaxy ### Additional Information As described in the galaxy [download a collection section](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#downloading-a-collection-from-automation-hub) Instead of supplying: ``` [galaxy] server_list = automation_hub [galaxy_server.automation_hub] url=https://cloud.redhat.com/api/automation-hub/ auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token token=my_ah_token ``` You could supply the following: ``` [galaxy] server_list = my_galaxy_ng [galaxy_server.my_galaxy_ng] url=http://my_galaxy_ng:8000/api/automation-hub/ auth_url=http://my_keycloak:8080/auth/realms/myco/protocol/openid-connect/token client_id=galaxy-ng token=my_keycloak_access_token ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75593
https://github.com/ansible/ansible/pull/75601
54a795896ac6b234223650bc979fe65329b4405a
1353678f237ee4ceb7345f6e277138aaa2af8db9
2021-08-27T20:09:39Z
python
2021-09-17T19:10:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,568
["changelogs/fragments/75568-fix-templating-task-action-host-specific-vars.yml", "lib/ansible/plugins/strategy/linear.py", "test/integration/targets/strategy_linear/inventory", "test/integration/targets/strategy_linear/runme.sh", "test/integration/targets/strategy_linear/task_action_templating.yml"]
core 2.11.3 marking ansible_os related variables as incorrect distro.
### Summary SInce updating to `core 2.11.3` some `ansible_os_family` variables on some servers are being returned as Debian instead of Redhat (Amazon Linux2). ### Issue Type Bug Report ### Component Name yum ### Ansible Version ```console $ ansible --version ansible [core 2.11.3] config file = /home/russell/repos/ansible/ansible.cfg configured module search path = ['/home/russell/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /home/russell/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.9.6 (default, Jun 30 2021, 10:22:16) [GCC 11.1.0] jinja version = 3.0.1 libyaml = True (Colleague running 2.11.3 version, I am still on 2.9.10 to make testing easier) ``` ### Configuration ```console $ ansible-config dump --only-changed ANSIBLE_NOCOWS(/home/russell/repos/ansible/ansible.cfg) = False DEFAULT_ROLES_PATH(/home/russell/repos/ansible/ansible.cfg) = ['/home/russell/repos/ansible/roles', '/home/russell/ansible/roles'] DEFAULT_STRATEGY(/home/russell/repos/ansible/ansible.cfg) = linear DEFAULT_TIMEOUT(/home/russell/repos/ansible/ansible.cfg) = 30 DEFAULT_VAULT_PASSWORD_FILE(/home/russell/repos/ansible/ansible.cfg) = /home/russell/.vault_pass.txt HOST_KEY_CHECKING(/home/russell/repos/ansible/ansible.cfg) = False (Colleague running 2.11.3 version, I am still on 2.9.10 to make testing easier) ``` ### OS / Environment ``` $ uname -r 4.14.104-95.84.amzn2.x86_64 ``` ### Steps to Reproduce When running a playbook that uses `ansible_pkg_mgr` on ansible version `2.9.10` to a Amazon Linux2 host, `yum` is returned. When running the same playbook on `core: 2.11.3` to a Amazon Linux2 host `apt` is returned. Task in question: ``` - name: ensure sudo package is installed action: module: '{{ ansible_pkg_mgr }}' name: '{{ admin_users_sudo_package }}' state: present when: admin_users_sudo_package is defined``` ``` Ran on 2.9.10: ``` TASK [ae.users : debug ansible family] ***************************************************************** ok: [ip-10-80-0-135.us-east-2.compute.internal] => { "msg": "family: RedHat" } ok: [ip-10-80-0-164.us-east-2.compute.internal] => { "msg": "family: RedHat" } ok: [ip-10-80-0-71.us-east-2.compute.internal] => { "msg": "family: Debian" } ok: [ip-10-80-0-211.us-east-2.compute.internal] => { "msg": "family: RedHat" } TASK [ae.users : ensure sudo package is installed] ***************************************************** ok: [ip-10-80-0-135.us-east-2.compute.internal] ok: [ip-10-80-0-211.us-east-2.compute.internal] ok: [ip-10-80-0-164.us-east-2.compute.internal] ok: [ip-10-80-0-71.us-east-2.compute.internal] ``` Ran on 2.11.3 ``` TASK [ae.users : ensure sudo package is installed] ******************************************************************************** ok: [ip-10-18-0-76.us-west-2.compute.internal] ok: [ip-10-18-0-171.us-west-2.compute.internal] [WARNING]: Updating cache and auto-installing missing dependency: python-apt fatal: [ec2-44-225-183-160.us-west-2.compute.amazonaws.com]: FAILED! => {"changed": false, "cmd": "apt-get update", "msg": "[Errno 2] No such file or directory", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} ``` Host in question: ``` root@x-useast2-es-3[x-useast2]:~$ uname Linux root@x-useast2-es-3[x-useast2]:~$ uname -r 4.14.104-95.84.amzn2.x86_64 ``` ### Expected Results I expect yum to returned on yum based hosts, not apt. ### Actual Results ```console [WARNING]: Updating cache and auto-installing missing dependency: python-apt fatal: [ec2-44-225-183-160.us-west-2.compute.amazonaws.com]: FAILED! => {"changed": false, "cmd": "apt-get update", "msg": "[Errno 2] No such file or directory", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}``` ``` ### Code of Conduct - [X] I agree to follow the Ansible Code of Conduct
https://github.com/ansible/ansible/issues/75568
https://github.com/ansible/ansible/pull/75600
bee5e02232d213a0c745444e1db8c03d885c9965
9c2f44b8848a317a2304254eba0b9b348d5034ad
2021-08-25T10:06:55Z
python
2021-08-31T15:33:57Z
closed
ansible/ansible
https://github.com/ansible/ansible
75,560
["changelogs/fragments/75560-interp-discovery-family-fallback.yml", "lib/ansible/config/base.yml", "lib/ansible/executor/interpreter_discovery.py"]
`INTERPRETER_PYTHON_DISTRO_MAP` YAML anchors maintainability
### Summary After looking over some recent PRs to add additional aliases to `rhelish`, I'm beginning to believe that using YAML anchors isn't the right thing for long term maintainability. I think we should add a step in the Python code that uses the distro family map from `module_utils.facts` to select the "rhelish" option from `INTERPRETER_PYTHON_DISTRO_MAP` unless a specific distro entry exists. This will help us maintain 1 list, and limit the number of changes we need to make to the config to handle new distros. ### Issue Type Feature Idea ### Component Name lib/ansible/executor/interpreter_discovery.py ### 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/75560
https://github.com/ansible/ansible/pull/76815
cfe4bdc1b9a91f043fa23f78478e0c20f05175ae
d7d1bd6269fa463a8ac030047c285fc3677ad8a0
2021-08-24T15:13:05Z
python
2022-01-21T17:46:45Z