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
71,517
["changelogs/fragments/fix-reboot-plugin.yml", "lib/ansible/plugins/action/reboot.py"]
Reboot module doesn't work with async
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY The `reboot` module does not work with `async`, `poll`, and `async_status`. Suppose I have 10 nodes to reboot, but I can only set `fork` to 2. The `reboot` module will reboot 2 nodes at a time. I tried using `async`, `poll`, and `async_status` to kick of the reboots on the 10 nodes, 2 at a time, and then poll for the results. `async` and `poll` seem to do nothing on the `reboot` module as the behavior remains the same as without them. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `reboot` module ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.12 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib64/python3.6/site-packages/ansible executable location = /usr/bin/ansible python version = 3.6.8 (default, May 2 2019, 19:37:42) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null ANSIBLE_SSH_RETRIES(/etc/ansible/ansible.cfg) = 2 COMMAND_WARNINGS(/etc/ansible/ansible.cfg) = False DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 2 DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 40 HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Described in the summary <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> I expect the `reboot` module to start the reboot on 2 nodes, then move on to something else (like start the reboot on another 2 nodes), then come back to check on the results of the reboots by using `async`, `poll`, and `async_status`. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The `reboot` module ignores `async` and `poll`. <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/71517
https://github.com/ansible/ansible/pull/80017
2908a2c32a81fca78277a22f15fa8e3abe75e092
f8de6caeec735fad53c2fa492c94608e92ebfb06
2020-08-28T22:19:52Z
python
2023-10-28T04:14:15Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,444
["changelogs/fragments/71496-iptables-reorder-comment-position.yml", "lib/ansible/modules/iptables.py", "test/units/modules/test_iptables.py"]
iptables comment parameter incorrectly positioned in iptables
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY When using **comment** parameter with iptables module, it is not positioned as the right-most object in the actual iptables table. The outcome looks very bad at the moment. ##### ISSUE TYPE - Cosmetic Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> **iptables** module, **comment** parameter ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.9 config file = /home/me/project/ansible.cfg configured module search path = ['/home/me/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/me/vConstruction/lib/python3.6/site-packages/ansible executable location = /home/me/vConstruction/bin/ansible python version = 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_CALLBACK_WHITELIST(/home/me/project/ansible.cfg) = ['profile_tasks'] DEFAULT_HOST_LIST(/home/me/project/ansible.cfg) = ['/home/me/project/inventory'] DEPRECATION_WARNINGS(/home/me/project/ansible.cfg) = False HOST_KEY_CHECKING(/home/me/project/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Host where I use Ansible: Ubuntu 18.04 via WSL 2. Target VM where the iptables rules are being created: Ubuntu 18.04. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> It can be reproduced by using the following task and running `iptables -L` on the target machine. I added the DNS task as well, because this one looks correct, but I'm sure that's just because I don't have **ctstate** specified. <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Create HTTPS rule iptables: chain: INPUT in_interface: eth0 protocol: tcp destination_port: https ctstate: NEW jump: ACCEPT comment: Accept new inbound HTTPS connections to eth0 interface - name: Create DNS rule iptables: chain: INPUT protocol: udp destination_port: domain jump: ACCEPT comment: Accept inbound DNS connections ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ```bash ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ctstate NEW /* Accept new inbound HTTPS connections to eth0 interface */ ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```bash ACCEPT tcp -- anywhere anywhere tcp dpt:https /* Accept new inbound HTTPS connections to eth0 interface */ ctstate NEW ACCEPT udp -- anywhere anywhere udp dpt:domain /* Accept inbound DNS connections */ ```
https://github.com/ansible/ansible/issues/71444
https://github.com/ansible/ansible/pull/71496
11b7091c84ed6cf9576f319118b88f2a81894764
c1da427a5ec678f052fd2cd4885840c4d761946a
2020-08-25T16:48:26Z
python
2020-11-09T18:40:55Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,443
["changelogs/fragments/ansible-test-coverage-py26.yml", "test/integration/targets/ansible-test/collection-tests/coverage.sh", "test/lib/ansible_test/_internal/cli.py", "test/lib/ansible_test/_internal/coverage/__init__.py"]
ansible-test coverage leads to 'Namespace' object has no attribute 'remote_endpoint'
##### SUMMARY We are running `ansible-test coverage` from the devel branch of Ansible on the `community.kubernetes` collection. It seems like sometime between yesterday morning and today, something in Ansible changed that is causing the error: ``` 'Namespace' object has no attribute 'remote_endpoint' ``` See: https://github.com/ansible-collections/community.kubernetes/runs/1025104583?check_suite_focus=true#step:6:17 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-test ##### ANSIBLE VERSION ```paste below devel (installed via pip) ``` ##### CONFIGURATION ```paste below N/A ``` ##### OS / ENVIRONMENT Ubuntu 20.04 (GitHub Actions CI) ##### STEPS TO REPRODUCE ``` # Inside the collection.kubernetes directory: pip install https://github.com/ansible/ansible/archive/devel.tar.gz ansible-test integration --docker -v --color --retry-on-error --python 3.6 --continue-on-error --diff --coverage ansible-test coverage xml -v --requirements --group-by command --group-by version ``` ##### EXPECTED RESULTS Coverage report is generated. ##### ACTUAL RESULTS ``` Run ansible-test coverage xml -v --requirements --group-by command --group-by version ansible-test coverage xml -v --requirements --group-by command --group-by version shell: /bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.6.11/x64 Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.6.11/x64/bin/ansible-test", line 28, in <module> main() File "/opt/hostedtoolcache/Python/3.6.11/x64/bin/ansible-test", line 24, in main cli_main() File "/opt/hostedtoolcache/Python/3.6.11/x64/lib/python3.6/site-packages/ansible_test/_internal/cli.py", line 159, in main config = args.config(args) # type: CommonConfig File "/opt/hostedtoolcache/Python/3.6.11/x64/lib/python3.6/site-packages/ansible_test/_internal/coverage/__init__.py", line 59, in __init__ super(CoverageConfig, self).__init__(args, 'coverage') File "/opt/hostedtoolcache/Python/3.6.11/x64/lib/python3.6/site-packages/ansible_test/_internal/config.py", line 99, in __init__ self.remote_endpoint = args.remote_endpoint # type: t.Optional[str] AttributeError: 'Namespace' object has no attribute 'remote_endpoint' ```
https://github.com/ansible/ansible/issues/71443
https://github.com/ansible/ansible/pull/71446
72a7cb4a2c3036da5e3abb32c50713a262d0c063
f5b6df14ab2e691f5f059fff0fcf59449132549f
2020-08-25T15:00:33Z
python
2020-08-26T04:23:44Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,420
["changelogs/fragments/71420_get_url.yml", "lib/ansible/modules/get_url.py", "test/integration/targets/get_url/tasks/main.yml"]
get_url is unable to find a checksum for file
##### SUMMARY <!--- Explain the problem briefly below --> get_url fails to find the file from sha256sum.txt file, even if it is there and works fine while being done manually. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> get_url ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.11 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ANSIBLE_NOCOWS(/root/hetzner-ocp4/ansible.cfg) = True ANSIBLE_PIPELINING(/root/hetzner-ocp4/ansible.cfg) = True ANSIBLE_SSH_ARGS(/root/hetzner-ocp4/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=600s ANSIBLE_SSH_CONTROL_PATH(/root/hetzner-ocp4/ansible.cfg) = %(directory)s/%%h-%%r DEFAULT_CALLBACK_WHITELIST(/root/hetzner-ocp4/ansible.cfg) = ['profile_tasks'] DEFAULT_FORKS(/root/hetzner-ocp4/ansible.cfg) = 20 DEFAULT_GATHERING(/root/hetzner-ocp4/ansible.cfg) = smart DEFAULT_LOG_PATH(/root/hetzner-ocp4/ansible.cfg) = /root/ansible.log DEFAULT_REMOTE_USER(/root/hetzner-ocp4/ansible.cfg) = root DEFAULT_TIMEOUT(/root/hetzner-ocp4/ansible.cfg) = 30 HOST_KEY_CHECKING(/root/hetzner-ocp4/ansible.cfg) = False INVENTORY_IGNORE_EXTS(/root/hetzner-ocp4/ansible.cfg) = ['secrets.py', '.pyc', '.cfg', '.crt', '.ini'] RETRY_FILES_ENABLED(/root/hetzner-ocp4/ansible.cfg) = False RETRY_FILES_SAVE_PATH(/root/hetzner-ocp4/ansible.cfg) = /root/ansible-installer-retries ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> centos-release-8.2-2.2004.0.1.el8.x86_64 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> I have file to download, and a checksum file for it. The following urls are used: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.5/4.5.6/sha256sum.txt https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.5/4.5.6/rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: download coreos get_url: url: "{{ coreos_download_url }}" dest: "{{ coreos_path }}/{{ coreos_file }}.gz" checksum: "sha256:{{ coreos_csum_url }}" register: coreos_download ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> If I do this manually, it works fine: ``` # wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.5/4.5.6/sha256sum.txt # wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.5/4.5.6/rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz # grep rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz sha256sum.txt |sha256sum -c rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz: OK ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The correct line is in checksum file: ``` # grep rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz sha256sum.txt a94f3cd6113839f61239e42887bce7c2c0d6742e2e35d775c5786f5848f208fc rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz ``` <!--- Paste verbatim command output between quotes --> ```paste below Using module file /usr/lib/python3.6/site-packages/ansible/modules/net_tools/basics/get_url.py Pipelining is enabled. <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.6 && sleep 0' fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "attributes": null, "backup": null, "checksum": "sha256:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.5/4.5.6/sha256sum.txt", "client_cert": null, "client_key": null, "content": null, "delimiter": null, "dest": "/var/lib/libvirt/images/rhcos-4.5.6.qcow2.gz", "directory_mode": null, "follow": false, "force": false, "force_basic_auth": false, "group": null, "headers": null, "http_agent": "ansible-httpget", "mode": null, "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "sha256sum": "", "src": null, "timeout": 10, "tmp_dest": null, "unsafe_writes": null, "url": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.5/4.5.6/rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz", "url_password": null, "url_username": null, "use_proxy": true, "validate_certs": true } }, "msg": "Unable to find a checksum for file 'rhcos-4.5.6-x86_64-qemu.x86_64.qcow2.gz' in 'https://mirror.openshift.com/pub/openshift- v4/dependencies/rhcos/4.5/4.5.6/sha256sum.txt'" } ```
https://github.com/ansible/ansible/issues/71420
https://github.com/ansible/ansible/pull/71435
0f3b5bb4a6e5ae74ade0997672ceee76965ad99a
159544610e5a925d589198febaa5198778ea51c0
2020-08-24T12:10:08Z
python
2020-09-01T13:55:08Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,395
["docs/docsite/known_good_reqs.txt", "docs/docsite/requirements.txt", "docs/docsite/rst/community/documentation_contributions.rst"]
doc build fails on Python 3.8 + MacOS
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> Documentation doesn't currently build on MacOS with Python3.8. This is due to https://github.com/sphinx-doc/sphinx/issues/6803 which is not fixed in the sphinx version used by ansible documentation build system (it's frozen to 2.1.2) <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> [docs/docsite/requirements.txt](docs/docsite/requirements.txt) ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.11 config file = None configured module search path = ['/Users/waldekm/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.11/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below # empty output ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ``` $ uname -rs Darwin 19.6.0 $ python --version Python 3.8.5 ``` ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> Error log ``` $ make webdocs (cd docs/docsite/; CPUS=8 /Applications/Xcode.app/Contents/Developer/usr/bin/make docs) ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml mkdir -p rst/cli ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py [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. ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml if expr "2.11.0.dev0" : '.*[.]dev[0-9]\{1,\}$' &> /dev/null; then \ ../../hacking/build-ansible.py docs-build base -o rst ;\ else \ ../../hacking/build-ansible.py docs-build full -o rst ;\ fi ERROR:antsibull:func=write_rst:mod=antsibull.write_docs:nonfatal_errors=['1 validation error for PluginDocSchema\ndoc -> options -> cache -> deprecated -> removed_from_collection\n field required (type=value_error.missing)']:plugin_name=ansible.builtin.script:plugin_type=inventory|ansible.builtin.script did not return correct DOCUMENTATION. An error page will be generated. ERROR:antsibull:func=write_rst:mod=antsibull.write_docs:nonfatal_errors=['18 validation errors for PluginDocSchema\ndoc -> options -> ca_path -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> ca_path -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> follow_redirects -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> follow_redirects -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> force -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> force -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> force_basic_auth -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> force_basic_auth -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> http_agent -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> http_agent -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> timeout -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> timeout -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> unix_socket -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> unix_socket -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> unredirected_headers -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> unredirected_headers -> ini -> 1 -> section\n field required (type=value_error.missing)\ndoc -> options -> use_gssapi -> ini -> 0 -> key\n field required (type=value_error.missing)\ndoc -> options -> use_gssapi -> ini -> 1 -> section\n field required (type=value_error.missing)']:plugin_name=ansible.builtin.url:plugin_type=lookup|ansible.builtin.url did not return correct DOCUMENTATION. An error page will be generated. ../bin/testing_formatter.sh ../bin/testing_formatter.sh: line 38: ../docsite/rst/dev_guide/testing/sanity/index.rst: No such file or directory CPUS=8 /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.sphinx html sphinx-build -M html "rst" "_build" -j 8 -n -w rst_warnings Running Sphinx v2.1.2 making output directory... done loading intersphinx inventory from https://docs.python.org/2/objects.inv... loading intersphinx inventory from https://docs.python.org/3/objects.inv... loading intersphinx inventory from http://jinja.palletsprojects.com/objects.inv... intersphinx inventory has moved: http://jinja.palletsprojects.com/objects.inv -> https://jinja.palletsprojects.com/en/2.11.x/objects.inv loading intersphinx inventory from https://docs.ansible.com/ansible/2.10/objects.inv... loading intersphinx inventory from https://docs.ansible.com/ansible/2.9/objects.inv... loading intersphinx inventory from https://docs.ansible.com/ansible/2.8/objects.inv... loading intersphinx inventory from https://docs.ansible.com/ansible/2.7/objects.inv... loading intersphinx inventory from https://docs.ansible.com/ansible/2.6/objects.inv... loading intersphinx inventory from https://docs.ansible.com/ansible/2.5/objects.inv... building [mo]: targets for 0 po files that are out of date building [html]: targets for 463 source files that are out of date updating environment: 463 added, 0 changed, 0 removed reading sources... [ 5%] 404 .. collections/ansible/builtin/config_lookup Exception occurred: File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'Builder._read_parallel.<locals>.merge' The full traceback has been saved in /var/folders/f1/svj655pj0mj11j240_yh47840000gn/T/sphinx-err-w96ydjs6.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! make[2]: *** [html] Error 2 make[1]: *** [htmldocs] Error 2 make: *** [webdocs] Error 2 ``` <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/71395
https://github.com/ansible/ansible/pull/74956
50b6d28ee168fd8a7cdc80e11aadef745fe6711b
58f26388be7fc20aee8a3f43863c7832eea21fb6
2020-08-21T10:46:47Z
python
2021-06-22T18:58:54Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,373
["docs/docsite/rst/plugins/inventory.rst"]
inventory plugin documentation isnt good enough
##### SUMMARY Trying to use the new "ec2 inventory" plugin with Ansible 2.9.x. I went to the "Enabling inventory plugins" page (https://docs.ansible.com/ansible/latest/plugins/inventory.html#enabling-inventory-plugins). And as instructed, added a `ansible.cfg` file to my current dir. Also added a file called `inventory_aws_ec2.yml` with the contents `plugin: aws_ec2`. When running `ansible-inventory --graph` I was expecting to at least get an error back or something related to the ec2 plugin. Based on this (https://medium.com/faun/learning-the-ansible-aws-ec2-dynamic-inventory-plugin-59dd6a929c7f) article I managed to get it working, but IMHO the documentation is far too weak here: - Should I use the `inventory` section and not the `defaults` section in `ansible.cfg`? why/why not? - The part about an "auto" plugin is extremely confusing. It looks like after having enabled the plugin I didn't have to enable the plugin after all because the auto plugin takes care of it? - is `enable_plugins` an additive setting? Do I remove other detault plugins by setting `enable_plugins = aws_ec2`? All in all, I found inventory plugins to be a surprisingly quirky thing to set up. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME inventory plugin ##### ANSIBLE VERSION ``` ansible 2.9.12 config file = /home/trond/Documents/projects-mohawk/strange-dog/ansible.cfg configured module search path = ['/home/trond/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0] ```
https://github.com/ansible/ansible/issues/71373
https://github.com/ansible/ansible/pull/71387
3f3bcbf05e46db08a0f5f88ec1eb4c72b82d9fd5
fb035da3b26476c028ae76937192739bd6cb30f7
2020-08-20T10:40:23Z
python
2020-08-21T16:26:02Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,343
["changelogs/fragments/71343_yum_repository.yml", "lib/ansible/module_utils/basic.py"]
yum_repository logs Invoked with at emergency level
##### SUMMARY When using the yum_repository without setting a priority param, the call to _log_invocation logs at emergency level to the journal ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME yum_repository ##### ANSIBLE VERSION ```ansible 2.9.0 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible python version = 3.6.8 (default, Apr 2 2020, 13:34:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` ##### CONFIGURATION ```[root@yolandi ansible]# ansible-config dump --only-changed [root@yolandi ansible]# ``` ##### OS / ENVIRONMENT CentOS 7.8 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ``` - hosts: localhost tasks: - name: Create dummy yum repo yum_repository: name: "Dummy}" description: "Clearly a dummy" baseurl: "https://example.com" enabled: no ``` ##### EXPECTED RESULTS _log_invocation isn't logged at a high level thus getting caught by alert level filtering ##### ACTUAL RESULTS Because log_args gets passed in as `priority='None'`, the log_invocation call gets logged at the highest level ``` PLAY [localhost] ************************************************************************************************ TASK [Gathering Facts] ****************************************************************************************** ok: [localhost] TASK [Create dummy yum repo] ************************************************************************************ 2020 Aug 19 11:02:48 yolandi ansible-yum_repository Invoked with name=Dummy} description=Clearly a dummy baseurl=['https://example.com'] enabled=False reposdir=/etc/yum.repos.d state=present follow=False bandwidth=None cost=None deltarpm_metadata_percentage=None deltarpm_percentage=None enablegroups=None exclude=None failovermethod=None file=None gpgcakey=None gpgcheck=None gpgkey=None http_caching=None include=None includepkgs=None ip_resolve=None keepalive=None keepcache=None metadata_expire=None metadata_expire_filter=None metalink=None mirrorlist=None mirrorlist_expire=None params=None password=NOT_LOGGING_PARAMETER priority=None protect=None proxy=None proxy_password=NOT_LOGGING_PARAMETER proxy_username=None repo_gpgcheck=None retries=None s3_enabled=None skip_if_unavailable=None sslcacert=None ssl_check_cert_permissions=None sslclientcert=None sslclientkey=None sslverify=None throttle=None timeout=None ui_repoid_vars=None username=None async=None mode=None owner=None group=None seuser=None serole=None selevel=None setype=None attributes=None src=None force=None content=NOT_LOGGING_PARAMETER backup=None remote_src=None regexp=None delimiter=None directory_mode=None unsafe_writes=None ok: [localhost] PLAY RECAP ****************************************************************************************************** localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/71343
https://github.com/ansible/ansible/pull/74559
2c93b220438797581dc34232f67ce08a2f8ad33b
1006363589f2c82e3feba43253532b76f6c232ba
2020-08-19T01:04:14Z
python
2021-05-11T19:05:56Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,307
["changelogs/fragments/71307-toml-dumps-unsafe.yml", "lib/ansible/plugins/inventory/toml.py"]
toml inventory cannot dump unsafe values
##### SUMMARY Rendering string ``` config: service: !unsafe '{{ SYSLOG_IDENTIFIER }}' ``` with ``` - name: place config copy: content: | {{ config | to_toml }} dest: "{{ config_file }}" ``` leads to ``` service = [ "{", "{", " ", "S", "Y", "S", "L", "O", "G", "_", "I", "D", "E", "N", "T", "I", "F", "I", "E", "R", " ", "}", "}",] ``` instead of ``` service = "{{ SYSLOG_IDENTIFIER }}" ``` I understand that filter to_toml is not part of ansible and get from https://github.com/sivel/toiletwater but in code of it it uses ansible code in import section. https://github.com/sivel/toiletwater/blob/master/plugins/filter/toml.py#L10 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME to_toml ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below % ansible --version ansible 2.9.11 config file = None configured module search path = ['/home/ashirokih/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ashirokih/python/lib/python3.8/site-packages/ansible executable location = /home/ashirokih/python/bin/ansible python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below empty ``` ##### OS / ENVIRONMENT not relevant ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> Rendering string ```yaml config: service: !unsafe '{{ SYSLOG_IDENTIFIER }}' ``` with ```yaml - name: place config copy: content: | {{ config | to_toml }} dest: "{{ config_file }}" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS ``` service = "{{ SYSLOG_IDENTIFIER }}" ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below service = [ "{", "{", " ", "S", "Y", "S", "L", "O", "G", "_", "I", "D", "E", "N", "T", "I", "F", "I", "E", "R", " ", "}", "}",] ``` Probably i should ask @sivel
https://github.com/ansible/ansible/issues/71307
https://github.com/ansible/ansible/pull/71309
959af7d90b34dfe530e27279db214ae2976c1f86
9da880182be89a7fdbea3b5424da501542eba4c9
2020-08-17T14:19:22Z
python
2020-08-17T18:46:13Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,306
["changelogs/fragments/71306-fix-exit-code-no-failure.yml", "lib/ansible/executor/play_iterator.py", "test/integration/targets/blocks/issue71306.yml", "test/integration/targets/blocks/runme.sh"]
Ansible failed without any errors
##### [SUMMARY] The following playbook have no failed tasks (only rescued), but the exit code of "ansible-playbook" is 2. Also AWX marks this job as failed [issue-failed.zip](https://github.com/ansible/ansible/files/5084148/issue-failed.zip) ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-playbook ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible-playbook 2.9.11 config file = /Users/xxx/git/vault/awx-scripts/ansible.cfg configured module search path = ['/Users/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.11/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible-playbook python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] ``` Also tested with the latest AWX version (14.0.0) ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> MacOS & AWX Docker image ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Download the playbook: [issue-failed.zip](https://github.com/ansible/ansible/files/5084148/issue-failed.zip) Create an inventory with 2 hosts (in this example host1 + host2) Open issue-failed/test/tasks/include2.yml and replace the hostname with the first hostname of your inventory (line 5) Run the playbook: ``` ansible-playbook --inventory "host1,host2" test.yml ``` Summery of the playbook: Both host have 0 failed tasks: ``` PLAY RECAP ************************************************************************************************************************************************************************************ host1 : ok=4 changed=0 unreachable=0 failed=0 skipped=0 rescued=1 ignored=0 host2 : ok=4 changed=0 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 ``` But the exit code is 2 (playbook failed): ``` echo $? 2 ``` When you remove the "when" condition in issue-failed/test/tasks/include2.yml, then the playbook exists with exitcode "0" (the expected behavior)
https://github.com/ansible/ansible/issues/71306
https://github.com/ansible/ansible/pull/71347
f5b6df14ab2e691f5f059fff0fcf59449132549f
9792d631b1b92356d41e9a792de4b2479a1bce44
2020-08-17T12:36:40Z
python
2020-08-26T05:07:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,277
["changelogs/fragments/71277-include_tasks-show-name-with-free-strategy.yml", "lib/ansible/plugins/callback/default.py", "test/integration/targets/callback_default/callback_default.out.default.stdout", "test/integration/targets/callback_default/callback_default.out.failed_to_stderr.stdout", "test/integration/targets/callback_default/callback_default.out.hide_ok.stdout", "test/integration/targets/callback_default/callback_default.out.hide_skipped.stdout", "test/integration/targets/callback_default/callback_default.out.hide_skipped_ok.stdout", "test/integration/targets/callback_default/test.yml", "test/integration/targets/callback_default/test_dryrun.yml"]
Name of task with include_tasks is not displayed
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> Names of tasks that contain "include_tasks" aren't displayed during playbook run ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> include_tasks ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.4 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/spider/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /srv/app/prod/ansible/core/ansible-2.9/lib64/python3.6/site-packages/ansible executable location = /srv/app/prod/ansible/core/ansible-2.9/bin/ansible python version = 3.6.3 (default, Apr 10 2019, 14:37:36) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below only strategy = free and jsonfile cache is used ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> RedHat 7 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: "Include custom_tasks_pre_install" include_tasks: "{{ ansible_distribution }}{{ ansible_distribution_major_version }}/{{ item }}" loop: "{{ main_role_csas_sshd_custom_tasks_pre_install | default([ 'empty.yml' ]) }}" tags: - always ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> This should be displayed when playbook runs: ``` TASK [csas_sshd : Include custom_tasks_pre_install] ********************************** included: /srv/data/prod/ansible/core/remote/cm/csas/ansible-dev/playbooks/roles/csas_sshd/tasks/RedHat7/empty.yml for server ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> ``` included: /srv/data/prod/ansible/core/remote/cm/csas/ansible-dev/playbooks/roles/csas_sshd/tasks/RedHat7/empty.yml for server ``` <!--- Paste verbatim command output between quotes --> ```paste below ``` As we use a lot of loops and includes it's difficult to understand the flow from output as it is incomplete. When task is skipped then it is properly displayed: ``` TASK [csas_sshd : Include custom_tasks_post_uninstall] ************************************************************************************************************************************** skipping: [server] => (item=empty.yml) => {"ansible_loop_var": "item", "changed": false, "item": "empty.yml", "skip_reason": "Conditional result was False"} ```
https://github.com/ansible/ansible/issues/71277
https://github.com/ansible/ansible/pull/71821
a99212464c1e5de0245a8429047fa2e05458f20b
abfb7919dc5bc8d78272f2473bcb39dc5372b79e
2020-08-14T06:56:53Z
python
2020-09-22T15:40:12Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,254
["docs/docsite/rst/scenario_guides/guide_packet.rst"]
Files contain broken references 404
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY Files contain broken references (return 404): - [ ] docs/docsite/rst/user_guide/collections_using.rst https://docs.ansible.com/collections/ - [x] docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_requirements.rst https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py~ - [x] docs/docsite/rst/dev_guide/testing_units.rst https://github.com/ansible/ansible/blob/devel/test/units/modules/network/eos/test_eos_banner.py - [x] docs/docsite/rst/porting_guides/porting_guide_base_2.11.rst https://github.com/ansible/ansible/blob/stable-2.11/changelogs/CHANGELOG-v2.11.rst - [x] docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_external_doc_links.rst https://github.com/vmware/pyvmomi/tree/master/docs - [x] docs/docsite/rst/user_guide/intro_dynamic_inventory.rst https://raw.githubusercontent.com/ansible-collections/community.aws/master/scripts/inventory/ec2.in - [x] docs/docsite/rst/user_guide/intro_dynamic_inventory.rst https://raw.githubusercontent.com/ansible-collections/community.aws/master/scripts/inventory/ec2.py - [x] docs/docsite/rst/user_guide/intro_dynamic_inventory.rst https://raw.githubusercontent.com/ansible-collections/community.aws/master/scripts/inventory/ec2.py - [x] docs/docsite/rst/user_guide/intro_dynamic_inventory.rst https://raw.githubusercontent.com/ansible-collections/community.aws/master/scripts/inventory/ec2.py - [x] docs/docsite/rst/scenario_guides/guide_azure.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/azure_rm.ini - [x] docs/docsite/rst/scenario_guides/guide_azure.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/azure_rm.py - [x] docs/docsite/rst/scenario_guides/guide_azure.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/azure_rm.py - [x] docs/docsite/rst/scenario_guides/guide_azure.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/azure_rm.py - [x] docs/docsite/rst/user_guide/intro_dynamic_inventory.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/cobbler.py - [x] docs/docsite/rst/scenario_guides/guide_infoblox.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/infoblox.py - [x] docs/docsite/rst/scenario_guides/guide_infoblox.rst https://raw.githubusercontent.com/ansible-collections/community.general/master/scripts/inventory/infoblox.yaml - [ ] docs/docsite/rst/scenario_guides/guide_packet.rst https://support.packet.com/kb/articles/user-data ##### ISSUE TYPE - Documentation Report ##### ANSIBLE VERSION ``` devel ```
https://github.com/ansible/ansible/issues/71254
https://github.com/ansible/ansible/pull/71705
00ed5b1f2e2a0af3a4c291745dc0e193a89f42c1
c36e939414327e099171f51d7ae630a736a3b14c
2020-08-13T09:26:11Z
python
2020-09-15T20:05:27Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,235
["docs/docsite/rst/plugins/cliconf.rst", "docs/docsite/rst/plugins/httpapi.rst", "docs/docsite/rst/plugins/netconf.rst"]
[2/1]Update plugin lists on plugin pages to show how to get the list
##### SUMMARY Currently we have a note on some of these pages to say the plugin list isn't accurate yet due to preparing for 2.10 etc. ( see https://github.com/ansible/ansible/pull/71227). We need to remove that note and then under the Plugin lists, add the following: You can use ansible-doc -t inventory -l to see the list of available plugins. Use ansible-doc -t inventory <plugin name> to see plugin-specific documentation and examples. (for the appropriate plugin type.) ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/71235
https://github.com/ansible/ansible/pull/71467
1257b0a184c94ed405f6e5e36557c1327ad55ff6
f82a1e06d7cca73466180c1b11c9f201f865a8bc
2020-08-12T16:19:47Z
python
2020-08-26T16:05:20Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,224
["docs/docsite/rst/dev_guide/testing_sanity.rst"]
Git related errors when running ansible-test sanity without --docker-keep-git
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY Running ansible sanity tests in docker: ``` ansible-test sanity --base-branch devel lib/ansible/modules/lineinfile.py --docker default --docker-no-pull ``` causes: ``` File "/root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py", line 2431, in _git raise GitError(stderr, p.returncode) validate_modules.main.GitError: b'fatal: not a git repository (or any of the parent directories): .git\n' ``` See the full traceback below If i add `--docker-keep-git` argument, the tests pass successfully When i run this without passing `--base-branch`, everything works ok, but i (and other users) get ``` WARNING: Cannot perform module comparison against the base branch because the base branch was not detected. ``` the warning sounds like we missed something important. So we need to fix this or, if it's expected behavior, mark this in the doc https://github.com/ansible/ansible/pull/71223 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ```ansible-test``` ##### ANSIBLE VERSION ```devel``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below devel ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> CentOS 8 ##### STEPS TO REPRODUCE Run ``` ansible-test sanity --base-branch devel lib/ansible/modules/lineinfile.py --docker default ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> No errors. Adding `--docker-keep-git` helps. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below Running sanity test 'validate-modules' with Python 3.6 ERROR: Command "/usr/bin/python3.6 /root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate-modules --format json --arg-spec lib/ansible/modules/lineinfile.py --base-branch devel" returned exit status 1. >>> Standard Error Traceback (most recent call last): File "/root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate-modules", line 8, in <module> main() File "/root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py", line 2444, in main run() File "/root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py", line 2313, in run git_cache = GitCache(args.base_branch) File "/root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py", line 2383, in __init__ self.base_tree = self._git(['ls-tree', '-r', '--name-only', self.base_branch, 'lib/ansible/modules/']) File "/root/ansible/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py", line 2431, in _git raise GitError(stderr, p.returncode) validate_modules.main.GitError: b'fatal: not a git repository (or any of the parent directories): .git\n' ERROR: Command "docker exec 024ef901a6abe0e993a5d59d92cd3370edc58bc12afd272e891c9c67adab7f27 /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible LC_ALL=en_US.UTF-8 /usr/bin/python3.6 /root/ansible/bin/ansible-test sanity --base-branch devel lib/ansible/modules/lineinfile.py --docker-no-pull --metadata test/results/.tmp/metadata-vklM9L.json --truncate 141 --redact --color yes --requirements --base-branch devel" returned exit status 1. ```
https://github.com/ansible/ansible/issues/71224
https://github.com/ansible/ansible/pull/71223
b9e2c4e37dd8ddd9d7d2628e4aa606125ef96b43
56423b1648853d06d24fe65882c7de89a9db04bc
2020-08-12T11:25:02Z
python
2020-09-01T16:00:13Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,222
["changelogs/fragments/73809-search-handler-subdir.yml", "lib/ansible/playbook/included_file.py", "test/integration/targets/handlers/roles/test_role_handlers_include_tasks/handlers/A.yml", "test/integration/targets/handlers/roles/test_role_handlers_include_tasks/handlers/main.yml", "test/integration/targets/handlers/roles/test_role_handlers_include_tasks/tasks/B.yml", "test/integration/targets/handlers/runme.sh", "test/integration/targets/handlers/test_role_handlers_including_tasks.yml"]
include in handler requires full path
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> To include tasks for handlers I have to specify full path instead of relative to the role's directory Similar to: https://github.com/ansible/ansible/issues/19609 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `lib/ansible/playbook/included_file.py` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.4 config file = /srv/data/ansible-dev/ansible.cfg configured module search path = ['/home/spider/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /srv/app/prod/ansible/core/ansible-2.9/lib64/python3.6/site-packages/ansible executable location = /srv/app/prod/ansible/core/ansible-2.9/bin/ansible python version = 3.6.3 (default, Apr 10 2019, 14:37:36) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> RedHat 7 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> in role's handlers directory I have: cat main.yml <!--- Paste example playbooks or commands between quotes below --> ```yaml --- # handlers file for sshd - name: Include proper handlers for services include_tasks: "{{ ansible_distribution }}{{ ansible_distribution_major_version }}/handlers-services.yml" listen: 'Handle sshd services' ``` The full path works ok: ```yaml --- # handlers file for sshd - name: Include proper handlers for services include_tasks: "{{ role_path }}/handlers/{{ ansible_distribution }}{{ ansible_distribution_major_version }}/handlers-services.yml" listen: 'Handle sshd services' ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Tasks should be included from path relative to role ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Include fails as ansible tries to include handlers-services.yml directly from playbook directory <!--- Paste verbatim command output between quotes --> ```paste below RUNNING HANDLER [sshd : Include proper handlers] *************************************************************************************************************************************** fatal: [tpinsas03]: FAILED! => {"reason": "Could not find or access '/srv/data/ansible-dev/playbooks/RedHat7/handlers-services.yml' on the Ansible Controller."} to retry, use: --limit @/srv/data/ansible-dev/retry/cm.retry ```
https://github.com/ansible/ansible/issues/71222
https://github.com/ansible/ansible/pull/73809
309802214616b3981a4d2a6b3bdcf4077bd0e062
1e5ccb326fa49046da7a06e42734836b99e2d5cc
2020-08-12T08:41:52Z
python
2021-03-15T19:39:59Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,107
["changelogs/fragments/71107-encryption.yml", "lib/ansible/plugins/lookup/password.py", "lib/ansible/utils/encrypt.py", "test/units/utils/test_encrypt.py"]
password_hash filter does not validate salt characters
##### SUMMARY I'm currently using ansible 2.9.9 (latest available on debian testing), with python 3.8.5 I used a playbook developed with ansible 2.7.7 (latest on debian stable), and I've been kick out of all my servers because the salt used in the password_hash() function contains specials caracters. I dont know if this is intentional, an element missing in the documentation or if I was simply not aware of that fact, in any case, I think that it could be interessting to warn other about this. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME User (password_hash) ##### ANSIBLE VERSION 2.9.9 ##### STEPS TO REPRODUCE ```--- - name: hosts: - localhost gather_facts: false tasks: - debug: msg: "{{ 'password' | password_hash( 'sha512', 65534 | random( seed=inventory_hostname ) | string ) }}" - debug: msg: "{{ 'password' | password_hash( 'sha512', 'salt' ) }}" - debug: msg: "{{ 'password' | password_hash( 'sha512', 'salt-' ) }}" - debug: msg: "{{ 'password' | password_hash( 'sha512', 'salt_' ) }}" ``` ##### ACTUAL RESULTS ``` [WARNING]: Unable to parse /home/.../ansible/inventory as an inventory source [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ******************************************************************************************************************************************* TASK [debug] *********************************************************************************************************************************************** ok: [localhost] => { "msg": "$6$43927$59/6eFzcpI0IigUdbYePA2OeIEwIkyqe9VJzYswDQhl6cD7I4SoZehr004rG.k4xB8/C5F7A4k9dU5LC1RdGn." } TASK [debug] *********************************************************************************************************************************************** ok: [localhost] => { "msg": "$6$salt$IxDD3jeSOb5eB1CX5LBsqZFVkJdido3OUILO5Ifz5iwMuTS4XMS130MTSuDDl3aCI6WouIL9AjRbLCelDCy.g." } TASK [debug] *********************************************************************************************************************************************** ok: [localhost] => { "msg": "*0" } TASK [debug] *********************************************************************************************************************************************** ok: [localhost] => { "msg": "*0" } PLAY RECAP ************************************************************************************************************************************************* localhost : ok=4 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ##### EXPECTED RESULTS Not "*0" for the password hashed.
https://github.com/ansible/ansible/issues/71107
https://github.com/ansible/ansible/pull/71120
b6f10b9b52153499b2f19bd1b9a4fbf0328de7b2
fdf5dd02b3f17bf92060febdc62985460c7deb35
2020-08-05T16:52:03Z
python
2020-08-26T19:54:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,103
["changelogs/fragments/delegation_password.yml", "lib/ansible/config/manager.py", "lib/ansible/plugins/connection/psrp.py", "lib/ansible/plugins/connection/winrm.py", "test/integration/targets/connection_delegation/action_plugins/delegation_action.py", "test/integration/targets/connection_delegation/aliases", "test/integration/targets/connection_delegation/connection_plugins/delegation_connection.py", "test/integration/targets/connection_delegation/inventory.ini", "test/integration/targets/connection_delegation/runme.sh", "test/integration/targets/connection_delegation/test.yml"]
winrm Kerberos automatic ticket management doesn't work
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> WinRM kerberos tickets are not getting generated for the playbook tasks, the issue fails in 2.9.10 and 2.9.11 version, while it works with no code change in 2.9.9 In affected Ansible version (2.9.10 and 2.9.11), if I generate a Kerberos ticket (via kinit) in awx_task docker before running the playm the play works, in Ansible 2.9.9 the play will run with no manual ticket creation. Beside realms configuration (which I am sure they are right as the code works for Ansible 2.9.9), below are other krb5 configuration and I had always default_ccache_name disabled. ``` bash-4.4# cat /etc/krb5.conf [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] default_realm = <DOMAIN NAME> dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true rdns = false # default_ccache_name = KEYRING:persistent:%{uid} ``` Although if fails in AWX, in awx_docker command line, below works: ``` bash-4.4# cat sam_inven [windows] <HOST FQDN> [windows:vars] ansible_user=<AD ACCOUNT>@<DOMAIN NAME> ansible_password=<AD ACCOUNT Password> ansible_connection=winrm ansible_port=5986 ansible_winrm_transport=kerberos ansible_winrm_server_cert_validation=ignore ansible_winrm_kerberos_delegation=true become_method=runas ``` ``` bash-4.4# cat test-play.yml --- - name: PROXY TEST hosts: <HOST FQDN> gather_facts: no collections: - community.vmware tasks: - name: Wait for system connection via WinRM wait_for_connection: timeout: 20 register: result_wait - name: Show WinRM result debug: var: result_wait ``` ``` bash-4.4# ansible-playbook -i sam_inven test-play.yml PLAY [PROXY TEST] ************************************************************************************************************************************************** TASK [Wait for system connection via WinRM] ************************************************************************************************************************ ok: [<HOST FQDN>] TASK [Show WinRM result] ******************************************************************************************************************************************* ok: [<HOST FQDN>] => { "result_wait": { "changed": false, "elapsed": 1, "failed": false } } PLAY RECAP ********************************************************************************************************************************************************* <HOST FQDN> : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 bash-4.4# ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> WINRM Kerberos ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.11 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/local/lib/python3.6/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below bash-4.4# ansible-config dump --only-changed bash-4.4# ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Ansible running as AWX docker images (official) based on CentOS Linux release 8.1.1911 (Core) Target hosts are Windows machines running Windows Server 2016 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> In AWX inventory host var: ansible_connection: winrm ansible_winrm_transport: kerberos ansible_winrm_server_cert_validation: ignore ansible_winrm_kerberos_delegation: true become_method: runas ansible_port: 5986 ```yaml --- - name: TEST hosts: localhost gather_facts: no tasks: - name: Wait for system connection via WinRM wait_for_connection: timeout: 60 register: result_wait delegate_to: <host FQDN> ignore_errors: yes - name: Show WinRM result debug: var: result_wait ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ``` { "elapsed": 1, "_ansible_no_log": false, "changed": false, "_ansible_delegated_vars": { "ansible_host": "<HOST FQDN>" } } ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below { "msg": "timed out waiting for ping module test success: kerberos: authGSSClientInit() failed: (('Unspecified GSS failure. Minor code may provide more information', 851968), (\"Can't find client principal <ACCOUNT NAME>@<DOMAIN NAME> in cache collection\", -1765328243))", "elapsed": 60, "_ansible_no_log": false, "changed": false, "_ansible_delegated_vars": { "ansible_host": "<HOST FQDN>", "ansible_port": 5986, "ansible_user": "<acount name>@<DOMAIN NAME>" } } ```
https://github.com/ansible/ansible/issues/71103
https://github.com/ansible/ansible/pull/71136
5f8b45a70e8e4e378cdafde6cc6c39f32af39e65
3f22f79e73af4398d03b0c1676bb8efde32ea607
2020-08-05T07:01:45Z
python
2020-08-07T23:06:32Z
closed
ansible/ansible
https://github.com/ansible/ansible
71,092
["changelogs/fragments/71214-add-vars-variable-for-delegated-vars.yaml", "lib/ansible/vars/manager.py", "test/integration/targets/delegate_to/resolve_vars.yml", "test/integration/targets/delegate_to/runme.sh"]
delegate_to using vars[] stopped working after updating to Ansible 2.9.10
### SUMMARY After updating from ansible 2.9.9 to ansible 2.9.10 the delegate on one of our playbooks stopped working ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME delegate_to ##### ANSIBLE VERSION It does NOT work with following version of Ansible: ``` # ansible --version ansible 2.9.10 config file = /root/.ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Sep 26 2019, 13:23:47) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] # ``` It works using the following version of Ansible: ``` # ansible --version ansible 2.9.9 config file = /root/.ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Sep 26 2019, 13:23:47) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] # ``` ##### CONFIGURATION ``` # ansible-config dump --only-changed CACHE_PLUGIN(/root/.ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/root/.ansible.cfg) = /tmp/ansible_fact_cache CACHE_PLUGIN_TIMEOUT(/root/.ansible.cfg) = 3600 DEFAULT_CALLBACK_WHITELIST(/root/.ansible.cfg) = [u'timer', u'mail'] DEFAULT_FORKS(/root/.ansible.cfg) = 50 DEFAULT_GATHERING(/root/.ansible.cfg) = smart DEFAULT_HOST_LIST(/root/.ansible.cfg) = [u'/<inventory script>'] DEFAULT_MANAGED_STR(/root/.ansible.cfg) = Ansible managed, do not manually edit: {file} DISPLAY_SKIPPED_HOSTS(/root/.ansible.cfg) = False INTERPRETER_PYTHON(/root/.ansible.cfg) = auto_legacy_silent RETRY_FILES_SAVE_PATH(/root/.ansible.cfg) = /tmp TRANSFORM_INVALID_GROUP_CHARS(/root/.ansible.cfg) = ignore # ``` ##### OS / ENVIRONMENT Red Hat Enterprise Linux Server 7.8 ##### STEPS TO REPRODUCE Before running another task, we need to check if an application is running on the App server using the delegate: ```yaml - name: Get app running processes shell: "ps aux | grep app | grep -v grep" changed_when: False check_mode: no ignore_errors: yes register: app_processes delegate_to: "{{ vars[app_server] }}" ``` this is no longer working using Ansible 2.9.10 ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ``` TASK [Get App running processes] ****************************************************************************************************************************************************************************** ok: [<server hostname>] => { "changed": false, "cmd": "ps aux | grep app | grep -v grep", "delta": "0:00:00.018218", "end": "2020-08-04 18:08:32.061806", "invocation": { "module_args": { "_raw_params": "ps aux | grep app | grep -v grep", "_uses_shell": true, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": true } }, "rc": 0, "start": "2020-08-04 18:08:32.043588", "stderr": "", "stderr_lines": [], "stdout": "app running info", "stdout_lines": [ "app running info" ] } ``` ##### ACTUAL RESULTS It fails with the following error: ``` TASK [Get App running processes] ****************************************************************************************************************************************************************************** The full traceback is: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 146, in run res = self._execute() File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 654, in _execute result = self._handler.run(task_vars=variables) File "/usr/lib/python2.7/site-packages/ansible/plugins/action/shell.py", line 27, in run result = command_action.run(task_vars=task_vars) File "/usr/lib/python2.7/site-packages/ansible/plugins/action/command.py", line 24, in run results = merge_hash(results, self._execute_module(task_vars=task_vars, wrap_async=wrap_async)) File "/usr/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 831, in _execute_module (module_style, shebang, module_data, module_path) = self._configure_module(module_name=module_name, module_args=module_args, task_vars=task_vars) File "/usr/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 165, in _configure_module use_vars = task_vars.get('ansible_delegated_vars')[self._task.delegate_to] KeyError: u'<server hostname>' fatal: [<server hostname running the app>]: FAILED! => { "msg": "Unexpected failure during module execution.", "stdout": "" } ...ignoring ```
https://github.com/ansible/ansible/issues/71092
https://github.com/ansible/ansible/pull/71214
fb03ac7019c91c751fc303585f82ae962764bcf0
cceba07114886e33ae39c5694ca1524a321eff16
2020-08-04T18:19:16Z
python
2020-10-02T19:13:56Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,998
["changelogs/fragments/apt_key_fixes.yml", "lib/ansible/modules/apt_key.py", "test/integration/targets/apt_key/tasks/apt_key.yml", "test/integration/targets/apt_key/tasks/file.yml"]
apt_key module fails to download the key from the URL
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY apt_key module fails to download keys from username/password protected address if response from that address redirects to a different url ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME apt_key ##### ANSIBLE VERSION ``` ansible 2.9.10 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/tadej/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible python version = 3.8.3 (default, May 29 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT Ansible is running on Fedora 32, target system was Debian Buster. ##### STEPS TO REPRODUCE On apt system run $ ansible-playbook playbook.yaml where *playbook.yaml* contains: <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: localhost become: true tasks: - apt_key: url: https://read-token:@packagecloud.io/repo/channel/gpgkey ``` ##### EXPECTED RESULTS The apt_key module should download the key and add it to the system. ##### ACTUAL RESULTS The key file is not downloaded. <!--- Paste verbatim command output between quotes --> ```paste below TASK [sensu.sensu_go.install : Add apt key] ************************************************************************* task path: /vagrant/ansible_collections/sensu/sensu_go/roles/install/tasks/apt/prepare.yml:17 <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: vagrant <127.0.0.1> EXEC /bin/sh -c 'echo ~vagrant && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp `"&& mkdir /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496 && echo ansible-tmp-1596123703.15-7698-147352890428496="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496 `" ) && sleep 0' Using module file /home/vagrant/venv/local/lib/python2.7/site-packages/ansible/modules/packaging/os/apt_key.py <127.0.0.1> PUT /home/vagrant/.ansible/tmp/ansible-local-73130sQlx2/tmpTka0Og TO /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496/AnsiballZ_apt_key.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496/ /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496/AnsiballZ_apt_key.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-arcvvjrkaonnmhuagbribxaggrraarss ; /home/vagrant/venv/bin/python2 /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496/AnsiballZ_apt_key.py'"'"' && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1596123703.15-7698-147352890428496/ > /dev/null 2>&1 && sleep 0' fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "data": null, "file": null, "id": null, "key": null, "keyring": null, "keyserver": null, "state": "present", "url": "https://<redacted>:@packagecloud.io/sensu/release-candidate/gpgkey", "validate_certs": true } }, "msg": "Failed to download key at https://<redacted>:@packagecloud.io/sensu/release-candidate/gpgkey: HTTP Error 401: Unauthorized" } ``` ##### ADDITIONAL INFO Curlng the url prints: ``` $ curl -v https://<redacted>:@packagecloud.io/sensu/release-candidate/gpgkey ... * Connection state changed (MAX_CONCURRENT_STREAMS == 128)! < HTTP/2 302 < date: Thu, 30 Jul 2020 15:49:16 GMT < content-type: text/html;charset=utf-8 < content-length: 0 < location: https://d18dy6y14fq314.cloudfront.net/188/13711/gpg/sensu-release-candidate-44E6C781E1E7FF69.pub.gpg?t=<redacted> ... ``` If we add the `-L` switch to `curl`, the file is downloaded just fine. I can also get module to download the file if I force the basic authentication in the `ansible.module_utils.urls.Request.open(...)` call, but apt_key module does not have an argument that would control this parameter.
https://github.com/ansible/ansible/issues/70998
https://github.com/ansible/ansible/pull/73334
595413d11346b6f26bb3d9df2d8e05f2747508a3
5aa4295d74f5fc1dd7bbc1a311af85ad963e38d8
2020-07-30T15:53:28Z
python
2021-01-27T23:40:58Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,984
["changelogs/fragments/70984-templating-ansibleundefined-in-operator.yml", "lib/ansible/template/__init__.py", "test/integration/targets/template/tasks/main.yml"]
[template] unhelpful error message for `x in y` if y undefined
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY I'm using the `template` module to generate some templates. If I say `x in y` and `y` is undefined, the error message is not at all specific. It prints out the entire contents of a file, possibly the wrong one, and doesn't even name which variable is undefined. Note that I expect this is not the right github repo to lodge this issue, since modules have been split into different repos. But I have no idea how to figure out which repo is the right repo. This itself is a documentation issue, #67939 . ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME template ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.0 config file = /home/ec2-user/environment/repo/workload/ansible.cfg configured module search path = ['/home/ec2-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ec2-user/.local/lib/python3.6/site-packages/ansible executable location = /home/ec2-user/.local/bin/ansible python version = 3.6.10 (default, Feb 10 2020, 19:55:14) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ANSIBLE_PIPELINING(/home/ec2-user/environment/repo/workload/ansible.cfg) = True ANY_ERRORS_FATAL(/home/ec2-user/environment/repo/workload/ansible.cfg) = True CACHE_PLUGIN(/home/ec2-user/environment/repo/workload/ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/home/ec2-user/environment/repo/workload/ansible.cfg) = ~/.ansible-facts-cache CACHE_PLUGIN_TIMEOUT(/home/ec2-user/environment/repo/workload/ansible.cfg) = 7200 DEFAULT_FORKS(/home/ec2-user/environment/repo/workload/ansible.cfg) = 50 DEFAULT_GATHERING(/home/ec2-user/environment/repo/workload/ansible.cfg) = no INVENTORY_UNPARSED_IS_FAILED(/home/ec2-user/environment/repo/workload/ansible.cfg) = True ``` ##### OS / ENVIRONMENT Amazon Linux. Python Jinja module 2.10.1 ##### STEPS TO REPRODUCE `playbook.yaml` ``` --- - hosts: localhost connection: local vars: x: 1 tasks: - template: src: "parent.j2" dest: "/tmp/out/parent-out.txt" trim_blocks: False ``` `parent.j2` ``` Here is the parent x = {{ x }} {% include 'child.j2' %} Back to the parent ``` `child.j2` ``` Here is the child x = {{ x }} {% if z in y %} {# this line will fail, because y is not defined #} {{ z }} {% endif %} ``` `ansible-playbook playbook.yaml` ##### EXPECTED RESULTS The same thing as when variables are undefined in other ways. ``` TASK [template] ************************************************************************************************************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'y' is undefined"} ``` Additionally the line number and file of the child template would be great. But at the very least I want the name of the undefined variable. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ``` fatal: [localhost]: FAILED! => changed=false msg: |- AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (Here is the parent x = {{ x }} {% include 'child.j2' %} Back to the parent). Make sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable ``` Note that: * the name of the undefined variable does not appear in the error message * the error message contains the contents of the `parent.j2` file, which had no errors in it, and no undefined variables in it * the error message does not contain the content or path or the file `child.j2` which had the error * if the `parent.j2` file is long, this error message can be very long, so it's not even clear which task failed until you scroll up several pages The only way to figure out what went wrong is to use a binary search, deleting half of `child.j2` at a time. Think of the case where you have a working template that uses a variable multiple times in the one template. Then you rename it elsewhere, and forget to rename it in the template. If you try to use the binary search method to find the error, you won't have any luck, because you'll end up in a situation where both halves have the same error. Note that you get the error without nested templating, if you have `{{ x in y }}` in the parent, and no `include`. So this bug isn't caused by nesting, it's just exacerbated, because when the undefined variable is in a nested template, the error message contains the wrong file contents entirely.
https://github.com/ansible/ansible/issues/70984
https://github.com/ansible/ansible/pull/70990
d62dffafb3671dfc331eef6a847dde05b24a73d0
bf7276a4e88de6e102ad06aa1d0716ae799d87ea
2020-07-30T02:12:28Z
python
2020-07-30T19:57:01Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,940
["changelogs/fragments/galaxy-collection-fallback.yml", "lib/ansible/galaxy/collection.py", "test/integration/targets/ansible-galaxy-collection/tasks/main.yml"]
ansible-galaxy collection install from upstream breaks when ansible.cfg has a valid hub definition
##### SUMMARY If you have an ansible.cfg with valid token/entries for both Automation Hub and Galaxy, and: server_list = automation_hub, release_galaxy This completely breaks an upstream Galaxy collection install and gives you no clue about the problem. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-galaxy ##### ANSIBLE VERSION ``` ansible --version ansible 2.9.11 config file = /Users/pgriffit/ansible.cfg configured module search path = ['/Users/pgriffit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] ``` ##### CONFIGURATION ``` grep server_list ansible.cfg server_list = automation_hub, release_galaxy ``` ##### OS / ENVIRONMENT sw_vers: ProductName: Mac OS X ProductVersion: 10.15.5 BuildVersion: 19F101 ##### STEPS TO REPRODUCE setup ansible.cfg with server_list as above and valid [galaxy_server.automation_hub] and [galaxy_server.release_galaxy] urls/tokens ##### EXPECTED RESULTS With server_list = release_galaxy, automation_hub, works as expected: ``` ansible-galaxy collection install servicenow.servicenow Process install dependency map Starting collection install process Installing 'servicenow.servicenow:1.0.2' to '/Users/pgriffit/collections/ansible_collections/servicenow/servicenow' ``` ##### ACTUAL RESULTS ``` ansible-galaxy collection install servicenow.servicenow -vvv ansible-galaxy 2.9.11 config file = /Users/pgriffit/ansible.cfg configured module search path = ['/Users/pgriffit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible-galaxy python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] Using /Users/pgriffit/ansible.cfg as config file Found installed collection f5networks.f5_modules:1.1.0 at '/Users/pgriffit/collections/ansible_collections/f5networks/f5_modules' Found installed collection ansible.posix:1.1.0 at '/Users/pgriffit/collections/ansible_collections/ansible/posix' Found installed collection ansible.netcommon:0.0.2 at '/Users/pgriffit/collections/ansible_collections/ansible/netcommon' Found installed collection junipernetworks.junos:0.0.2 at '/Users/pgriffit/collections/ansible_collections/junipernetworks/junos' Found installed collection servicenow.servicenow:1.0.1 at '/Users/pgriffit/collections/ansible_collections/servicenow/servicenow' Process install dependency map Processing requirement collection 'servicenow.servicenow' ERROR! Unexpected Exception, this is probably a bug: HTTP Error 400: Bad Request the full traceback was: Traceback (most recent call last): File "/usr/local/bin/ansible-galaxy", line 123, in <module> exit_code = cli.run() File "/usr/local/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 376, in run context.CLIARGS['func']() File "/usr/local/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 851, in execute_install install_collections(requirements, output_path, self.api_servers, (not ignore_certs), ignore_errors, File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 457, in install_collections dependency_map = _build_dependency_map(collections, existing_collections, b_temp_path, apis, File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 821, in _build_dependency_map _get_collection_info(dependency_map, existing_collections, name, version, source, b_temp_path, apis, File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 894, in _get_collection_info collection_info = CollectionRequirement.from_name(collection, apis, requirement, force, parent=parent) File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 346, in from_name resp = api.get_collection_versions(namespace, name) File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 56, in wrapped data = self._call_galaxy(n_url, method='GET', error_context_msg=error_context_msg) File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 192, in _call_galaxy self._add_auth_token(headers, url, required=auth_required) File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/api.py", line 222, in _add_auth_token headers.update(self.token.headers()) File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/token.py", line 94, in headers headers['Authorization'] = '%s %s' % (self.token_type, self.get()) File "/usr/local/lib/python3.8/site-packages/ansible/galaxy/token.py", line 77, in get resp = open_url(to_native(self.auth_url), File "/usr/local/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 1384, in open_url return Request().open(method, url, data=data, headers=headers, use_proxy=use_proxy, File "/usr/local/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 1294, in open r = urllib_request.urlopen(*urlopen_args) File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 569, in error return self._call_chain(*args) File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request ```
https://github.com/ansible/ansible/issues/70940
https://github.com/ansible/ansible/pull/70957
7f0c84ea15301f21ba9d20066bac2d34bbc03703
b1cb2553af9e3811ce6f66e54c0f050977332eba
2020-07-28T11:46:00Z
python
2020-07-29T21:28:43Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,925
["docs/docsite/rst/roadmap/ROADMAP_2_11.rst", "docs/docsite/rst/roadmap/ansible_base_roadmap_index.rst", "docs/docsite/rst/roadmap/ansible_roadmap_index.rst", "docs/docsite/rst/roadmap/index.rst", "docs/docsite/rst/roadmap/old_roadmap_index.rst"]
[Docs] [1]Ansible-base publication checklist
Update the documentation and publish the 2.10 version of Ansible-base documentation. Since Ansible releases separately, these steps will not update the version-switcher to add 2.10 to the dropdown yet, nor will /latest/ become 2.10. Tasks include: - [x] do 'something' about broken Edit on Github (fix or remove for now) - https://github.com/ansible/ansible/issues/70267 and https://github.com/ansible/ansible/pull/66745 - [x] Review changelogs in stable-2.10 for base - [x] Add ansible-base porting guide - [x] include base in Release Status Grid - [x] Make sure all server-side redirects are updated as necessary - see https://github.com/ansible/docsite/pull/11 - [x] Add skeleton roadmap for 2.11-base - [x] Add skeleton porting guide for 2.11-base - [ ] post release - update intersphinx links. see #66646 (should be done for ansible-base and Ansible releases) <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70925
https://github.com/ansible/ansible/pull/71478
c586d436fabc8033055d5195038ca3341d7f0192
d6fe849b2ed36dd32bec71f7887eccd4ef2dcb83
2020-07-27T20:36:17Z
python
2020-08-27T21:45:20Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,923
["docs/docsite/rst/community/development_process.rst"]
New changelog categories missing from documentation
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> Two new changelog categories, `breaking_changes`, and `security_fixes`, were added in #69968 but were not added to the [changelog fragment documentation](https://github.com/ansible/ansible/blob/4cc4cebc97ab1b9c5f0c424238d5352274b5dbad/docs/docsite/rst/community/development_process.rst#creating-a-changelog-fragment). <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> `changelogs/config.yaml` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.11 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below default ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> macOS 10.15.6 ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> Do we need to backport #69968 so we can backport security fixes to those branches and have the changelog build successfully? <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70923
https://github.com/ansible/ansible/pull/71027
e10902d744407a0f482aa00d958a25027cfe7129
4f4436c1240d38bd95829fd0fc31e456864dc24a
2020-07-27T17:53:11Z
python
2020-08-03T17:46:41Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,918
["docs/docsite/rst/dev_guide/developing_collections.rst"]
Add /meta and runtime.yml docs to Developer Guide
##### SUMMARY Looking at the Developer Guide (devel branch): https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html Not seeing any mention of `runtime.yml` nor the `/meta` directory as part of the schema. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME Unsure ##### ANSIBLE VERSION Devel - 2.10 ##### CONFIGURATION N/A ##### OS / ENVIRONMENT N/A ##### ADDITIONAL INFORMATION Developers should be using semver as well as providing all info in the `runtime.yml` file (like `requires_ansible` and more).
https://github.com/ansible/ansible/issues/70918
https://github.com/ansible/ansible/pull/71035
f6b3b4b430619fbd4af0f2bf50b4715ca959a7ff
a9eb8b04882669bd17cd82780c908863e7504886
2020-07-27T14:14:23Z
python
2020-08-04T15:25:08Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,887
["changelogs/fragments/70887_galaxy_token.yml", "lib/ansible/galaxy/token.py"]
ansible-galaxy crashes with invalid token file
##### SUMMARY I had a galaxy-token file which wasn't valid YAML and thus `ansible-galaxy` when crashing when installing a collection. While it's fine that it's failing, it should provide some details about why it failed. @jborean93 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-galaxy ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.10 config file = /Users/kbreit/Documents/Programming/config_check/ansible.cfg configured module search path = ['/Users/kbreit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> macOS 10.15.5 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Try to install a module using `ansible-galaxy collection install` with an invalid syntax'd YAML file for your ~/.ansible/galaxy_token` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below config_check [kbreit/diff●●] % ansible-galaxy collection install cisco.nxos -vvv ansible-galaxy 2.9.10 config file = /Users/kbreit/Documents/Programming/config_check/ansible.cfg configured module search path = ['/Users/kbreit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible-galaxy python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)] Using /Users/kbreit/Documents/Programming/config_check/ansible.cfg as config file Process install dependency map Opened /Users/kbreit/.ansible/galaxy_token Processing requirement collection 'cisco.nxos' ERROR! Unexpected Exception, this is probably a bug: 'str' object has no attribute 'get' the full traceback was: Traceback (most recent call last): File "/usr/local/bin/ansible-galaxy", line 123, in <module> exit_code = cli.run() File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 375, in run context.CLIARGS['func']() File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/cli/galaxy.py", line 836, in execute_install install_collections(requirements, output_path, self.api_servers, (not ignore_certs), ignore_errors, File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 457, in install_collections dependency_map = _build_dependency_map(collections, existing_collections, b_temp_path, apis, File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 821, in _build_dependency_map _get_collection_info(dependency_map, existing_collections, name, version, source, b_temp_path, apis, File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/collection.py", l 1 token: e2167b20b5f989bd113fedbefcc345261e9eee8b ine 894, in _get_collection_info collection_info = CollectionRequirement.from_name(collection, apis, requirement, force, parent=parent) File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/collection.py", line 346, in from_name resp = api.get_collection_versions(namespace, name) File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/api.py", line 56, in wrapped data = self._call_galaxy(n_url, method='GET', error_context_msg=error_context_msg) File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/api.py", line 192, in _call_galaxy self._add_auth_token(headers, url, required=auth_required) File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/api.py", line 222, in _add_auth_token headers.update(self.token.headers()) File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/token.py", line 148, in headers token = self.get() File "/usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible/galaxy/token.py", line 140, in get return self.config.get('token', None) AttributeError: 'str' object has no attribute 'get' ```
https://github.com/ansible/ansible/issues/70887
https://github.com/ansible/ansible/pull/70911
932ba3616067007fd5e449611a34e7e3837fc8ae
aa56a2ff6a56697342908cc0cc85a537ecea4325
2020-07-24T21:45:10Z
python
2020-12-21T19:53:00Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,844
["changelogs/fragments/changed_when_group_by.yml", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/changed_when/tasks/main.yml"]
Module 'group_by' report changed even with 'changed_when: false'
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY After upgrade from 2.9.10 to 2.9.11 I noticed the module 'group_by' is reporting 'changed'. This is because this change in #69860 The problem is that it is reporting 'changed' even with `changed_when: false` added to the task. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> group_by ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.9.11 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Ubuntu 18.04 (control and target host) ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> As an example use the task: ``` - group_by: key: "os_{{ ansible_facts['distribution_file_variety'] }}" changed_when: false register: groupby - debug: msg: "{{ groupby }}" ``` ```yaml TASK [group_by_os : group_by] ******************************************************************************************************************************* changed: [srvd-test04] TASK [group_by_os : debug] ********************************************************************************************************************************** ok: [srvd-test04] => msg: add_group: os_Debian changed: true failed: false parent_groups: - all PLAY RECAP ************************************************************************************************************************************************** srvd-test04 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> The task should always return `changed: false` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The task return `changed: true` <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/70844
https://github.com/ansible/ansible/pull/70919
37e9d2278aac698124eb8000cd332c09ba1393d9
f9c3c6cba6f74f9c50c023389bf8f37a8534ada1
2020-07-23T17:44:46Z
python
2020-07-29T14:44:46Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,831
["changelogs/fragments/70831-skip-literal_eval-string-filter-native-jinja.yml", "lib/ansible/config/base.yml", "lib/ansible/template/__init__.py", "lib/ansible/template/native_helpers.py", "test/integration/targets/jinja2_native_types/test_casting.yml", "test/integration/targets/jinja2_native_types/test_dunder.yml"]
keyed_groups with native types recasts integer strings back to integers, errors
##### SUMMARY Example here is AWS account ID, which is clearly an integer-like thing. The keyed_group templating logic will error if it gets a type other than a string... but sometime after Ansible 2.9, it seems that I _can't_ cast it to a string ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/plugins/inventory/__init__.py ##### ANSIBLE VERSION ``` $ 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 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible ansible collection location = /Users/alancoding/.ansible/collections:/usr/share/ansible/collections executable location = /Users/alancoding/.virtualenvs/awx_collection/bin/ansible python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ##### CONFIGURATION Defaults ##### OS / ENVIRONMENT N/A ##### STEPS TO REPRODUCE Inventory file `aws_ec2.yml` ```yaml compose: ec2_account_id: owner_id keyed_groups: - key: ec2_account_id | string parent_group: accounts prefix: '' separator: '' plugin: amazon.aws.aws_ec2 ``` Command: ``` AWS_ACCESS_KEY_ID=<redacted> AWS_SECRET_ACCESS_KEY=<redacted> ANSIBLE_JINJA2_NATIVE=True ansible-inventory -i testing/awx_424_0bzcwopc/aws_ec2.yml --list --export -vvv ``` ##### EXPECTED RESULTS Behavior in 2.9 is that it gives JSON data for the inventory. I think it also needs to be stated that input variables look like this: ``` "ec2_account_id": "123456789", "owner_id": "123456789", ``` ##### ACTUAL RESULTS ``` [WARNING]: * Failed to parse /Users/alancoding/Documents/tower/testing/awx_424_0bzcwopc/aws_ec2.yml with auto plugin: Invalid group name format, expected a string or a list of them or dictionary, got: <class 'int'> File "/Users/alancoding/Documents/repos/ansible/lib/ansible/inventory/manager.py", line 289, in parse_source plugin.parse(self._inventory, self._loader, source, cache=cache) File "/Users/alancoding/Documents/repos/ansible/lib/ansible/plugins/inventory/auto.py", line 58, in parse plugin.parse(inventory, loader, path, cache=cache) File "/Users/alancoding/.ansible/collections/ansible_collections/amazon/aws/plugins/inventory/aws_ec2.py", line 644, in parse self._populate(results, hostnames) File "/Users/alancoding/.ansible/collections/ansible_collections/amazon/aws/plugins/inventory/aws_ec2.py", line 534, in _populate self._add_hosts(hosts=groups[group], group=group, hostnames=hostnames) File "/Users/alancoding/.ansible/collections/ansible_collections/amazon/aws/plugins/inventory/aws_ec2.py", line 569, in _add_hosts self._add_host_to_keyed_groups(self.get_option('keyed_groups'), host, hostname, strict=strict) File "/Users/alancoding/Documents/repos/ansible/lib/ansible/plugins/inventory/__init__.py", line 431, in _add_host_to_keyed_groups raise AnsibleParserError("Invalid group name format, expected a string or a list of them or dictionary, got: %s" % type(key)) ``` No matter what I do, it doesn't seem to use this as a string. Presumably, this may be something that can be reproduced with the constructed inventory plugin by itself, but I have not gotten that far yet. So something is forcing this into an integer, and it wasn't there is 2.9. That's about the extent of what I know at this point.
https://github.com/ansible/ansible/issues/70831
https://github.com/ansible/ansible/pull/70988
7195788ffe8ad63c8d9e36f2bc896c96ddfdaa49
b66d66027ece03f3f0a3fdb5fd6b8213965a2f1d
2020-07-23T03:01:56Z
python
2020-08-11T08:19:49Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,784
["changelogs/fragments/70784-vault-is-string.yml", "lib/ansible/module_utils/common/json.py", "test/units/parsing/test_ajson.py"]
Using ansible-inventory without decrypting no longer working
##### SUMMARY There was an idea that we could call `ansible-inventory` with encrypted variables in `host_vars` and `group_vars`, and have it output the inventory data without decrypting those secrets. This was possible if, and only if, those folders contained YAML with individual values encrypted. It seems that that no longer works. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/cli/inventory.py ##### ANSIBLE VERSION ``` $ 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 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible ansible collection location = /Users/alancoding/.ansible/collections:/usr/share/ansible/collections executable location = /Users/alancoding/.virtualenvs/awx_collection/bin/ansible python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ##### CONFIGURATION defaults ##### OS / ENVIRONMENT N/A ##### STEPS TO REPRODUCE old example: https://github.com/AlanCoding/Ansible-inventory-file-examples/tree/master/vault/single_var_file ``` $ tree vault/single_var_file/ vault/single_var_file/ ├── group_vars │   ├── raleigh │   └── unencrypted └── inventory.ini 1 directory, 3 files ``` ``` $ cat vault/single_var_file/inventory.ini [raleigh] host1 host2 $ cat vault/single_var_file/group_vars/raleigh should_be_artemis_here: !vault | $ANSIBLE_VAULT;1.2;AES256;alan 30386264646430643536336230313232653130643332356531633437363837323430663031356364 3836313935643038306263613631396136663634613066650a303838613532313236663966343433 37636234366130393131616631663831383237653761373533363666303361333662373664336261 6136313463383061330a633835643434616562633238383530356632336664316366376139306135 3534 ``` then run ``` ansible-inventory -i vault/single_var_file/inventory.ini --list --export ``` ##### EXPECTED RESULTS Result with Ansible 2.9 ``` $ ansible-inventory -i vault/single_var_file/inventory.ini --list --export { "_meta": { "hostvars": {} }, "all": { "children": [ "raleigh", "ungrouped" ] }, "raleigh": { "hosts": [ "host1", "host2" ], "vars": { "should_be_artemis_here": { "__ansible_vault": "$ANSIBLE_VAULT;1.2;AES256;alan\n30386264646430643536336230313232653130643332356531633437363837323430663031356364\n3836313935643038306263613631396136663634613066650a303838613532313236663966343433\n37636234366130393131616631663831383237653761373533363666303361333662373664336261\n6136313463383061330a633835643434616562633238383530356632336664316366376139306135\n3534" } } } } ``` ##### ACTUAL RESULTS Result with Ansible devel (just rebased 30 min ago) ``` $ ansible-inventory -i vault/single_var_file/inventory.ini --list --export -vvvvv [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-inventory 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible ansible collection location = /Users/alancoding/.ansible/collections:/usr/share/ansible/collections executable location = /Users/alancoding/.virtualenvs/awx_collection/bin/ansible-inventory python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] No config file found; using defaults setting up inventory plugins host_list declined parsing /Users/alancoding/Documents/repos/ansible-inventory-file-examples/vault/single_var_file/inventory.ini as it did not pass its verify_file() method script declined parsing /Users/alancoding/Documents/repos/ansible-inventory-file-examples/vault/single_var_file/inventory.ini as it did not pass its verify_file() method auto declined parsing /Users/alancoding/Documents/repos/ansible-inventory-file-examples/vault/single_var_file/inventory.ini as it did not pass its verify_file() method yaml declined parsing /Users/alancoding/Documents/repos/ansible-inventory-file-examples/vault/single_var_file/inventory.ini as it did not pass its verify_file() method Parsed /Users/alancoding/Documents/repos/ansible-inventory-file-examples/vault/single_var_file/inventory.ini inventory source with ini plugin ERROR! Attempting to decrypt but no vault secrets found ``` The initial thought was that https://github.com/ansible/ansible/pull/70607 might be the cause, which to be fair, I was warned about. However, a test revert of a9adb754ec3958a0255d1f99d6c54dc274146c50 shows that the error persists. I don't know what else changed which might have caused the change in behavior. We just got our testing back up and running with Ansible `devel`, and this is an issue discovered from that, so all I can say is that something changed post 2.9.
https://github.com/ansible/ansible/issues/70784
https://github.com/ansible/ansible/pull/70786
2a7df5e07b4d6479580803e12e4bd182509fd90e
96b74d3e0b340f1bc6b3102d874f17516fe35e79
2020-07-21T18:30:02Z
python
2020-07-21T21:48:35Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,783
["docs/docsite/ansible_2_10.inv", "docs/docsite/ansible_2_5.inv", "docs/docsite/ansible_2_6.inv", "docs/docsite/ansible_2_7.inv", "docs/docsite/ansible_2_8.inv", "docs/docsite/ansible_2_9.inv", "docs/docsite/python3.inv", "test/lib/ansible_test/_internal/util.py"]
[Docs] [8/8]Update documentation and docsite for Ansible 2.10
Update the documentation and publish the 2.10 version of Ansible documentation. Tasks include: - [x] Remove 2.7 from the version switcher in conf.py in devel, stable-2.10, stable-2.9 and stable-2.8 and [2.9_ja](https://github.com/acozine/ansible/tree/japanese_2.9_to_prod) - see #64109 - [x] Get redirects in place for all old modules to new module-in-collection - https://github.com/ansible-community/antsibull/issues/77 - [x] Review changelogs in stable-2.10 for base and ansible - [x] Backport autogenerated Ansible 2.10 porting guide to stable-2.10 - [x] Update 2.10 porting guide to point to stable-2.10 - [x] Update the Release Status grid on the Release and Maintenance page in devel and stable-2.10 - [x] Backport release Status grid to 2.9 and 2.8. - [x] Update the version suggested for RHEL users in the installation docs, see https://github.com/ansible/ansible/pull/48173 - [x] Backport the updated instructions for backporting to `latest`, see https://github.com/ansible/ansible/pull/56578 <del>Update the “too old” version number that suppresses the publication of “version_added” metadata older than a certain Ansible version, see https://github.com/ansible/ansible/pull/50097 </del> (no longer supported) - [x] <del>Update the versions listed on the docs landing page - see https://github.com/ansible/docsite/pull/8 </del> removed these instead as it repeats the version switcher - https://github.com/ansible/docsite/pull/28 - [x] Update EOL banner on stable-2.7 - [x] Make sure all server-side redirects are updated as necessary - see https://github.com/ansible/docsite/pull/11 - [x] Resolve latest vs 2.10 on docsite - [x] Add skeleton roadmap for 2.11 - [x] <del>Add skeleton porting guide for 2.11</del> - porting guide for Ansible now autogenerated. ansible-base has a skeleton. - [x] republish 2.10 on release day. - [x] post release - update intersphinx links. see #66646 (should be done for ansible-base and Ansible releases) - [x] post release (day or so later) - update sitemap for google. See https://github.com/ansible/docsite/pull/17 - [x] post release reindex swiftype search (after sitemap is in place) Future Releases - remove the release/maintenance page and porting guide pages from the new release when the branch is created and replace with stub page pointing up to the devel versions of these release-independent pages. <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70783
https://github.com/ansible/ansible/pull/71921
4cb20dba9705f3ac986886db1b551db5d5853b44
27826827e9237c5d242012dba98dfe8df2b364a9
2020-07-21T18:20:02Z
python
2020-09-25T15:33:29Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,774
["changelogs/fragments/70792-yum-action-plugin-use-as-alias-of-use-backend.yml", "lib/ansible/plugins/action/yum.py", "test/integration/targets/package/tasks/main.yml"]
error while installing packages in ec2 RHEL instance using yum module
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> I am trying to install a few packages in a fresh installed ec2 instance (Red Hat Image) using both the yum and package module but unable to install the packages as I am encountering the error everytime ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> module used : yum and package both tried Task: Install packages ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.7 config file = /home/chuck/Desktop/Projects/Ansible-Kube/ansible.cfg configured module search path = ['/home/chuck/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml This is how I am connecting to the instance hosts: vars: ansible_python_interpreter: /usr/bin/python2 remote_user: ec2-user connection: ssh become: yes gather_facts: no (python2 installed) and tried installing packages using both package and yum module (in place of package moudle used yum also) name: install packages needed package: name: "{{ item }}" state: present use_backend: yum with_items: - lvm2 - device-mapper - curl - device-mapper-persistent-data - device-mapper-event - device-mapper-libs - device-mapper-event-libs ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> It should install all the neccessary packages ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Unsupported parameters for (dnf) module: use_backend Supported parameters include: allow_downgrade, autoremove, bugfix, conf_file, disable_excludes, disable_gpg_check, disable_plugin, disablerepo, download_dir, download_only, enable_plugin, enablerepo, exclude, install_repoquery, install_weak_deps, installroot, list, lock_timeout, name, releasever, security, skip_broken, state, update_cache, update_only, validate_certs" <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/70774
https://github.com/ansible/ansible/pull/70792
5640093f1ca63fd6af231cc8a7fb7d40e1907b8c
e0558ac1938e7df5e3070d01567ef80bc4046b1e
2020-07-21T07:10:20Z
python
2021-05-31T04:18:15Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,772
["changelogs/fragments/first_found_template_fix.yml", "lib/ansible/executor/task_executor.py", "lib/ansible/plugins/lookup/first_found.py", "test/integration/targets/lookup_first_found/tasks/main.yml", "test/integration/targets/lookup_first_found/vars/ishouldnotbefound.yml", "test/integration/targets/lookup_first_found/vars/itworks.yml"]
with_first_found fails to find a file if an undefined variable is used in the list since ansible 2.9
##### SUMMARY <!--- Explain the problem briefly below --> with_first_found fails "No file was found when using first_found. ..." even if a file matches search conditions, when an undefined variable is used in files parameter. This is started after I've upgraded from ansible 2.8 to 2.9, so I suppose it is a bug. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME first_found ##### ANSIBLE VERSION ```paste below ansible 2.9.10 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/2.9.10/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.4 (default, Jul 14 2020, 02:58:48) [Clang 11.0.3 (clang-1103.0.32.62)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/afunix/.vault ``` ##### OS / ENVIRONMENT Host: macOS 10.15.5 Target: CentOS 7.8 ##### STEPS TO REPRODUCE playbook.yml ```yaml --- - hosts: all roles: - test ``` roles/test/tasks/main.yml ```yaml --- - debug: msg: "path: {{role_path}}/vars" - debug: msg: "file: {{ansible_distribution}}-{{ansible_distribution_major_version}}.yml" - name: Load variables specific for OS family include_vars: "{{item}}" with_first_found: - files: - "{{ansible_lsb.id}}-{{ansible_lsb.major_release}}.yml" - "{{ansible_distribution}}-{{ansible_distribution_major_version}}.yml" paths: - "{{role_path}}/vars" ``` roles/test/vars/CentOS-7.yml ```yaml --- test: test ``` ##### EXPECTED RESULTS ansible-playbook is able to find CentOS-7.yml when running against CentOS 7.8 system, since the file exists. ##### ACTUAL RESULTS ansible-playbook cannot find CentOS-7.yml when running against CentOS 7.8 system. The issue goes away once I remove "{{ansible_lsb.id}}-{{ansible_lsb.major_release}}.yml" from files. Checked ansible -m setup for the host and ansible_lsb is empty. ```paste below $ ansible-playbook -i inventory playbook.yml PLAY [all] ***************************************************************************************************************************************************************************************************** TASK [Gathering Facts] ***************************************************************************************************************************************************************************************** ok: [alice] TASK [test : debug] ******************************************************************************************************************************************************************************************** ok: [alice] => { "msg": "path: /Users/afunix/tmp/ansible-with-first-found/roles/test/vars" } TASK [test : debug] ******************************************************************************************************************************************************************************************** ok: [alice] => { "msg": "file: CentOS-7.yml" } TASK [test : Load variables specific for OS family] ************************************************************************************************************************************************************ fatal: [alice]: FAILED! => {"msg": "No file was found when using first_found. Use errors='ignore' to allow this task to be skipped if no files are found"} PLAY RECAP ***************************************************************************************************************************************************************************************************** alice : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 $ stat /Users/afunix/tmp/ansible-with-first-found/roles/test/vars/CentOS-7.yml 16777220 38020305 -rw-r--r-- 1 afunix staff 0 15 "Jul 20 18:11:55 2020" "Jul 20 18:11:38 2020" "Jul 20 18:11:38 2020" "Jul 20 18:11:38 2020" 4096 8 0 /Users/afunix/tmp/ansible-with-first-found/roles/test/vars/CentOS-7.yml $ ansible -i inventories/production/hosts -m setup alice | grep ansible_lsb "ansible_lsb": {}, ```
https://github.com/ansible/ansible/issues/70772
https://github.com/ansible/ansible/pull/81178
5014a6025ee907e3bc4c534332067ad59b062431
c7eca0e5c0f9b6cd3b8c62a75a9e3c1d3d5063ba
2020-07-20T23:25:53Z
python
2023-07-11T15:48:33Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,740
["docs/docsite/rst/user_guide/playbooks_filters.rst"]
Against the documentation password_hash doesn't depend on passlib in all use cases
##### SUMMARY The [documentation](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#hashing-filters) creates the impression that passlib is necessarily needed for using password_hash. But depending on the used algorithms or OS it also works when only the python crypt module is present. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME playbooks_filters ##### ANSIBLE VERSION ``` ansible 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/myuser/.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.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] ``` ##### CONFIGURATION ``` ``` ##### OS / ENVIRONMENT Linux (Mint 20.04) ##### ADDITIONAL INFORMATION From the documentation: > ... password_hash depends on passlib (https://passlib.readthedocs.io/en/stable/lib/passlib.hash.html). I am using Linux Mint 20.04 and configured my host to use python3. I didn't install passlib and I am able to create user passwords with `password_hash('sha512')`. So against the documentation password_hash doesn't depend on passlib for all algorithms. Could you please describe this in the documentation more detailed?
https://github.com/ansible/ansible/issues/70740
https://github.com/ansible/ansible/pull/74640
ddaa539ab115df10cfc34682049f40b7907b95f3
79e12ba98ef9d329bc416d1ca8a309b9194cf239
2020-07-19T18:10:55Z
python
2021-05-11T15:39:08Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,702
["lib/ansible/plugins/inventory/__init__.py", "test/integration/targets/plugin_config_for_inventory/cache_plugins/none.py", "test/integration/targets/plugin_config_for_inventory/config_with_parameter.yml", "test/integration/targets/plugin_config_for_inventory/runme.sh", "test/integration/targets/plugin_config_for_inventory/test_inventory.py"]
Cannot set inventory cache_timeout to 0
##### SUMMARY Setting `cache_timeout: 0` in an inventory plugin configuration has no effect. The default value is used instead. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `lib/ansible/plugins/inventory/__init__.py` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.10.0b1.post0 config file = /export/home/orion-admin/ansible-boulder/ansible.cfg configured module search path = [u'/export/home/orion-admin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /export/home/orion-admin/ansible/lib/ansible executable location = /export/home/orion-admin/ansible/bin/ansible python version = 2.7.5 (default, Apr 1 2020, 10:09:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` also with ansible 2.9.10 ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_PIPELINING(/export/home/orion-admin/ansible-boulder/ansible.cfg) = True ANSIBLE_SSH_ARGS(/export/home/orion-admin/ansible-boulder/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardX11=no -o ForwardAgent=no DEFAULT_BECOME(/export/home/orion-admin/ansible-boulder/ansible.cfg) = True DEFAULT_CALLBACK_WHITELIST(/export/home/orion-admin/ansible-boulder/ansible.cfg) = [u'profile_tasks'] DEFAULT_FORKS(/export/home/orion-admin/ansible-boulder/ansible.cfg) = 25 DEFAULT_GATHERING(/export/home/orion-admin/ansible-boulder/ansible.cfg) = smart DEFAULT_HOST_LIST(/export/home/orion-admin/ansible-boulder/ansible.cfg) = [u'/export/home/orion-admin/ansible-boulder/inventory'] DEFAULT_INVENTORY_PLUGIN_PATH(/export/home/orion-admin/ansible-boulder/ansible.cfg) = [u'/export/home/orion-admin/ansible-boulder/plugins/inventory'] DEFAULT_JINJA2_EXTENSIONS(/export/home/orion-admin/ansible-boulder/ansible.cfg) = jinja2.ext.do DEFAULT_ROLES_PATH(/export/home/orion-admin/ansible-boulder/ansible.cfg) = [u'/export/home/orion-admin/ansible-boulder/roles'] DEFAULT_TIMEOUT(/export/home/orion-admin/ansible-boulder/ansible.cfg) = 20 INJECT_FACTS_AS_VARS(/export/home/orion-admin/ansible-boulder/ansible.cfg) = True INVENTORY_ENABLED(/export/home/orion-admin/ansible-boulder/ansible.cfg) = [u'cobbler', u'ini'] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> EL 7.8. python 2.7.5 ##### STEPS TO REPRODUCE Use a caching inventory plugin (I'm testing with cobbler - https://github.com/ansible-collections/community.general/pull/627) and set cache_timeout to 0. Observe that it instead uses the default value. ##### EXPECTED RESULTS cache plugin _timeout is set to 0 The issue is the following two code segments: https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/__init__.py#L235 ``` if 'cache' in self._options and self.get_option('cache'): cache_option_keys = [('_uri', 'cache_connection'), ('_timeout', 'cache_timeout'), ('_prefix', 'cache_prefix')] cache_options = dict((opt[0], self.get_option(opt[1])) for opt in cache_option_keys if self.get_option(opt[1])) self._cache = get_cache_plugin(self.get_option('cache_plugin'), **cache_options) ``` and https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/__init__.py#L323 ``` cache_option_keys = [('_uri', 'cache_connection'), ('_timeout', 'cache_timeout'), ('_prefix', 'cache_prefix')] cache_options = dict((opt[0], self.get_option(opt[1])) for opt in cache_option_keys if self.get_option(opt[1])) ``` if `self.get_option(opt[1])` evaluates to `false`, which a value of `0` for `cache_timeout` does, then the option value is not passed on to cache_options.
https://github.com/ansible/ansible/issues/70702
https://github.com/ansible/ansible/pull/70977
a9eb8b04882669bd17cd82780c908863e7504886
3bec27dc34e946f5ea69e1d0651a8a22f7ab88db
2020-07-16T22:35:57Z
python
2020-08-04T16:54:28Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,682
["changelogs/fragments/update-conditionals-bare-vars-default.yml", "lib/ansible/config/base.yml"]
Default for CONDITIONAL_BARE_VARS scheduled for 2.10 swap
##### SUMMARY Default for CONDITIONAL_BARE_VARS scheduled for 2.10 swap https://github.com/ansible/ansible/blob/adcdee9bb0031577698246fcfc51f8af63a56a17/lib/ansible/config/base.yml#L367-L380 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/config/base.yml ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.10 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/70682
https://github.com/ansible/ansible/pull/70709
c1402ddee082814a4fab0187e9db685700602a67
2811d9486fe2777c640c29b7b247d6a1b75dd96e
2020-07-16T14:13:31Z
python
2020-07-20T14:29:31Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,655
["changelogs/fragments/win_async_full_path.yml", "lib/ansible/executor/powershell/async_wrapper.ps1"]
Windows async task fails with "Failed to start async process: 9 (Path not found)"
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> Any async task executed against a certain Windows host fails with "Failed to start async process: 9 (Path not found)". I have debugged this up to the point where I can reproduce this on the host directly as follows: ``` $exec_args2='powershell.exe' Invoke-CimMethod -ClassName Win32_Process -Name Create -Arguments @{CommandLine=$exec_args2} ``` On a normal host that opens a separate powershell window, on the failing Windows hosts that returns: ``` ProcessId ReturnValue PSComputerName --------- ----------- -------------- 9 ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> exec_wrapper.ps1 ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.9 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> NA ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> The failing Windows host is running Windows Server 2012 R2 Standard ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: <IP> gather_facts: no tasks: - win_command: whoami async: 60 poll: 10 ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Command succeeds. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below $ ansible-playbook test.yml -vvvv ansible-playbook 2.9.9 [..] PLAYBOOK: test.yml ******************************************************************************************* Positional arguments: test.yml verbosity: 4 connection: smart timeout: 60 become_method: sudo [..] Pipelining is enabled. <IP> ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO IP EXEC (via pipeline wrapper) The full traceback is: Failed to start async process: 9 (Path not found) At line:91 char:9 + throw "Failed to start async process: $rc ($error_msg)" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (Failed to start...Path not found):String) [], RuntimeException + FullyQualifiedErrorId : Failed to start async process: 9 (Path not found) ScriptStackTrace: at <ScriptBlock>, <No file>: line 91 at <ScriptBlock><End>, <No file>: line 137 at <ScriptBlock>, <No file>: line 7 fatal: [IP]: FAILED! => { "changed": false, "msg": "internal error: failed to run exec_wrapper action async_wrapper: Failed to start async process: 9 (Path not found)" } PLAY RECAP *************************************************************************************************** IP : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` Output of `ansible.log` enabled with `ANSIBLE_EXEC_DEBUG`: ``` 2020-07-15 20:28:34Z - 41324 - host\ansible - exec_wrapper - INFO - starting exec_wrapper 2020-07-15 20:28:35Z - 41324 - host\ansible - exec_wrapper - INFO - converting json raw to a payload 2020-07-15 20:28:35Z - 41324 - host\ansible - exec_wrapper - INFO - running action async_wrapper 2020-07-15 20:28:35Z - 41324 - host\ansible - async_wrapper - INFO - starting async_wrapper 2020-07-15 20:28:35Z - 41324 - host\ansible - async_wrapper - INFO - creating async results path at 'C:\Users\ansible\.ansible_async\230587879002.41324' 2020-07-15 20:28:35Z - 41324 - host\ansible - async_wrapper - INFO - creating named pipe 'ansible-async-230587879002-c139039a-2170-4724-9c64-13f1bca16339' 2020-07-15 20:28:35Z - 41324 - host\ansible - async_wrapper - INFO - creating async process 'powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAgACAAIAAgAHQAcgBhAHAAIAB7AAoAIAAgACAAIAAgACAAIAAgACQAdwByAGEAcABwAGUAcgBfAHAAYQB0AGgAIAA9ACAAIgAkACgAJABlAG4AdgA6AFQARQBNAFAAKQBcAGEAbgBzAGkAYgBsAGUALQBhAHMAeQBuAGMALQB3AHIAYQBwAHAAZQByAC0AZQByAHIAbwByAC0AJAAoAEcAZQB0AC0ARABhAHQAZQAgAC0ARgBvAHIAbQBhAHQAIAAiAHkAeQB5AHkALQBNAE0ALQBkAGQAVABIAEgALQBtAG0ALQBzAHMALgBmAGYAZgBmAFoAIgApAC4AdAB4AHQAIgAKACAAIAAgACAAIAAgACAAIAAkAGUAcgByAG8AcgBfAG0AcwBnACAAPQAgACIARQByAHIAbwByACAAdwBoAGkAbABlACAAcgB1AG4AbgBpAG4AZwAgAHQAaABlACAAYQBzAHkAbgBjACAAZQB4AGUAYwAgAHcAcgBhAHAAcABlAHIAYAByAGAAbgAkACgAJABfACAAfAAgAE8AdQB0AC0AUwB0AHIAaQBuAGcAKQBgAHIAYABuACQAKAAkAF8ALgBTAGMAcgBpAHAAdABTAHQAYQBjAGsAVAByAGEAYwBlACkAIgAKACAAIAAgACAAIAAgACAAIABTAGUAdAAtAEMAbwBuAHQAZQBuAHQAIAAtAFAAYQB0AGgAIAAkAHcAcgBhAHAAcABlAHIAXwBwAGEAdABoACAALQBWAGEAbAB1AGUAIAAkAGUAcgByAG8AcgBfAG0AcwBnAAoAIAAgACAAIAAgACAAIAAgAGIAcgBlAGEAawAKACAAIAAgACAAfQAKACAAIAAgACAAJgBjAGgAYwBwAC4AYwBvAG0AIAA2ADUAMAAwADEAIAA+ACAAJABuAHUAbABsAAoAIAAgACAAIAAkAHAAaQBwAGUAXwBuAGEAbQBlACAAPQAgACIAYQBuAHMAaQBiAGwAZQAtAGEAcwB5AG4AYwAtADIAMwAwADUAOAA3ADgANwA5ADAAMAAyAC0AYwAxADMAOQAwADMAOQBhAC0AMgAxADcAMAAtADQANwAyADQALQA5AGMANgA0AC0AMQAzAGYAMQBiAGMAYQAxADYAMwAzADkAIgAKACAAIAAgACAAJABiAHkAdABlAHMAXwBsAGUAbgBnAHQAaAAgAD0AIAAxADEANAA3ADAANAAKACAAIAAgACAAJABpAG4AcAB1AHQAXwBiAHkAdABlAHMAIAA9ACAATgBlAHcALQBPAGIAagBlAGMAdAAgAC0AVAB5AHAAZQBOAGEAbQBlACAAYgB5AHQAZQBbAF0AIAAtAEEAcgBnAHUAbQBlAG4AdABMAGkAcwB0ACAAJABiAHkAdABlAHMAXwBsAGUAbgBnAHQAaAAKACAAIAAgACAAJABwAGkAcABlACAAPQAgAE4AZQB3AC0ATwBiAGoAZQBjAHQAIAAtAFQAeQBwAGUATgBhAG0AZQAgAFMAeQBzAHQAZQBtAC4ASQBPAC4AUABpAHAAZQBzAC4ATgBhAG0AZQBkAFAAaQBwAGUAQwBsAGkAZQBuAHQAUwB0AHIAZQBhAG0AIAAtAEEAcgBnAHUAbQBlAG4AdABMAGkAcwB0ACAAQAAoAAoAIAAgACAAIAAgACAAIAAgACIALgAiACwAIAAgACMAIABsAG8AYwBhAGwAaABvAHMAdAAKACAAIAAgACAAIAAgACAAIAAkAHAAaQBwAGUAXwBuAGEAbQBlACwACgAgACAAIAAgACAAIAAgACAAWwBTAHkAcwB0AGUAbQAuAEkATwAuAFAAaQBwAGUAcwAuAFAAaQBwAGUARABpAHIAZQBjAHQAaQBvAG4AXQA6ADoASQBuACwACgAgACAAIAAgACAAIAAgACAAWwBTAHkAcwB0AGUAbQAuAEkATwAuAFAAaQBwAGUAcwAuAFAAaQBwAGUATwBwAHQAaQBvAG4AcwBdADoAOgBOAG8AbgBlACwACgAgACAAIAAgACAAIAAgACAAWwBTAHkAcwB0AGUAbQAuAFMAZQBjAHUAcgBpAHQAeQAuAFAAcgBpAG4AYwBpAHAAYQBsAC4AVABvAGsAZQBuAEkAbQBwAGUAcgBzAG8AbgBhAHQAaQBvAG4ATABlAHYAZQBsAF0AOgA6AEEAbgBvAG4AeQBtAG8AdQBzAAoAIAAgACAAIAApAAoAIAAgACAAIAB0AHIAeQAgAHsACgAgACAAIAAgACAAIAAgACAAJABwAGkAcABlAC4AQwBvAG4AbgBlAGMAdAAoACkACgAgACAAIAAgACAAIAAgACAAJABwAGkAcABlAC4AUgBlAGEAZAAoACQAaQBuAHAAdQB0AF8AYgB5AHQAZQBzACwAIAAwACwAIAAkAGIAeQB0AGUAcwBfAGwAZQBuAGcAdABoACkAIAA+ACAAJABuAHUAbABsAAoAIAAgACAAIAB9ACAAZgBpAG4AYQBsAGwAeQAgAHsACgAgACAAIAAgACAAIAAgACAAJABwAGkAcABlAC4AQwBsAG8AcwBlACgAKQAKACAAIAAgACAAfQAKACAAIAAgACAAJABlAHgAZQBjACAAPQAgAFsAUwB5AHMAdABlAG0ALgBUAGUAeAB0AC4ARQBuAGMAbwBkAGkAbgBnAF0AOgA6AFUAVABGADgALgBHAGUAdABTAHQAcgBpAG4AZwAoACQAaQBuAHAAdQB0AF8AYgB5AHQAZQBzACkACgAgACAAIAAgACQAZQB4AGUAYwBfAHAAYQByAHQAcwAgAD0AIAAkAGUAeABlAGMALgBTAHAAbABpAHQAKABAACgAIgBgADAAYAAwAGAAMABgADAAIgApACwAIAAyACwAIABbAFMAdAByAGkAbgBnAFMAcABsAGkAdABPAHAAdABpAG8AbgBzAF0AOgA6AFIAZQBtAG8AdgBlAEUAbQBwAHQAeQBFAG4AdAByAGkAZQBzACkACgAgACAAIAAgAFMAZQB0AC0AVgBhAHIAaQBhAGIAbABlACAALQBOAGEAbQBlACAAagBzAG8AbgBfAHIAYQB3ACAALQBWAGEAbAB1AGUAIAAkAGUAeABlAGMAXwBwAGEAcgB0AHMAWwAxAF0ACgAgACAAIAAgACQAZQB4AGUAYwAgAD0AIABbAFMAYwByAGkAcAB0AEIAbABvAGMAawBdADoAOgBDAHIAZQBhAHQAZQAoACQAZQB4AGUAYwBfAHAAYQByAHQAcwBbADAAXQApAAoAIAAgACAAIAAmACQAZQB4AGUAYwAKAA==' 2020-07-15 20:28:35Z - 41324 - host\ansible - async_wrapper - INFO - return value from async process exec: 9 ``` I tried further debugging this, and all I could find was that this fails (when executed directly on the Windows asset): ``` $exec_args2='powershell.exe' Invoke-CimMethod -ClassName Win32_Process -Name Create -Arguments @{CommandLine=$exec_args2} ``` (Fails with return value '9') But this works: ``` $exec_args2='C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' Invoke-CimMethod -ClassName Win32_Process -Name Create -Arguments @{CommandLine=$exec_args2} ``` (Works, as it opens a new PS window) That seems to suggest a problem with `$Env:path` somewhere, but I dont see any problem with it: ``` $Env:Path C:\Program Files (x86)\Common Files\Oracle\Java\javapath;F:\app\Administrator\product\11.2.0\client_3;C:\Program Files\OpenSSH-Win64;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0\ ``` Also, calling `powershell.exe` directly from that PS shell works: ``` powershell Windows PowerShell Copyright (C) 2014 Microsoft Corporation. All rights reserved. ``` Any pointers would be much appreciated. Thanks!
https://github.com/ansible/ansible/issues/70655
https://github.com/ansible/ansible/pull/70703
9dda393d7036c86e69dd1a4dfbe0f72bf5f9bc5b
154efd97f218b7f50fef8331251acc0dd7565ae7
2020-07-15T15:08:27Z
python
2020-07-17T20:08:29Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,648
["changelogs/fragments/macos-chmod-acl.yml", "docs/docsite/rst/user_guide/become.rst", "lib/ansible/plugins/action/__init__.py", "test/integration/targets/become_unprivileged/aliases", "test/integration/targets/become_unprivileged/chmod_acl_macos/test.yml", "test/integration/targets/become_unprivileged/runme.sh", "test/units/plugins/action/test_action.py"]
Use `chmod` instead of `setfacl` on macOS when becoming an unprivileged user
##### SUMMARY Support become unprivileged user on macOS without `allow_world_readable_tmpfiles=true` ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME action, shell, and copy ##### ADDITIONAL INFORMATION When using become where the login user and the become user are both unprivileged, Ansible attempts to securely change file permissions to only allow the become user to read the files. It uses `setfacl` and falls back to `chown`. Both of these fail on macOS, as there is no `setfacl` command and `chown` is not permitted. macOS actually does provide the same functionality as `setfacl`, using `chmod +a`. The syntax is a bit different from `setfacl`, but it should be able to do what Ansible needs.
https://github.com/ansible/ansible/issues/70648
https://github.com/ansible/ansible/pull/70785
79f7104556b3052e9e2d0c095ec2e4e0b1e61a92
0d7c144ce44cd40ffa7c109a027d0927961d6a63
2020-07-14T21:01:19Z
python
2020-08-04T18:32:48Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,640
["changelogs/fragments/70640-find-empty-excludes.yml", "lib/ansible/modules/find.py", "test/integration/targets/find/tasks/main.yml"]
find: explicit empty excludes causes find to exclude everything
##### SUMMARY When using `find` with empty `excludes` list, it excludes **everything**, yet if you remove that empty `excludes` entirely, the `find` behaves correctly (nothing is excluded). ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME find ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below $ ansible --version ansible 2.9.9 config file = None configured module search path = [u'/home/jmazzite/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /home/jmazzite/source/ansible/lib/ansible executable location = /home/jmazzite/source/ansible/bin/ansible python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> RHEL 7.7 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run `find` task with `excludes: [ ]` and see that the results come back empty - everything is excluded. But if you remove that `excludes: [ ]` then find results come back correctly. <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: localhost connection: local tasks: - find: paths: "/etc" patterns: ['hosts', 'passwd'] excludes: [] register: test - debug: msg: "number of files found-->{{ test.files | length }}" - debug: msg: "found-->{{ item.path }}" loop: "{{ test.files }}" ``` Run that playbook via `ansible-playbook playbook.yaml` and see the results of find is empty - 0 files are returned: ``` TASK [debug] ***************************************************************************************************************************** ok: [localhost] => { "msg": "number of files found-->0" } ``` Now edit that playbook and completely delete the `excludes: [ ]` line and re-run it. Now see it returns the correct two files: ``` TASK [debug] ***************************************************************************************************************************** ok: [localhost] => { "msg": "number of files found-->2" } TASK [debug] ***************************************************************************************************************************** ok: [localhost] => (item=...chomp...) => { "msg": "found-->/etc/hosts" } ok: [localhost] => (item=...chomp...) => { "msg": "found-->/etc/passwd" } ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS I expect an empty `excludes` list to behave identically as when `excludes` list is completely not specified. An empty excludes list should mean, "I do not want to exclude anything". ##### ACTUAL RESULTS All files are excluded if I specify an empty list in `excludes` but this is wrong - that should definitely not mean "I want to exclude EVERYTHING".
https://github.com/ansible/ansible/issues/70640
https://github.com/ansible/ansible/pull/70710
566c5e6ce1d755ad99282c3c0509e73e701025d1
f90aa5599fd15743d90f261c88dbaaa21b0384d7
2020-07-14T16:54:43Z
python
2020-07-17T21:34:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,638
["docs/docsite/rst/reference_appendices/faq.rst"]
Docs incorrect on "How can I set the PATH" for an entire playbook
From https://docs.ansible.com/ansible/latest/reference_appendices/faq.html: > How can I set the PATH or any other environment variable for a task **or entire playbook**? This wording is wrong. There is no way, from the examples provided using `environment`, to set variables for the duration of a playbook. Only for plays. ``` - name: first hosts: localhost environment: PATH: "/foo:{{ ansible_env.PATH }}" - name: stuff hosts: localhost tasks: - name: foo shell: echo "{{ ansible_env.PATH }}" register: pth - name: bar debug: msg: "{{ pth.stdout }}" ``` Will not prepend foo to path for the second play.
https://github.com/ansible/ansible/issues/70638
https://github.com/ansible/ansible/pull/70712
92e16c2838182f58f2cedf25ca19273159d2246d
59513ae673a52675ca8f8f47e85af21b905566fd
2020-07-14T15:11:09Z
python
2020-07-20T18:45:40Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,612
["docs/docsite/rst/dev_guide/debugging.rst", "docs/docsite/rst/dev_guide/developing_modules_general.rst", "docs/docsite/rst/dev_guide/index.rst", "docs/docsite/rst/dev_guide/testing_running_locally.rst"]
some part https://docs.ansible.com/ansible/latest/dev_guide/debugging.html seems obsolete
##### SUMMARY The section "Debugging Remote" https://docs.ansible.com/ansible/latest/dev_guide/debugging.html#debugging-remote does not apply with current version , there is no `__main__.py` file. It seems it can be removed. Even the section "Debugging ansiblemodule based modules" https://docs.ansible.com/ansible/latest/dev_guide/debugging.html#debugging-ansiblemodule-based-modules needs some update because the file in `tmp` is `AnsiballZ_$modulename.py` and the list of files present once command `explode` done is slightly different, I wanted to make a PR but I not sure the explanation are still accurate. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME debub ##### ANSIBLE VERSION ```paste below ansible 2.10 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT n/a ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70612
https://github.com/ansible/ansible/pull/70847
a24f51d9e5348f96450d366ece3300074a062800
7f0c84ea15301f21ba9d20066bac2d34bbc03703
2020-07-13T21:11:41Z
python
2020-07-29T16:14:49Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,598
["lib/ansible/executor/task_executor.py", "test/integration/targets/var_templating/runme.sh", "test/integration/targets/var_templating/test_connection_vars.yml", "test/integration/targets/var_templating/vars/connection.yml"]
Hash variables fail to be loaded with include_vars in a role after a group_by
##### SUMMARY When ```include_vars``` is used in a role after a ```group_by```, complex variables fail to load whereas simple ones can be loaded. This issue happens: - only with 2.9.10 - not with previous ansible releases - on Debian bullseye - on Ubuntu 20.04 - ... ##### ISSUE TYPE - Bug report ##### COMPONENT NAME include_vars ##### ANSIBLE VERSION ``` ansible 2.9.10 config file = /etc/ansible/ansible.cfg ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.4rc1 (default, Jul 1 2020, 15:31:45) [GCC 9.3.0] ``` ##### CONFIGURATION ``` ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True CACHE_PLUGIN(/etc/ansible/ansible.cfg) = redis CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 3600 DEFAULT_EXECUTABLE(/etc/ansible/ansible.cfg) = /bin/bash DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 1000 DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 30 DEFAULT_HASH_BEHAVIOUR(/etc/ansible/ansible.cfg) = merge DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts'] DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log DEFAULT_PRIVATE_ROLE_VARS(/etc/ansible/ansible.cfg) = False DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 180 DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh ENABLE_TASK_DEBUGGER(/etc/ansible/ansible.cfg) = True INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3 PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599 PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 200 PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600 RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True ``` ##### OS / ENVIRONMENT ``` controller host: Debian bullseye ``` ##### STEPS TO REPRODUCE ```playbook: include_vars issue.yml``` ``` --- - name: Classifying all hosts hosts: all gather_facts: False tasks: - set_fact: os_family: os - set_fact: os_version: version - name: Classifying all hosts depending on their OS & release include_role: name: os_classify_issue ``` ```roles/os_classify_issue/tasks/main.yml``` ``` --- - name: Classifying the network host depending on its OS & release & loading the corresponding group variables group_by: key: "{{ os_family }}_{{ os_version }}" - name: Including ansible connection variables block: - include_vars: "{{ role_path }}/vars/all/ssh/ansible_connections.with.private_key_file.yml" when: connections.ssh.private_key_file is defined - include_vars: "{{ role_path }}/vars/all/ssh/ansible_connections.wo.private_key_file.yml" when: connections.ssh.private_key_file is not defined - debug: msg: - "ansible_network_os: {{ ansible_network_os }}" - "connections.ssh.become_method: {{ connections.ssh.become_method }}" - "ansible_become_method: {{ ansible_become_method }}" ``` ```group_vars/os_version/connections.yml``` ``` --- ansible_network_os: ios connections: ssh: become: yes become_method: 'enable' private_key_file: "~/.ssh/id_rsa_4096" ``` ```roles/os_classify_issue/vars/all/ssh/ansible_connections.with.private_key_file.yml``` ``` --- ansible_become: "{{ connections.ssh.become }}" ansible_become_method: "{{ connections.ssh.become_method }}" ``` ##### ACTUAL RESULTS with ansible 2.9.9: No issue ``` PLAYBOOK: include_vars issue.yml ***************************************************************************************************************************** Positional arguments: issues/include_vars issue.yml verbosity: 4 connection: ssh timeout: 180 become_method: sudo tags: ('all',) inventory: ('hosts',) subset: localhost forks: 1000 1 plays in issues/include_vars issue.yml PLAY [Classifying all hosts] ********************************************************************************************************************************* META: ran handlers TASK [set_fact] ********************************************************************************************************************************************** task path: issues/include_vars issue.yml:6 ok: [localhost] => { "ansible_facts": { "os_family": "os" }, "changed": false } TASK [set_fact] ********************************************************************************************************************************************** task path: issues/include_vars issue.yml:8 ok: [localhost] => { "ansible_facts": { "os_version": "version" }, "changed": false } TASK [Classifying all hosts depending on their OS & release] ************************************************************************************************* task path: issues/include_vars issue.yml:11 TASK [os_classify_issue : Classifying the network host depending on its OS & release & loading the corresponding group variables] **************************** task path: os_classify_issue/tasks/main.yml:2 ok: [localhost] => { "add_group": "os_version", "changed": false, "parent_groups": [ "all" ] } TASK [os_classify_issue : include_vars] ********************************************************************************************************************** task path: os_classify_issue/tasks/main.yml:8 ok: [localhost] => { "ansible_facts": { "ansible_become": "{{ connections.ssh.become }}", "ansible_become_method": "{{ connections.ssh.become_method }}" }, "ansible_included_var_files": [ "os_classify_issue/vars/all/ssh/ansible_connections.with.private_key_file.yml" ], "changed": false } TASK [os_classify_issue : include_vars] ********************************************************************************************************************** task path: os_classify_issue/tasks/main.yml:11 skipping: [localhost] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [os_classify_issue : debug] ***************************************************************************************************************************** task path: os_classify_issue/tasks/main.yml:14 ok: [localhost] => { "msg": [ "ansible_network_os: ios", "connections.ssh.become_method: enable", "ansible_become_method: enable" ] } META: ran handlers META: ran handlers PLAY RECAP *************************************************************************************************************************************************** localhost : ok=5 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 ``` ##### ACTUAL RESULTS with ansible 2.9.10: issue **The included hash is not interpreted correctly**: "Invalid become method specified, could not find matching plugin: '{{ connections.ssh.become_method }}' ``` # pip3 uninstall ansible Found existing installation: ansible 2.9.9 Uninstalling ansible-2.9.9: Would remove: /usr/local/bin/ansible /usr/local/bin/ansible-config /usr/local/bin/ansible-connection /usr/local/bin/ansible-console /usr/local/bin/ansible-doc /usr/local/bin/ansible-galaxy /usr/local/bin/ansible-inventory /usr/local/bin/ansible-playbook /usr/local/bin/ansible-pull /usr/local/bin/ansible-test /usr/local/bin/ansible-vault /usr/local/lib/python3.8/dist-packages/ansible-2.9.9.dist-info/* /usr/local/lib/python3.8/dist-packages/ansible/* /usr/local/lib/python3.8/dist-packages/ansible_test/* Proceed (y/n)? y Successfully uninstalled ansible-2.9.9 # pip3 install ansible==2.9.10 Collecting ansible==2.9.10 Downloading ansible-2.9.10.tar.gz (14.2 MB) |████████████████████████████████| 14.2 MB 4.6 MB/s Requirement already satisfied: jinja2 in /usr/local/lib/python3.8/dist-packages (from ansible==2.9.10) (2.11.2) Requirement already satisfied: PyYAML in /usr/local/lib/python3.8/dist-packages (from ansible==2.9.10) (5.3.1) Requirement already satisfied: cryptography in /usr/local/lib/python3.8/dist-packages (from ansible==2.9.10) (2.9.2) Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.8/dist-packages (from jinja2->ansible==2.9.10) (1.1.1) Requirement already satisfied: six>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from cryptography->ansible==2.9.10) (1.15.0) Requirement already satisfied: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.8/dist-packages (from cryptography->ansible==2.9.10) (1.14.0) Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi!=1.11.3,>=1.8->cryptography->ansible==2.9.10) (2.20) Building wheels for collected packages: ansible Building wheel for ansible (setup.py) ... done Created wheel for ansible: filename=ansible-2.9.10-py3-none-any.whl size=16174944 sha256=d99a55988aebfdb16f3dc2ba342b4d9131f627bd080519c039ae565b8b87aaab Stored in directory: /root/.cache/pip/wheels/f0/02/9e/e40841e0c3ab60142092320d6cbe45c699a965e6224dbd1258 Successfully built ansible Installing collected packages: ansible Successfully installed ansible-2.9.10 ``` ``` PLAYBOOK: include_vars issue.yml ***************************************************************************************************************************** Positional arguments: issues/include_vars issue.yml verbosity: 4 connection: ssh timeout: 180 become_method: sudo tags: ('all',) inventory: ('hosts',) subset: localhost forks: 1000 1 plays in issues/include_vars issue.yml PLAY [Classifying all hosts] ********************************************************************************************************************************* META: ran handlers TASK [set_fact] ********************************************************************************************************************************************** task path: issues/include_vars issue.yml:6 ok: [localhost] => { "ansible_facts": { "os_family": "os" }, "changed": false } TASK [set_fact] ********************************************************************************************************************************************** task path: issues/include_vars issue.yml:8 ok: [localhost] => { "ansible_facts": { "os_version": "version" }, "changed": false } TASK [Classifying all hosts depending on their OS & release] ************************************************************************************************* task path: issues/include_vars issue.yml:11 TASK [os_classify_issue : Classifying the network host depending on its OS & release & loading the corresponding group variables] **************************** task path: os_classify_issue/tasks/main.yml:2 ok: [localhost] => { "add_group": "os_version", "changed": false, "parent_groups": [ "all" ] } TASK [os_classify_issue : include_vars] ********************************************************************************************************************** task path: os_classify_issue/tasks/main.yml:8 ok: [localhost] => { "ansible_facts": { "ansible_become": "{{ connections.ssh.become }}", "ansible_become_method": "{{ connections.ssh.become_method }}" }, "ansible_included_var_files": [ "os_classify_issue/vars/all/ssh/ansible_connections.with.private_key_file.yml" ], "chan"Invalid become method specified, could not find matching plugin: '{{ connections.ssh.become_method }}'ged": false } TASK [os_classify_issue : include_vars] ********************************************************************************************************************** task path: os_classify_issue/tasks/main.yml:11 skipping: [localhost] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [os_classify_issue : debug] ***************************************************************************************************************************** task path: os_classify_issue/tasks/main.yml:14 fatal: [localhost]: FAILED! => { "msg": "Invalid become method specified, could not find matching plugin: '{{ connections.ssh.become_method }}'. Use `ansible-doc -t become -l` to list available plugins." } ```
https://github.com/ansible/ansible/issues/70598
https://github.com/ansible/ansible/pull/70657
055871cbb89739039b18bd670af4d07f32ef80c0
8c213c93345db5489c24458880ec3ff81b334dbd
2020-07-13T13:59:40Z
python
2020-07-16T15:21:39Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,583
["changelogs/fragments/70583_datetime_date_in_module_result.yml", "lib/ansible/module_utils/basic.py", "test/integration/targets/module_utils/library/test_datetime.py", "test/integration/targets/module_utils/module_utils_test.yml", "test/units/module_utils/basic/test_exit_json.py"]
datetime.date not supported in module output: TypeError: Value of unknown type: <class 'datetime.date'>
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY My self written module output includes a datetime.date object. This results in a type error here: https://github.com/ansible/ansible/blob/adcdee9bb0031577698246fcfc51f8af63a56a17/lib/ansible/module_utils/basic.py#L397 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/module_utils/basic.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.6 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> python3 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> library/my_test.py ```python from ansible.module_utils.basic import AnsibleModule import datetime if __name__ == '__main__': module = AnsibleModule(argument_spec=dict()) module.exit_json(result={'test_date': datetime.datetime.now().date()}) ``` <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: test hosts: all tasks: - my_test: register: out ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS Running through without an error ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The module fails with an exception <!--- Paste verbatim command output between quotes --> ```paste below $ ansible-playbook -i localhost, -c local test.yml PLAY [test] ************************************************************************************************************ TASK [Gathering Facts] ************************************************************************************************* ok: [localhost] TASK [my_test] ********************************************************************************************************* An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: Value of unknown type: <class 'datetime.date'>, 2020-07-12 fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/jdrummer/.ansible/tmp/ansible-tmp-1594559282.5458276-140886794481795/AnsiballZ_my_test.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/jdrummer/.ansible/tmp/ansible-tmp-1594559282.5458276-140886794481795/AnsiballZ_my_test.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/jdrummer/.ansible/tmp/ansible-tmp-1594559282.5458276-140886794481795/AnsiballZ_my_test.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.my_test', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib/python3.8/runpy.py\", line 206, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.8/runpy.py\", line 96, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.8/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_my_test_payload_eacypa5q/ansible_my_test_payload.zip/ansible/modules/my_test.py\", line 6, in <module>\n File \"/tmp/ansible_my_test_payload_eacypa5q/ansible_my_test_payload.zip/ansible/module_utils/basic.py\", line 2071, in exit_json\n File \"/tmp/ansible_my_test_payload_eacypa5q/ansible_my_test_payload.zip/ansible/module_utils/basic.py\", line 2064, in _return_formatted\n File \"/tmp/ansible_my_test_payload_eacypa5q/ansible_my_test_payload.zip/ansible/module_utils/basic.py\", line 418, in remove_values\n File \"/tmp/ansible_my_test_payload_eacypa5q/ansible_my_test_payload.zip/ansible/module_utils/basic.py\", line 401, in _remove_values_conditions\nTypeError: Value of unknown type: <class 'datetime.date'>, 2020-07-12\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} PLAY RECAP ************************************************************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/70583
https://github.com/ansible/ansible/pull/70595
40591d5fbbe9878427fc5b1b46ec820f69feba1a
0690b68bd35dcef89d5064e144639cd8c2915357
2020-07-12T13:09:20Z
python
2020-07-14T15:42:40Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,582
["changelogs/fragments/72511-always-prepend-role-to-task-name.yml", "lib/ansible/playbook/task.py", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/roles/common_handlers/handlers/main.yml", "test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/roles/test_fqcn_handlers/tasks/main.yml"]
Cannot notify handler via role_name : handler_name, when the handler name also contains the role name
https://github.com/ansible/ansible/blob/adcdee9bb0031577698246fcfc51f8af63a56a17/lib/ansible/playbook/task.py#L124 ##### SUMMARY Handlers can not be referenced with the `FQCN : handler name` notation if the handler name contains the role name. Not sure what the reasoning is behind this, but a `httpd` role can't have a `restart httpd` handler name if you want to notify it with `notify: 'httpd : restart httpd'` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME task handler fqcn ##### ANSIBLE VERSION ``` ansible 2.9.10 config file = /home/twouters/.ansible.cfg configured module search path = ['/home/twouters/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible python version = 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0] ``` ##### CONFIGURATION Default configuration ##### OS / ENVIRONMENT All (N/A) ##### STEPS TO REPRODUCE ``` ➜ issues-70582 $ find ./ ./ ./roles ./roles/test ./roles/test/handlers ./roles/test/handlers/main.yml ./roles/test/tasks ./roles/test/tasks/main.yml ./pb.yml ``` `pb.yml` ```yaml --- - hosts: localhost roles: - test ``` `roles/test/tasks/main.yml` ```yaml --- - name: always trigger handler command: /bin/true changed_when: True notify: - 'test : handler 1' - name: always trigger handler 2 command: /bin/true changed_when: True notify: - 'test : handler 2 test' ``` `roles/test/handlers/main.yml` ```yaml --- - name: handler 1 debug: msg: this is handler 1 - name: handler 2 test debug: msg: this handler is not found ``` ##### EXPECTED RESULTS Two handlers are detected. ##### ACTUAL RESULTS Only the handler that doesn't contain the role name in its name gets detected ``` ➜ issues-70582 $ ansible-playbook pb.yml [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] *********************************************************************************************** TASK [Gathering Facts] ***************************************************************************************** ok: [localhost] TASK [test : always trigger handler] *************************************************************************** changed: [localhost] TASK [test : always trigger handler 2] ************************************************************************* ERROR! The requested handler 'test : handler 2 test' was not found in either the main handlers list nor in the listening handlers list ```
https://github.com/ansible/ansible/issues/70582
https://github.com/ansible/ansible/pull/72511
c8590c7482dcfc40f7054f629b7b6179f9e38daf
0ed7bfc694e5e2efe49fa0e1c8fea0a392c78c04
2020-07-12T08:58:13Z
python
2020-11-06T16:46:58Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,546
["changelogs/fragments/varnames-error-grammar.yml", "lib/ansible/plugins/lookup/varnames.py", "test/integration/targets/lookup_varnames/aliases", "test/integration/targets/lookup_varnames/tasks/main.yml"]
Add integration tests for the varnames lookup plugin
##### SUMMARY Add integration tests for the varnames lookup plugin. ##### ISSUE TYPE Feature Idea ##### COMPONENT NAME varnames lookup plugin
https://github.com/ansible/ansible/issues/70546
https://github.com/ansible/ansible/pull/70573
df45dcdae02e24122428cfc70b9f4f987672e0bb
d5480572c8099f81ce93da05ed407bd0d4972c81
2020-07-09T19:10:02Z
python
2020-07-11T02:04:02Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,545
["changelogs/fragments/csvfile-parse_kv.yml", "lib/ansible/plugins/lookup/csvfile.py", "test/integration/targets/lookup_csvfile/aliases", "test/integration/targets/lookup_csvfile/files/cool list of things.csv", "test/integration/targets/lookup_csvfile/files/crlf.csv", "test/integration/targets/lookup_csvfile/files/people.csv", "test/integration/targets/lookup_csvfile/files/tabs.csv", "test/integration/targets/lookup_csvfile/files/x1a.csv", "test/integration/targets/lookup_csvfile/tasks/main.yml", "test/sanity/ignore.txt"]
Add integration tests for the csvfile lookup plugin
##### SUMMARY Add integration tests for the csvfile lookup plugin. ##### ISSUE TYPE Feature Idea ##### COMPONENT NAME csvfile lookup plugin
https://github.com/ansible/ansible/issues/70545
https://github.com/ansible/ansible/pull/70550
f4c89eab23f2d595b64562aa69880d967a9a2559
1b4fd23ba6dab52a395278e3ef7ca994e0819d60
2020-07-09T19:09:07Z
python
2020-07-10T21:21:03Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,544
["docs/docsite/rst/dev_guide/shared_snippets/licensing.txt"]
Update licensing info
### SUMMARY Document applicable licensing requirements (that we know now) in the documentation displayed on https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_in_groups.html#developing-modules-in-groups and other pages. Known details: - Existing license requirements still apply to content in ansible/ansible (ansible-base). - Content that was previously in ansible/ansible and has moved to a collection must retain the license it had in ansible/ansible. Other licensing guidelines may be developed in future. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION 2.10 ##### CONFIGURATION N/A ##### OS / ENVIRONMENT N/A
https://github.com/ansible/ansible/issues/70544
https://github.com/ansible/ansible/pull/78162
d635b871d18301c19309fdb667eff35b6b28ab47
6ddccc1604173cfbd56f3abe6aa4d8868d21b82a
2020-07-09T18:53:56Z
python
2022-07-13T20:45:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,535
["lib/ansible/module_utils/basic.py", "lib/ansible/modules/get_url.py", "test/integration/targets/unsafe_writes/aliases", "test/integration/targets/unsafe_writes/basic.yml", "test/integration/targets/unsafe_writes/runme.sh", "test/units/module_utils/basic/test_atomic_move.py"]
Copy fails on Proxmox VE's CFS filesystem and unsafe_writes does not work
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> I cannot seem to be able to copy a file into the `/etc/pve/` directory of a Proxmox VE server. This is a FUSE filesystem implemented in `/usr/bin/pmxcfs` Proxmox Cluster File System aka. CFS. CFS has a peculiarity in that it does not allow the `chmod` system call, returning Errno 1: Operation not permitted. The problem is that I cannod find a way to prevent `copy` from issuing a chmod on the target file (even if I set `mode: preserve`) nor make it use a direct write (even if I set `unsafe_writes: yes`), instead it always terminates the task with an "Operation not permitted" error. I think if `unsafe_writes` had a "force" value, this would be a non-issue. Maybe https://github.com/ansible/ansible/issues/24449 could be reopened? ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `copy` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/tobia/.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.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> (none) ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Target OS is Proxmox PVE 6.1, based on Debian 10 Buster. The package pve-cluster which contains the CFS filesystem implementation is at version 6.1-8, but Ansible has always had this issue with all versions of CFS. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Try to create a file in the CFS filesystem: <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: HOSTNAME_REDACTED become: true tasks: - name: Test file in CFS filesystem copy: dest: /etc/pve/local/test content: Hello. unsafe_writes: yes ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> With `unsafe_writes` enabled, I would expect the test file to be created, because both Bash and Vim can do it with no trouble: ``` # echo World > /etc/pve/local/test ``` and ``` # vim /etc/pve/local/test ``` both work. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> For some reason, `copy` does not even try to perform a direct write. It always goes to the `shutil.copy2()` route, which will invariably fail on the `os.chmod()` call. <!--- Paste verbatim command output between quotes --> ```paste below TASK [Test file in CFS filesystem] ****************************************************************************************************************************************** task path: /home/tobia/proj/ansible/test.yaml:4 <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b IP_REDACTED '/bin/sh -c '"'"'echo ~ && sleep 0'"'"'' <IP_REDACTED> (0, b'/home/tobia\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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') <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b IP_REDACTED '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510 `" && echo ansible-tmp-1594285570.2494516-168830778907510="` echo /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510 `" ) && sleep 0'"'"'' <IP_REDACTED> (0, b'ansible-tmp-1594285570.2494516-168830778907510=/home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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/lib/python3/dist-packages/ansible/modules/files/stat.py <IP_REDACTED> PUT /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpxsjb4aw6 TO /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_stat.py <IP_REDACTED> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b '[IP_REDACTED]' <IP_REDACTED> (0, b'sftp> put /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpxsjb4aw6 /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_stat.py\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/tobia size 0\r\ndebug3: Looking up /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpxsjb4aw6\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/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_stat.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:10345\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 10345 bytes at 98304\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') <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b IP_REDACTED '/bin/sh -c '"'"'chmod u+x /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/ /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_stat.py && sleep 0'"'"'' <IP_REDACTED> (0, b'', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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') <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b -tt IP_REDACTED '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bcosprpmvlvgctstkbcyztnsdploapgs ; /usr/bin/python /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_stat.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded <IP_REDACTED> (0, b'\r\n{"invocation": {"module_args": {"checksum_algorithm": "sha1", "get_checksum": true, "follow": false, "path": "/etc/pve/local/test", "get_md5": false, "get_mime": true, "get_attributes": true}}, "stat": {"exists": false}, "changed": false}\r\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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 IP_REDACTED closed.\r\n') <IP_REDACTED> PUT /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpw3tfcrhr TO /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source <IP_REDACTED> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b '[IP_REDACTED]' <IP_REDACTED> (0, b'sftp> put /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpw3tfcrhr /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/tobia size 0\r\ndebug3: Looking up /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpw3tfcrhr\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/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:6\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 6 bytes at 0\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') <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b IP_REDACTED '/bin/sh -c '"'"'chmod u+x /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/ /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source && sleep 0'"'"'' <IP_REDACTED> (0, b'', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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/lib/python3/dist-packages/ansible/modules/files/copy.py <IP_REDACTED> PUT /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpn5cste59 TO /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_copy.py <IP_REDACTED> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b '[IP_REDACTED]' <IP_REDACTED> (0, b'sftp> put /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpn5cste59 /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_copy.py\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/tobia size 0\r\ndebug3: Looking up /home/tobia/.ansible/tmp/ansible-local-979549tzjkfng1/tmpn5cste59\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/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_copy.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:14834\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 14834 bytes at 98304\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') <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b IP_REDACTED '/bin/sh -c '"'"'chmod u+x /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/ /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_copy.py && sleep 0'"'"'' <IP_REDACTED> (0, b'', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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') <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b -tt IP_REDACTED '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-nfbvibtaerdhzqnygptsdnqyifxvplid ; /usr/bin/python /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/AnsiballZ_copy.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded <IP_REDACTED> (1, b'\r\n{"msg": "Failed to replace file: /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source to /etc/pve/local/test: [Errno 1] Operation not permitted: \'/etc/pve/local/.ansible_tmp7FFX7ytest\'", "failed": true, "exception": "Traceback (most recent call last):\\n File \\"/tmp/ansible_copy_payload_xkp36J/ansible_copy_payload.zip/ansible/module_utils/basic.py\\", line 2299, in atomic_move\\n shutil.copy2(b_src, b_tmp_dest_name)\\n File \\"/usr/lib/python2.7/shutil.py\\", line 154, in copy2\\n copystat(src, dst)\\n File \\"/usr/lib/python2.7/shutil.py\\", line 120, in copystat\\n os.chmod(dst, mode)\\nOSError: [Errno 1] Operation not permitted: \'/etc/pve/local/.ansible_tmp7FFX7ytest\'\\n", "invocation": {"module_args": {"directory_mode": null, "force": true, "remote_src": null, "_original_basename": "tmpw3tfcrhr", "owner": null, "follow": false, "local_follow": null, "group": null, "unsafe_writes": true, "setype": null, "content": null, "serole": null, "dest": "/etc/pve/local/test", "selevel": null, "regexp": null, "validate": null, "src": "/home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source", "checksum": "9b56d519ccd9e1e5b2a725e186184cdc68de0731", "seuser": null, "delimiter": null, "mode": null, "attributes": null, "backup": false}}}\r\n', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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 IP_REDACTED closed.\r\n') <IP_REDACTED> Failed to connect to the host via ssh: OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020 debug1: Reading configuration data /home/tobia/.ssh/config debug1: /home/tobia/.ssh/config line 1: Applying options for * 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 IP_REDACTED 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 = 979558 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 IP_REDACTED closed. <IP_REDACTED> ESTABLISH SSH CONNECTION FOR USER: None <IP_REDACTED> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/tobia/.ansible/cp/0b6228f93b IP_REDACTED '/bin/sh -c '"'"'rm -f -r /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/ > /dev/null 2>&1 && sleep 0'"'"'' <IP_REDACTED> (0, b'', b'OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/tobia/.ssh/config\r\ndebug1: /home/tobia/.ssh/config line 1: Applying options for *\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 IP_REDACTED 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 = 979558\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_copy_payload_xkp36J/ansible_copy_payload.zip/ansible/module_utils/basic.py", line 2299, in atomic_move shutil.copy2(b_src, b_tmp_dest_name) File "/usr/lib/python2.7/shutil.py", line 154, in copy2 copystat(src, dst) File "/usr/lib/python2.7/shutil.py", line 120, in copystat os.chmod(dst, mode) OSError: [Errno 1] Operation not permitted: '/etc/pve/local/.ansible_tmp7FFX7ytest' fatal: [HOSTNAME_REDACTED]: FAILED! => { "changed": false, "checksum": "9b56d519ccd9e1e5b2a725e186184cdc68de0731", "diff": [], "invocation": { "module_args": { "_original_basename": "tmpw3tfcrhr", "attributes": null, "backup": false, "checksum": "9b56d519ccd9e1e5b2a725e186184cdc68de0731", "content": null, "delimiter": null, "dest": "/etc/pve/local/test", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source", "unsafe_writes": true, "validate": null } }, "msg": "Failed to replace file: /home/tobia/.ansible/tmp/ansible-tmp-1594285570.2494516-168830778907510/source to /etc/pve/local/test: [Errno 1] Operation not permitted: '/etc/pve/local/.ansible_tmp7FFX7ytest'" } ```
https://github.com/ansible/ansible/issues/70535
https://github.com/ansible/ansible/pull/70722
202689b1c0560b68a93e93d0a250ea186a8e3e1a
932ba3616067007fd5e449611a34e7e3837fc8ae
2020-07-09T09:10:49Z
python
2020-12-21T16:20:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,476
["changelogs/fragments/70484-bool-ansible-become.yaml", "lib/ansible/executor/task_executor.py", "test/integration/targets/inventory_ini/aliases", "test/integration/targets/inventory_ini/inventory.ini", "test/integration/targets/inventory_ini/runme.sh", "test/integration/targets/inventory_ini/test_ansible_become.yml"]
ansible_become option set in ini inventory file is not correctly used
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> On Ansible 2.9.10, setting `ansible_become` to any non-empty string in an `ini`-formatted inventory file causes the `become` plugin to be loaded and used, whereas Ansible 2.9.9 (and below) skipped the `become` plugin load if `ansible_become` was equal to "no" or "false". ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> Task executor (`lib/ansible/executor/task_executor.py`). ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.10 config file = None configured module search path = ['/home/kylian/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/kylian/.local/lib/python3.8/site-packages/ansible executable location = /home/kylian/.local/bin/ansible python version = 3.8.0 (default, Oct 28 2019, 16:14:01) [GCC 8.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below (empty output) ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Tested on Ubuntu 18.04 (`Linux kylian-ubuntu 5.3.0-1028-azure #29~18.04.1-Ubuntu SMP Fri Jun 5 14:32:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux`), but probably affects all OS. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> `test_playbook.yml` ```yaml - hosts: all tasks: - debug: msg: "Message" ``` `inventory` ```ini [windows] win1 ansible_host=x.x.x.x ansible_become=no ansible_connection=winrm ansible_user=<user> ansible_password=<pwd> ``` `win1` is a Windows host. I'm using a Windows host as target as the results are easily visible (loading the default `become` plugin, `sudo`, results in a run failure). Command to run: `ansible-playbook ./test_playbook.yml -i inventory` ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Here is the result of the playbook run on Ansible 2.9.9: ``` PLAY [all] *********************************************************************************************************************************************************************** /usr/lib/python3/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.version_info[0] is 2 and sys.version_info[1] is 1: /usr/lib/python3/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.version_info[0] is 2 and sys.version_info[1] is 1: TASK [Gathering Facts] *********************************************************************************************************************************************************** ok: [win1] TASK [debug] ********************************************************************************************************************************************************************* ok: [win1] => { "msg": "Message" } PLAY RECAP *********************************************************************************************************************************************************************** win1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The `sudo` become plugin gets loaded, even though `ansible_become` was set to "no", causing the run to fail (since the sudo plugin doesn't work with Powershell). <!--- Paste verbatim command output between quotes --> ```paste below PLAY [all] *********************************************************************************************************************************************************************** /usr/lib/python3/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.version_info[0] is 2 and sys.version_info[1] is 1: /usr/lib/python3/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="? if sys.version_info[0] is 2 and sys.version_info[1] is 1: TASK [Gathering Facts] *********************************************************************************************************************************************************** fatal: [win1]: FAILED! => {"msg": "The powershell shell family is incompatible with the sudo become plugin"} PLAY RECAP *********************************************************************************************************************************************************************** win1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` I believe this comes from the fact that [this line](https://github.com/ansible/ansible/blob/devel/lib/ansible/executor/task_executor.py#L821) (added in #69244, present in [v2.9.10](https://github.com/ansible/ansible/blob/v2.9.10/lib/ansible/executor/task_executor.py#L905)) only checks if `ansible_become` is not a falsey value. Non-empty strings are truthy values, and `cvars['ansible_become']` is a non-empty string (`u'no'`) in that case (verified by printing the contents of `cvars` before the offending line). Not setting `ansible_become` at all gives the expected result (since the playbook itself doesn't use the `become` plugin). I'm not familiar with the Ansible codebase, but I think using something like [`check_type_bool`](https://github.com/ansible/ansible/blob/73139df36cf2da3e9926057e8137bda6e41cb2fb/lib/ansible/module_utils/common/validation.py#L436-L452) on `ansible_become` that's retrieved from the inventory file could fix the issue. Note: I haven't been able to confirm yet if this also happens on the `devel` branch (I'm getting `The module setup was redirected to ansible.windows.setup, which could not be loaded.` errors on `2.11.0.dev0`).
https://github.com/ansible/ansible/issues/70476
https://github.com/ansible/ansible/pull/70484
7525503512369b4fe0b028fb5884aedb07900764
8aca464b8bbd4ecd606cdb14f1a5b9f19f093552
2020-07-06T15:46:22Z
python
2020-07-08T18:53:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,470
["changelogs/fragments/lineinfile-add-search_string-parameter-for-non-regexp-searching.yaml", "lib/ansible/modules/lineinfile.py", "test/integration/targets/lineinfile/files/teststring.conf", "test/integration/targets/lineinfile/files/teststring.txt", "test/integration/targets/lineinfile/files/teststring_58923.txt", "test/integration/targets/lineinfile/tasks/main.yml", "test/integration/targets/lineinfile/tasks/test_string01.yml", "test/integration/targets/lineinfile/tasks/test_string02.yml"]
RFE: lineinfile should support a pure (non-regex) line
--- <!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY I want to be able to use a pure (non-regex) line with lineinfile. Without accidentally escaping or not escaping characters. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME lineinfile ##### ADDITIONAL INFORMATION I have a line in a file which has lots of special characters. I want to use Ansible's lineinfile module. Ansible's lineinfile module requires a regular expression, which means lots of escaping for me, and a role or playbook that is more difficult to read. Could the module support a non-regex line too? Example of problem regex (have fun escaping this one! - real world example): ```yaml lineinfile: path: /etc/apt/apt.conf.d/50unattended-upgrades regexp: '# "${distro_id}:${distro_codename}-updates";' line: ' "${distro_id}:${distro_codename}-updates";' ```
https://github.com/ansible/ansible/issues/70470
https://github.com/ansible/ansible/pull/70647
9a9272305a7b09f84861c7061f57945ae9ad7090
69631da889e21a5513916b62d72c115064b7660b
2020-07-06T10:37:09Z
python
2021-02-02T20:37:06Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,437
["changelogs/fragments/70437-ssh-args.yml", "lib/ansible/plugins/connection/ssh.py"]
ANSIBLE_SSH_ARGS not applied to hosts created with add_host
##### SUMMARY <!--- Explain the problem briefly below --> The settings in `ANSIBLE_SSH_ARGS` are not applied to any host created with `add_host` resulting in incorrect connection to those hosts. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `lib/ansible/plugins/connection/ssh.py` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.11.0.dev0 config file = /Users/sdoran/.ansible.cfg configured module search path = ['/usr/local/share/ansible/library'] ansible python module location = /Users/sdoran/Source/ansible/lib/ansible ansible collection location = /Users/sdoran/.ansible/collections:/usr/local/share/ansible/collections executable location = /Users/sdoran/Source/ansible/bin/ansible python version = 3.8.2 (default, May 12 2020, 12:11:39) [Clang 11.0.3 (clang-1103.0.32.59)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_LOG_PATH(env: ANSIBLE_LOG_PATH) = /Users/sdoran/.ansible/ansible.log DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/sdoran/bin/getvaultkey.sh DEVEL_WARNING(env: ANSIBLE_DEVEL_WARNING) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run the following playbook passing `ANSIBLE_SSH_ARGS` as an environment variable ``` env ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null' ansible-playbook playbook.yml -vvv ``` <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: localhost gather_facts: no tasks: - add_host: name: delegatetome ansible_host: 127.0.0.1 - name: Play against added host hosts: delegatetome tasks: - ping: ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS `ANSIBLE_SSH_ARGS` are applied to the host created with `add_host` and used during connection. <!--- Describe what you expected to happen when running the steps above --> (output truncated) ``` ... PLAY [Play against added host] **************************************************************************************** TASK [Gathering Facts] ************************************************************************************************ <127.0.0.1> SSH: EXEC ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o... ... ``` ##### ACTUAL RESULTS Missing `ANSIBLE_SSH_ARGS`. ```paste below ... PLAY [Play against added host] **************************************************************************************** META: ran handlers TASK [ping] *********************************************************************************************************** task path: /Users/sdoran/Projects/Vagrant/Ansible Lab/test-local.yml:16 <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: None <127.0.0.1> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s... ... ```
https://github.com/ansible/ansible/issues/70437
https://github.com/ansible/ansible/pull/70438
47c809aca1c561acc8c8f8a33f9be3d365950bdb
b4184aa50e902131e1d970ffcd2588fb199d11d2
2020-07-02T16:47:13Z
python
2020-07-02T19:04:58Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,429
["changelogs/fragments/galaxy-download-scm.yaml", "lib/ansible/galaxy/collection.py", "test/integration/targets/ansible-galaxy-collection-scm/tasks/download.yml"]
Download of SCM collections gives traceback
##### SUMMARY Compatibility of `ansible-galaxy collection download` with collections from source control is unclear, but attempting it gives a traceback. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/cli/galaxy.py ##### ANSIBLE VERSION ``` 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 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible ansible collection location = /Users/alancoding/.ansible/collections:/usr/share/ansible/collections executable location = /Users/alancoding/.virtualenvs/ansible-builder_test/bin/ansible python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ##### CONFIGURATION defaults ##### OS / ENVIRONMENT N/A ##### STEPS TO REPRODUCE Run the command ``` ansible-galaxy collection install -r examples/pytz/requirements.yml -p target/ ``` Where the requirements file `examples/pytz/requirements.yml` contains the contents ```yaml collections: - name: https://github.com/AlanCoding/awx.git#awx_collection,ee_req type: git ``` ##### EXPECTED RESULTS Well, I expect it to be documented clearly one way or the other. I would _like_ for this to work. Why? Because what it installs isn't the same as what source control gave. There is a `galaxy.yml` file checked into source control in my branch. However, if I run the `ansible-galaxy collection install`, it has a `MANIFEST.json` file and no `galaxy.yml`. This suggests that there was some intermediary step, where it built and then installed the collection. Given that speculation, I would expect that the download command will give me the `tar.gz` file which can reproduce the files that the install command gave me. ##### ACTUAL RESULTS ``` $ ansible-galaxy collection download -r examples/pytz/requirements.yml -p target -vvv [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-galaxy 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible ansible collection location = /Users/alancoding/.ansible/collections:/usr/share/ansible/collections executable location = /Users/alancoding/.virtualenvs/ansible-builder_test/bin/ansible-galaxy python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] No config file found; using defaults Reading requirement file at '/Users/alancoding/Documents/repos/ansible-builder/examples/pytz/requirements.yml' Process install dependency map Processing requirement collection 'https://github.com/AlanCoding/awx.git#awx_collection,ee_req' archiving ['/usr/local/bin/git', 'archive', '--prefix=awx/', '--output=/Users/alancoding/.ansible/tmp/ansible-local-72180s78cry9f/tmpxdfhelr6.tar', 'ee_req'] Skipping '/Users/alancoding/.ansible/tmp/ansible-local-72180s78cry9f/tmpj90wrb1h/awx/awx_collection/tools' for collection build Skipping '/Users/alancoding/.ansible/tmp/ansible-local-72180s78cry9f/tmpj90wrb1h/awx/awx_collection/setup.cfg' for collection build Skipping '/Users/alancoding/.ansible/tmp/ansible-local-72180s78cry9f/tmpj90wrb1h/awx/awx_collection/galaxy.yml' for collection build Starting collection download process to '/Users/alancoding/Documents/repos/ansible-builder/target' Downloading collection 'awx.awx' to '/Users/alancoding/Documents/repos/ansible-builder/target/awx-awx-0.0.1-devel.tar.gz' ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute '_add_auth_token' the full traceback was: Traceback (most recent call last): File "/Users/alancoding/Documents/repos/ansible/bin/ansible-galaxy", line 125, in <module> exit_code = cli.run() File "/Users/alancoding/Documents/repos/ansible/lib/ansible/cli/galaxy.py", line 498, in run context.CLIARGS['func']() File "/Users/alancoding/Documents/repos/ansible/lib/ansible/cli/galaxy.py", line 789, in execute_download context.CLIARGS['allow_pre_release']) File "/Users/alancoding/Documents/repos/ansible/lib/ansible/galaxy/collection.py", line 607, in download_collections b_temp_download_path = requirement.download(b_temp_path) File "/Users/alancoding/Documents/repos/ansible/lib/ansible/galaxy/collection.py", line 226, in download self.api._add_auth_token(headers, download_url, required=False) AttributeError: 'NoneType' object has no attribute '_add_auth_token' ```
https://github.com/ansible/ansible/issues/70429
https://github.com/ansible/ansible/pull/71005
4bd7580dd7f41ca484fde21dda94d2dd856108b0
f6b3b4b430619fbd4af0f2bf50b4715ca959a7ff
2020-07-02T02:08:19Z
python
2020-08-04T15:10:00Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,413
["changelogs/fragments/handle_undefined_in_type_errors_filters.yml", "lib/ansible/errors/__init__.py", "lib/ansible/plugins/filter/core.py", "lib/ansible/plugins/filter/mathstuff.py", "test/integration/targets/filter_core/handle_undefined_type_errors.yml", "test/integration/targets/filter_core/runme.sh", "test/integration/targets/filter_core/tasks/main.yml", "test/integration/targets/filter_mathstuff/tasks/main.yml", "test/units/plugins/filter/test_mathstuff.py"]
dict2items in loops throw typeerror, fails task even when task should be skipped.
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> Using loops with dict2items fails even when task should be skipped by conditional. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> dict2items filter ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible --version ansible 2.9.9 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /var/lib/awx/venv/ansible-2.6.4/lib/python2.7/site-packages/ansible executable location = /var/lib/awx/venv/ansible-2.6.4/bin/ansible python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ansible-config dump --only-changed GALAXY_SERVER_LIST(/etc/ansible/ansible.cfg) = [u'official_galaxy'] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> CentOS 7.8 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run this playbook <!--- Paste example playbooks or commands between quotes below --> ``` - hosts: localhost gather_facts: false tasks: - debug: msg={{item}} with_dict: '{{myundef}}' when: - myundef is defined - debug: msg={{item}} loop: '{{myundef|dict2items}}' when: - myundef is defined ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Expected that both tasks are skipped as conditional is not met. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ``` ansible-playbook 2.9.9 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /var/lib/awx/venv/ansible-2.6.4/lib/python2.7/site-packages/ansible executable location = /var/lib/awx/venv/ansible-2.6.4/bin/ansible-playbook python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] Using /etc/ansible/ansible.cfg as config file setting up inventory plugins host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Parsed /etc/ansible/hosts inventory source with ini plugin [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' Loading callback plugin default of type stdout, v2.0 from /var/lib/awx/venv/ansible-2.6.4/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc PLAYBOOK: test_dict2items.yml *************************************************************************************** Positional arguments: test_dict2items.yml become_method: sudo inventory: (u'/etc/ansible/hosts',) forks: 5 tags: (u'all',) verbosity: 4 connection: smart timeout: 10 1 plays in test_dict2items.yml PLAY [localhost] **************************************************************************************************** META: ran handlers TASK [debug] ******************************************************************************************************** task path: /var/lib/awx/projects/Manual/test_dict2items.yml:4 skipping: [localhost] => {} TASK [debug] ******************************************************************************************************** task path: /var/lib/awx/projects/Manual/test_dict2items.yml:8 fatal: [localhost]: FAILED! => { "msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead." } PLAY RECAP ********************************************************************************************************** localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/70413
https://github.com/ansible/ansible/pull/70417
24dcaf8974f27bb16577975cf46a36334f37784b
cf89ca8a03a8a84302ad27cb1fc7aa9120b743ca
2020-07-01T15:01:22Z
python
2020-07-10T22:49:57Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,348
["docs/docsite/rst/installation_guide/intro_installation.rst"]
loosing all ansible binaries when pip upgrade from 2.9 to 2.10.0a1
## SUMMARY When I followed the instructions provided in the mailing list to upgrade using a virtualenv ansible to 2.10.0a1 I lost all the binaries (ansible-playbook, ansible, …). To get them back I had to do a pip install ansible --force I reproduced the problem on another installation. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME pip packaging ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below -- empty ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Linux fedora 32, installation in a venv ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ``` - create a venv - install ansible current stable pre 2.10 - verify you have ansible binaries - upgrade to 2.10.0a1 using the command `pip install ansible==2.10.0a1` - observe there is no ansible binaries (ansible-devel) [baptistemm@cactus ansible]$ pip install ansible==2.10.0a1 Collecting ansible==2.10.0a1 Downloading ansible-2.10.0a1.tar.gz (22.2 MB) |████████████████████████████████| 22.2 MB 430 kB/s Collecting ansible-base<2.11,>=2.10.0.dev1 Downloading ansible-base-2.10.0b1.tar.gz (5.7 MB) |████████████████████████████████| 5.7 MB 7.9 MB/s Requirement already satisfied: jinja2 in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.11.1) Requirement already satisfied: PyYAML in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (5.3) Requirement already satisfied: cryptography in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.8) Collecting packaging Downloading packaging-20.4-py2.py3-none-any.whl (37 kB) Requirement already satisfied: MarkupSafe>=0.23 in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from jinja2->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (1.1.1) Requirement already satisfied: six>=1.4.1 in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (1.14.0) Requirement already satisfied: cffi!=1.11.3,>=1.8 in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (1.14.0) Collecting pyparsing>=2.0.2 Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB) |████████████████████████████████| 67 kB 1.0 MB/s Requirement already satisfied: pycparser in /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages (from cffi!=1.11.3,>=1.8->cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.19) Building wheels for collected packages: ansible, ansible-base Building wheel for ansible (setup.py) ... done Created wheel for ansible: filename=ansible-2.10.0a1-py3-none-any.whl size=41534726 sha256=65ed15efa9139f28bf20c274b7edbec71c6c9b6f45dd610ebfac141d13ec7804 Stored in directory: /home/baptistemm/.cache/pip/wheels/23/02/1c/d650964a7ad3c83dc87a631ae9febc130acf306da38d67aaa1 Building wheel for ansible-base (setup.py) ... done Created wheel for ansible-base: filename=ansible_base-2.10.0b1-py3-none-any.whl size=1846180 sha256=028c5198f70dc5b703feec5bd699cc15bfd37e90fe5d0369066e909f6dc0fd1e Stored in directory: /home/baptistemm/.cache/pip/wheels/56/50/db/05621494e62f629d966912934e1ac6f62be07e572c9b1b7423 Successfully built ansible ansible-base Installing collected packages: pyparsing, packaging, ansible-base, ansible Attempting uninstall: ansible Found existing installation: ansible 2.9.10 Uninstalling ansible-2.9.10: Successfully uninstalled ansible-2.9.10 Successfully installed ansible-2.10.0a1 ansible-base-2.10.0b1 packaging-20.4 pyparsing-2.4.7 ``` ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Have binaries installed ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/70348
https://github.com/ansible/ansible/pull/70768
75e8da09501dd9de565cb7854205b8e06615565f
50193356605a9f96caf7772c331ff0950afa4c7c
2020-06-28T13:34:47Z
python
2020-07-31T17:13:54Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,339
["changelogs/fragments/known_hosts_cert-authority_keys.yml", "lib/ansible/modules/known_hosts.py", "test/integration/targets/known_hosts/defaults/main.yml", "test/integration/targets/known_hosts/files/existing_known_hosts", "test/integration/targets/known_hosts/tasks/main.yml"]
known_hosts module breaks when using @cert-authority keys
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY If I attempt to add a key for `host.example.com` ansible removes my `@cert-authority *.example.com` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME known_hosts ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible-playbook 2.9.10 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible executable location = /usr/local/bin/ansible-playbook python version = 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0] ``` ##### CONFIGURATION Completely default ##### OS / ENVIRONMENT Docker image on amd64 running debian:buster-slim image id: 43e3995ee54a Installed via pip ##### STEPS TO REPRODUCE play.yml - hosts: localhost gather_facts: no vars: known_hosts_path: example_com_ed25519_key: > host.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFp8VtD59XAcxkj1qbfCtB1in9nm5WiipORjtVJUBA6I tasks: - name: Create a copy of known_hosts copy: src: existing_known_hosts dest: test_known_hosts - name: add the ed25519 host key known_hosts: name: host.example.com key: "{{ example_com_ed25519_key }}" state: present path: "test_known_hosts" register: result - name: get the file content command: "cat test_known_hosts" register: known_hosts_v1 - name: assert that the key was added and ordering preserved assert: that: - 'result is changed' - 'known_hosts_v1.stdout_lines[-1].strip() == example_com_ed25519_key.strip()' - 'known_hosts_v1.stdout_lines[4].startswith("@cert-authority")' existing_known_hosts example.com ssh-dss AAAAB3NzaC1kc3MAAACBALT8YHxZ59d8yX4oQNPbpdK9AMPRQGKFY9X13S2fp4UMPijiB3ETxU1bAyVTjTbsoag065naFt13aIVl+u0MDPfMuYgVJFEorAZkDlBixvT25zpKyQhI4CtHhZ9Y9YWug4xLqSaFUYEPO31Bie7k8xRfDwsHtzTRPp/0zRURwARHAAAAFQDLx2DZMm3cR8cZtbq4zdSvkXLh0wAAAIAalkQYziu2b5dDRQMiFpDLpPdbymyVhDMmRKnXwAB1+dhGyJLGvfe0xO+ibqGXMp1aZ1iC3a/vHTpYKDVqKIIpFg5r0fxAcAZkJR0aRC8RDxW/IclbIliETD71osIT8I47OFc7vAVCWP8JbV3ZYzR+i98WUkmZ4/ZUzsDl2gi7WAAAAIAsdTGwAo4Fs784TdP2tIHCqxAIz2k4tWmZyeRmXkH5K/P1o9XSh3RNxvFKK7BY6dQK+h9jLunMBs0SCzhMoTcXaJq331kmLJltjq5peo0PnLGnQz5pas0PD7p7gb+soklmHoVp7J2oMC/U4N1Rxr6g9sv8Rpsf1PTPDT3sEbze6A== root@freezer @cert-authority *.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDXh1gk2xgS2MekPvo7ZEKiOT7HoyvOAzai2GqoLXGHO # example.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM6OSqweGdPdQ/metQaf738AdN3P+itYp1AypOTgXkyj root@localhost Output # ansible-playbook play.yml --diff [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] ************************************************************************************************************* ... TASK [add the ed25519 host key] ********************************************************************************************** --- before: test_known_hosts +++ after: test_known_hosts @@ -1,3 +1,3 @@ example.com ssh-dss AAAAB3NzaC1kc3MAAACBALT8YHxZ59d8yX4oQNPbpdK9AMPRQGKFY9X13S2fp4UMPijiB3ETxU1bAyVTjTbsoag065naFt13aIVl+u0MDPfMuYgVJFEorAZkDlBixvT25zpKyQhI4CtHhZ9Y9YWug4xLqSaFUYEPO31Bie7k8xRfDwsHtzTRPp/0zRURwARHAAAAFQDLx2DZMm3cR8cZtbq4zdSvkXLh0wAAAIAalkQYziu2b5dDRQMiFpDLpPdbymyVhDMmRKnXwAB1+dhGyJLGvfe0xO+ibqGXMp1aZ1iC3a/vHTpYKDVqKIIpFg5r0fxAcAZkJR0aRC8RDxW/IclbIliETD71osIT8I47OFc7vAVCWP8JbV3ZYzR+i98WUkmZ4/ZUzsDl2gi7WAAAAIAsdTGwAo4Fs784TdP2tIHCqxAIz2k4tWmZyeRmXkH5K/P1o9XSh3RNxvFKK7BY6dQK+h9jLunMBs0SCzhMoTcXaJq331kmLJltjq5peo0PnLGnQz5pas0PD7p7gb+soklmHoVp7J2oMC/U4N1Rxr6g9sv8Rpsf1PTPDT3sEbze6A== root@freezer -@cert-authority *.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDXh1gk2xgS2MekPvo7ZEKiOT7HoyvOAzai2GqoLXGHO # example.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM6OSqweGdPdQ/metQaf738AdN3P+itYp1AypOTgXkyj root@localhost +host.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFp8VtD59XAcxkj1qbfCtB1in9nm5WiipORjtVJUBA6I changed: [localhost] TASK [get the file content] ************************************************************************************************** changed: [localhost] TASK [assert that the key was added and ordering preserved] ****************************************************************** fatal: [localhost]: FAILED! => {"msg": "The conditional check 'known_hosts_v1.stdout_lines[4].startswith(\"@cert-authority\")' failed. The error was: error while evaluating conditional (known_hosts_v1.stdout_lines[4].startswith(\"@cert-authority\")): list object has no element 4"} PLAY RECAP ******************************************************************************************************************* localhost : ok=3 changed=3 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> I expected adding `hosts.example.com` not to have the side effect of removing `@cert-authority *.example.com ...` ##### ACTUAL RESULTS See Above
https://github.com/ansible/ansible/issues/70339
https://github.com/ansible/ansible/pull/70340
7dde4901d42e4c043adbd980c941b97cd3237bb6
a4b00793be46f703e32ee4c440f303d19d2c652d
2020-06-27T04:20:12Z
python
2023-11-22T00:55:01Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,338
["lib/ansible/modules/meta.py"]
Tags can not be used to skip the Meta module
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> Update `Meta` module documentation [https://docs.ansible.com/ansible/latest/modules/meta_module.html](url) to warn Ansible users that the `Meta` module is not skipped when using tags. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> Module: `Meta` https://docs.ansible.com/ansible/latest/modules/meta_module.html ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below Latest ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> Linux, WIndows ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files --> https://github.com/ansible/ansible/issues/70335 This seems to be a common enough occurrence that warrants a warning within the documentation.
https://github.com/ansible/ansible/issues/70338
https://github.com/ansible/ansible/pull/70590
8d160b1881c6d363bee16bc4d28d879b9dcdf457
40591d5fbbe9878427fc5b1b46ec820f69feba1a
2020-06-27T03:52:43Z
python
2020-07-14T15:38:15Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,337
["changelogs/fragments/items2dict-error-handling.yml", "lib/ansible/plugins/filter/core.py", "test/integration/targets/filter_core/tasks/main.yml"]
items2dict gives "KeyError 'key'" with invalid key/value pair
##### SUMMARY We should probably render something a bit nicer with invalid key/value data, especially because items2dict/dict2items are fairly unintuitive functions. Probably something that briefly explains what the purpose of key/value are so the user can get them right. ##### ISSUE TYPE - Bug Report ##### ANSIBLE VERSION devel ##### COMPONENT NAME plugins.filter.core
https://github.com/ansible/ansible/issues/70337
https://github.com/ansible/ansible/pull/77946
89e4fb71e6293c92512a60c8591d03fcc264c37e
f270b4e224174557963120e75bfc81acf1cdde61
2020-06-27T00:27:25Z
python
2022-06-02T14:49:29Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,334
["changelogs/fragments/delegate_has_hostvars.yml", "lib/ansible/executor/task_executor.py", "lib/ansible/vars/manager.py", "test/integration/targets/delegate_to/connection_plugins/fakelocal.py", "test/integration/targets/delegate_to/has_hostvars.yml", "test/integration/targets/delegate_to/inventory", "test/integration/targets/delegate_to/runme.sh", "test/integration/targets/delegate_to/test_delegate_to.yml"]
hostvars not available in delegate_to tasks
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY hostvars not available to delegate_to tasks Related to #70320 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below $ ansible --version ansible 2.9.10 config file = /Users/jeanfabrice/test/ansible.cfg configured module search path = ['/Users/jeanfabrice/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/jeanfabrice/.virtualenvs/test/lib/python3.7/site-packages/ansible executable location = /Users/jeanfabrice/.virtualenvs/test/bin/ansible python version = 3.7.7 (default, Mar 14 2020, 02:39:38) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> MacOS, Linux ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml --- - hosts: all tasks: - name: Set login set_fact: login: user - name: Set password set_fact: password: password - name: delegate ls to server2 delegate_to: server2 command: ls vars: ansible_user: "{{ hostvars[inventory_hostname]['login'] }}" ansible_password: "{{ hostvars[inventory_hostname]['password'] }}" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> hostvars to be defined in delegate_to tasks ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below $ ./bin/ansible-playbook test.yml -i inventory -l server1 PLAY [all] ***************************************************************************************************************************************************************************** TASK [Set login] *********************************************************************************************************************************************************************** ok: [server1] TASK [Set password] ******************************************************************************************************************************************************************** ok: [server1] TASK [delegate ls to server2] ********************************************************************************************************************************************************** fatal: [server1]: FAILED! => {"msg": "'hostvars' is undefined"} PLAY RECAP ***************************************************************************************************************************************************************************** server1 : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/70334
https://github.com/ansible/ansible/pull/70331
06a4fc28336e3c26c7b53ec78239d716d6aa0914
84adaba6f5f020b2f0b1f13129d093b326bf5065
2020-06-26T18:25:24Z
python
2020-07-22T15:13:57Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,270
["docs/docsite/rst/reference_appendices/glossary.rst"]
[1/1]Update the Ansible glossary
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> With the split between ansible-base and collections, we have a need to clean up and update the ansible glossary. This is a starting point: https://github.com/ansible-collections/overview/#terminology <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70270
https://github.com/ansible/ansible/pull/71813
d6063b7457086a2ed04899c47d1fc6ee4d654de9
4aedd1b987150baae4b11200de916c87c53e6d30
2020-06-24T18:42:41Z
python
2020-09-24T14:45:54Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,267
["docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html"]
Edit on Github not working in the new world order
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> Edit on GitHub has major problems: - Doesn't work on all the older releases, since it points to devel and most of the modules are no longer in devel - doesn't work for modules still in ansible-base as per https://github.com/ansible/ansible/issues/69683 - May be difficult to get to work on devel once the docs pipeline is in place to bring back all the module docs from their respective collections. In general, we may have to turn it off for modules entirely, but this is the issue to track how we should approach this problem. <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.10 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70267
https://github.com/ansible/ansible/pull/70951
ac5f3f8befaff088450c97f783cb145519b8f6bf
e28b20d72930ad8c0a359de05e05726090165fda
2020-06-24T18:39:20Z
python
2020-07-30T19:43:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,261
["docs/docsite/rst/dev_guide/developing_modules_general.rst"]
Error as modules subfolders moved away from the ansible project
##### SUMMARY The following sentence `1. Navigate to the correct directory for your new module: $ cd lib/ansible/modules...` is not [correct](https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/dev_guide/developing_modules_general.rst#starting-a-new-module) as the folders `lib/ansible/modules/SUBFOLDERS` are not hosted under the ansible github repo. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/dev_guide/developing_modules_general.rst#starting-a-new-module ##### ANSIBLE VERSION ```paste below ansible 2.11.0.dev0 config file = None configured module search path = ['/Users/cmoullia/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/cmoullia/code/ansible/ansible/lib/ansible executable location = /Users/cmoullia/code/ansible/ansible/bin/ansible python version = 3.7.7 (default, Mar 10 2020, 15:43:33) [Clang 11.0.0 (clang-1100.0.33.17)] ```
https://github.com/ansible/ansible/issues/70261
https://github.com/ansible/ansible/pull/70594
38ccfb4a3e33fcaec54d82900d67e20226374f65
20209c508f13b018b8f44f77749001979aa5f048
2020-06-24T13:12:40Z
python
2020-07-13T19:41:59Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,258
["changelogs/fragments/70258-hash-filter-fail-unsupported-type.yml", "lib/ansible/plugins/filter/core.py", "test/integration/targets/filter_core/tasks/main.yml"]
Hash filter for variables is spotty, and broken for `password_hash` if variable is encrypted with vault
##### SUMMARY With a variable, `test_password` with value `hello`: {{ test_password | hash('sha1') }} -> works {{ test_password | hash('sha256') }} -> works {{ test_password | hash('blowfish') }} -> returns blank {{ test_password | password_hash('sha512') }} -> only works if the value of `test_password` is not encrypted with ansible-vault. Detailed code below. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#hashing-filters ##### ANSIBLE VERSION ``` 1) ansible 2.9.9 config file = /Users/<redacted>/.ansible.cfg configured module search path = ['/Users/<redacted>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.9/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.2 (default, Mar 11 2020, 14:40:53) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ``` 2) ansible 2.9.9 config file = None configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ubuntu/.local/lib/python3.6/site-packages/ansible executable location = /home/ubuntu/.local/bin/ansible python version = 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] ``` ##### CONFIGURATION ``` 1) DEPRECATION_WARNINGS(/Users/<redacted>/.ansible.cfg) = False ``` ##### OS / ENVIRONMENT ``` 1) Darwin OSTML0263654 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64 ``` ``` 2) DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" Linux 4.15.0-1065-aws #69-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux ``` ##### STEPS TO REPRODUCE Vault password is `12345` ``` --- - name: Ansible password hash bug report connection: local gather_facts: false hosts: 127.0.0.1 tasks: - name: Assign the value "hello" to test_password (vault password is 12345) set_fact: test_password: !vault | $ANSIBLE_VAULT;1.1;AES256 39343361653534323234663039376164326564626361353265643438373937366139363434373034 3966323339316461396131666339316631323236656430350a613764663563636634666132303232 36386133346337353761343134366236613836366638613962363863626634663937323465636263 3539353166313439360a343832313938393036346635636131363930353562356331303930626636 6439 - debug: msg={{ test_password }} - name: Generate sha1 hash set_fact: test_password_sha1: "{{ test_password | hash('sha1') }}" - debug: msg={{ test_password_sha1 }} - name: Generate sha256 hash set_fact: test_password_sha256: "{{ test_password | hash('sha256') }}" - debug: msg={{ test_password_sha256 }} - name: Generate blowfish hash set_fact: test_password_blowfish: "{{ test_password | hash('blowfish') }}" - debug: msg={{ test_password_blowfish }} - name: Generate sha512 password_hash set_fact: test_password_phash_sha512: "{{ test_password | password_hash('sha512') }}" - debug: msg={{ test_password_phash_sha512 }} ``` ##### EXPECTED RESULTS ``` PLAY [Ansible password hash bug report] ************************************************************************************************************************************************************************* TASK [Assign the value "hello" to test_password (vault password is 12345)] ************************************************************************************************************************************** ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "hello" } TASK [Generate sha1 hash] *************************************************************************************************************************************************************************************** ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d" } TASK [Generate sha256 hash] ************************************************************************************************************************************************************************************* ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" } TASK [Generate blowfish hash] *********************************************************************************************************************************************************************************** ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "$2y$08$uzCFDwSh3Vc7DhdmDNEykOxGKmHOxZzOY4LHvXg0hfTUPNa657cia" } TASK [Generate sha512 password_hash] **************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "9B71D224BD62F3785D96D46AD3EA3D73319BFBC2890CAADAE2DFF72519673CA72323C3D99BA5C11D7C7ACC6E14B8C5DA0C4663475C2E5C3ADEF46F73BCDEC043" } ``` ##### ACTUAL RESULTS ``` PLAY [Ansible password hash bug report] ************************************************************************************************************************************************************************* TASK [Assign the value "hello" to test_password (vault password is 12345)] ************************************************************************************************************************************** ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "hello" } TASK [Generate sha1 hash] *************************************************************************************************************************************************************************************** ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d" } TASK [Generate sha256 hash] ************************************************************************************************************************************************************************************* ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" } TASK [Generate blowfish hash] *********************************************************************************************************************************************************************************** ok: [127.0.0.1] TASK [debug] **************************************************************************************************************************************************************************************************** ok: [127.0.0.1] => { "msg": "" } TASK [Generate sha512 password_hash] **************************************************************************************************************************************************************************** fatal: [127.0.0.1]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ test_password | password_hash('sha512') }}): secret must be unicode or bytes, not ansible.parsing.yaml.objects.AnsibleVaultEncryptedUnicode"} ```
https://github.com/ansible/ansible/issues/70258
https://github.com/ansible/ansible/pull/70292
b019029bf3a185a03054a23feb415af8fd228f7d
0cd07eb3fd529297622b29aff93c2fa94fbb0ad0
2020-06-24T11:13:59Z
python
2020-06-25T19:55:21Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,256
["changelogs/fragments/70256_stat_colon_split.yml", "lib/ansible/modules/stat.py", "test/integration/targets/stat/tasks/main.yml"]
file module can't get mime info if path contains ":"
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY Somehow the parsing of the mimetype/-charset is messed up. The file module doesn't return mimtype and charset if `path` contains ":" I guess, this happens because the `file` program splits also by `:` ``` ❯ file -i /tmp/devel:kubic:libcontainers:stable.gpg /tmp/devel:kubic:libcontainers:stable.gpg: application/pgp-keys; charset=us-ascii ❯ file -i /tmp/kubic.gpg /tmp/kubic.gpg: application/pgp-keys; charset=us-ascii ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME file ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.7 config file = /home/ansible/ansible/ansible.cfg configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ansible/.local/lib/python3.8/site-packages/ansible executable location = /home/ansible/.local/bin/ansible python version = 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ALLOW_WORLD_READABLE_TMPFILES(/home/ansible/ansible/ansible.cfg) = True ANSIBLE_PIPELINING(/home/ansible/ansible/ansible.cfg) = True CACHE_PLUGIN(/home/ansible/ansible/ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/home/ansible/ansible/ansible.cfg) = ~/.cache/ansible/ CACHE_PLUGIN_TIMEOUT(/home/ansible/ansible/ansible.cfg) = 86400 DEFAULT_BECOME(/home/ansible/ansible/ansible.cfg) = True DEFAULT_FORKS(/home/ansible/ansible/ansible.cfg) = 10 DEFAULT_GATHERING(/home/ansible/ansible/ansible.cfg) = smart DEFAULT_HOST_LIST(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/hosts'] DEFAULT_MANAGED_STR(/home/ansible/ansible/ansible.cfg) = Ansible managed file, do not edit directly DEFAULT_REMOTE_USER(/home/ansible/ansible/ansible.cfg) = ansible DEFAULT_ROLES_PATH(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/roles', '/home/ansible/ansible/matrix-docker-ansible-deploy/roles'] DEFAULT_STRATEGY(/home/ansible/ansible/ansible.cfg) = mitogen_linear DEFAULT_STRATEGY_PLUGIN_PATH(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/mitogen/ansible_mitogen/plugins/strategy'] DEFAULT_VAULT_PASSWORD_FILE(/home/ansible/ansible/ansible.cfg) = /home/ansible/ansible/open_vault.sh RETRY_FILES_ENABLED(/home/ansible/ansible/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Ubuntu 20.04 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Find out whether {{ _config.key_path }} is armored stat: path: /tmp/{{ _name }}.gpg register: _file ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Contains `mimetype` and `charset`. ``` TASK [systemli.apt_repositories : Find out whether kubic.asc is armored] **************************** task path: /home/ansible/ansible/roles/systemli.apt_repositories/tasks/key_path.yml:13 ok: [localhost] => {"changed": false, "stat": {"atime": 1592991124.411589, "attr_flags": "e", "attributes": ["extents"], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "89a18920d032e753bcfaf8e686d13b8cd482506c", "ctime": 1592991124.411589, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13514734, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "application/pgp-keys", "mode": "0644", "mtime": 1592991108.2558286, "nlink": 1, "path": "/tmp/kubic.gpg", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 1094, "uid": 0, "version": "2928825127", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}} ``` ##### ACTUAL RESULTS `mimetype` and `charset` are unknown <!--- Paste verbatim command output between quotes --> ``` TASK [systemli.apt_repositories : Find out whether kubic.asc is armored] **************************** task path: /home/ansible/ansible/roles/systemli.apt_repositories/tasks/key_path.yml:13 ok: [localhost] => {"changed": false, "stat": {"atime": 1592990225.242056, "attr_flags": "e", "attributes": ["extents"], "block_size": 4096, "blocks": 8, "charset": "unknown", "checksum": "89a18920d032e753bcfaf8e686d13b8cd482506c", "ctime": 1592990225.1860585, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13514733, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "unknown", "mode": "0644", "mtime": 1592990207.3909187, "nlink": 1, "path": "/tmp/devel:kubic:libcontainers:stable.gpg", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 1094, "uid": 0, "version": "1864602331", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}} ```
https://github.com/ansible/ansible/issues/70256
https://github.com/ansible/ansible/pull/70259
3c9be97e16802513b3d2789c1a670f046e446138
29169ae847a91f7aa053db30ec650a7b1bad1dd3
2020-06-24T09:47:59Z
python
2020-06-25T19:21:50Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,244
["changelogs/fragments/70244-selinux-special-fs.yml", "lib/ansible/module_utils/basic.py", "test/integration/targets/copy/tasks/main.yml", "test/integration/targets/copy/tasks/selinux.yml"]
Ansible copy module returns `Operation not supported` for dosfs_t
#### SUMMARY When trying to copy a file using the ansible `copy` module to a remote system with SELinux enforcing on a `vfat` partition, throws the error below: ``` TASK [SCORED | 1.5.2 | Copy superusers file containing password - modifed for selinux] ******************************************************************** fatal: [centos8.tatu.home]: FAILED! => {"changed": false, "checksum": "c752bf3bf5307fd295d14bdfa4fbfaceebe7ed5a", "cur_context": ["system_u", "object_r", "dosfs_t", "s0"], "gid": 0, "group": "root", "input_was": ["system_u", "object_r", "boot_t", "s0"], "mode": "0700", "msg": "invalid selinux context: [Errno 95] Operation not supported", "new_context": ["system_u", "object_r", "boot_t", "s0"], "owner": "root", "path": "/boot/efi/EFI/redhat/.ansible_tmphes6pya1user.config", "secontext": "system_u:object_r:dosfs_t:s0", "size": 14, "state": "file", "uid": 0} ``` However, when using the `touch` module, it works as expected. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `copy` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste ansible 2.9.10 config file = /home/mdemello/.ansible.cfg configured module search path = ['/home/mdemello/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/mdemello/.virtualenvs/py38/lib64/python3.8/site-packages/ansible executable location = /home/mdemello/.virtualenvs/py38/bin/ansible python version = 3.8.3 (default, May 15 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_BECOME(/home/mdemello/.ansible.cfg) = True DEFAULT_BECOME_ASK_PASS(/home/mdemello/.ansible.cfg) = False DEFAULT_BECOME_USER(/home/mdemello/.ansible.cfg) = root DEFAULT_FORKS(/home/mdemello/.ansible.cfg) = 6 DEFAULT_HOST_LIST(/home/mdemello/.ansible.cfg) = ['/home/mdemello/ansible/inventory'] DEFAULT_JINJA2_NATIVE(/home/mdemello/.ansible.cfg) = True DEFAULT_MODULE_NAME(/home/mdemello/.ansible.cfg) = command DEFAULT_REMOTE_PORT(/home/mdemello/.ansible.cfg) = 22 DEFAULT_REMOTE_USER(/home/mdemello/.ansible.cfg) = root DEFAULT_ROLES_PATH(/home/mdemello/.ansible.cfg) = ['/home/mdemello/ansible/roles'] DEFAULT_TIMEOUT(/home/mdemello/.ansible.cfg) = 10 DEFAULT_VERBOSITY(/home/mdemello/.ansible.cfg) = 0 ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ``` [root@localhost EFI]# cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) [root@localhost EFI]# uname -a Linux localhost.localdomain 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@localhost EFI]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Memory protection checking: actual (secure) Max kernel policy version: 31 [root@localhost EFI]# rpm -aq | grep selinux | sort container-selinux-2.124.0-1.module_el8.2.0+305+5e198a41.noarch libselinux-2.9-3.el8.x86_64 libselinux-utils-2.9-3.el8.x86_64 python3-libselinux-2.9-3.el8.x86_64 rpm-plugin-selinux-4.14.2-37.el8.x86_64 selinux-policy-3.14.3-41.el8_2.4.noarch selinux-policy-targeted-3.14.3-41.el8_2.4.noarch ``` ##### STEPS TO REPRODUCE 1) Install a CentOS 8 2) Ensure the /boot/efi partition is using `vfat` ``` /dev/vdb1 /boot/efi vfat umask=0077,shortname=winnt 0 2 ``` 3) Try the playbook below: ``` --- - hosts: centos8.tatu.home become: true gather_facts: yes vars: destfile: "/boot/efi/EFI/redhat/user.config" force_touch: True force_remove: True tasks: - name: Remove file file: path: "{{ destfile }}" state: absent when: force_remove|bool - name: Touching file file: path: "{{ destfile }}" state: touch when: force_touch|bool - name: "SCORED | 1.5.2 | Copy superusers file containing password - modifed for selinux" copy: owner: root group: root mode: 0700 dest: "{{ destfile }}" src: 'user.config' register: copyuserconfig when: - ansible_facts['os_family'] == 'RedHat' - ansible_distribution_major_version == "8" ``` ** When using the module `touch` the file can be deployed ``` ansible-playbook -l centos8.tatu.home -e force_touch=true -e force_remove=true 02680135_copy_selinux.yaml -v Using /home/mdemello/.ansible.cfg as config file PLAY [centos8.tatu.home] ********************************************************************************************************************************** TASK [Gathering Facts] ************************************************************************************************************************************ ok: [centos8.tatu.home] TASK [Remove file] **************************************************************************************************************************************** changed: [centos8.tatu.home] => {"changed": true, "path": "/boot/efi/EFI/redhat/user.config", "state": "absent"} TASK [Touching file] ************************************************************************************************************************************** changed: [centos8.tatu.home] => {"changed": true, "dest": "/boot/efi/EFI/redhat/user.config", "gid": 0, "group": "root", "mode": "0700", "owner": "root", "secontext": "system_u:object_r:dosfs_t:s0", "size": 0, "state": "file", "uid": 0} TASK [SCORED | 1.5.2 | Copy superusers file containing password - modifed for selinux] ******************************************************************** changed: [centos8.tatu.home] => {"changed": true, "checksum": "c752bf3bf5307fd295d14bdfa4fbfaceebe7ed5a", "dest": "/boot/efi/EFI/redhat/user.config", "gid": 0, "group": "root", "md5sum": "ceee01ff81a642f440bae29f1d33c23d", "mode": "0700", "owner": "root", "secontext": "system_u:object_r:dosfs_t:s0", "size": 14, "src": "/root/.ansible/tmp/ansible-tmp-1592882744.8798356-28805-242242527265135/source", "state": "file", "uid": 0} PLAY RECAP ************************************************************************************************************************************************ centos8.tatu.home : ok=4 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ``` [root@localhost EFI]# ls -laZ /boot/efi/EFI/redhat/ total 12 drwx------. 2 root root system_u:object_r:dosfs_t:s0 4096 Jun 22 23:25 . drwx------. 3 root root system_u:object_r:dosfs_t:s0 4096 Jun 22 23:10 .. -rwx------. 1 root root system_u:object_r:dosfs_t:s0 14 Jun 22 23:25 user.config ``` ** When using the module `copy` directly, the copy fails ``` ansible-playbook -l centos8.tatu.home -e force_touch=false -e force_remove=true 02680135_copy_selinux.yaml -v Using /home/mdemello/.ansible.cfg as config file PLAY [centos8.tatu.home] ********************************************************************************************************************************** TASK [Gathering Facts] ************************************************************************************************************************************ ok: [centos8.tatu.home] TASK [Remove file] **************************************************************************************************************************************** changed: [centos8.tatu.home] => {"changed": true, "path": "/boot/efi/EFI/redhat/user.config", "state": "absent"} TASK [Touching file] ************************************************************************************************************************************** skipping: [centos8.tatu.home] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [SCORED | 1.5.2 | Copy superusers file containing password - modifed for selinux] ******************************************************************** fatal: [centos8.tatu.home]: FAILED! => {"changed": false, "checksum": "c752bf3bf5307fd295d14bdfa4fbfaceebe7ed5a", "cur_context": ["system_u", "object_r", "dosfs_t", "s0"], "gid": 0, "group": "root", "input_was": ["system_u", "object_r", "boot_t", "s0"], "mode": "0700", "msg": "invalid selinux context: [Errno 95] Operation not supported", "new_context": ["system_u", "object_r", "boot_t", "s0"], "owner": "root", "path": "/boot/efi/EFI/redhat/.ansible_tmphes6pya1user.config", "secontext": "system_u:object_r:dosfs_t:s0", "size": 14, "state": "file", "uid": 0} PLAY RECAP ************************************************************************************************************************************************ centos8.tatu.home : ok=2 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0 ``` ##### EXPECTED RESULTS `copy` should work ##### ACTUAL RESULTS `copy` module fails. Trying to understand why the `copy` module fails and `touch` works in this scenario
https://github.com/ansible/ansible/issues/70244
https://github.com/ansible/ansible/pull/70439
f5037314e30dd6e2accf9313988c3ceb64491922
688cd8657bcd4610aa268913be67e76778bc6940
2020-06-23T20:28:46Z
python
2020-07-07T15:48:05Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,180
["changelogs/fragments/70180-collection-list-more-robust.yml", "lib/ansible/cli/galaxy.py", "lib/ansible/galaxy/collection/concrete_artifact_manager.py", "test/integration/targets/ansible-galaxy-collection/tasks/list.yml", "test/units/galaxy/test_collection.py"]
Fatal error in ansible-galaxy collection list due to common SCM collection practice
##### SUMMARY The command `ansible-galaxy collection list` should not _error_ when parsing a particular collection, because this prevents displaying a list of _all other_ collections. This happens when simply using the source checkout of `community.vmware`. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/cli/galaxy.py ##### ANSIBLE VERSION ```paste below [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 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible executable location = /Users/alancoding/.virtualenvs/awx_collection/bin/ansible python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] ``` 86606d3ca707e8836d2b956694bb55d3ae282aee ##### CONFIGURATION ```paste below ansible-config dump --only-changed ``` (collection path modification in steps) ##### OS / ENVIRONMENT N/A ##### STEPS TO REPRODUCE ``` base_dir=awx/plugins/collections/ansible_collections mkdir -p $base_dir/community git clone https://github.com/ansible-collections/vmware.git $base_dir/community/vmware ``` on the revision of this collection `2b277d44fa664443be679c13a66bdf2c60a75093` ``` ANSIBLE_COLLECTIONS_PATHS=awx/plugins/collections ansible-galaxy collection list -vvv ``` ##### EXPECTED RESULTS lists all the collections in the folder `awx/plugins/collections`, and gives `*` for the version of `community.vmware` because I don't expect that maintainers are necessarily including the version in their `galaxy.yml`. In this particular case, the file is: ```yaml --- namespace: community name: vmware # the version key is generated during the release by Zuul # https://github.com/ansible-network/releases/tree/master/ansible_releases/cmd # A script based on https://pypi.org/project/pbr/ will generate the version # key. The version value depends on the tag or the last git tag. readme: README.md authors: - Ansible (https://github.com/ansible) description: license_file: LICENSE tags: - cloud - vmware - virtualization dependencies: {} ``` Of course they're doing this, they're using tags and CI in their release process. As an example of a collection with _no_ `galaxy.yml` ``` # /Users/alancoding/.ansible/collections/ansible_collections Collection Version ---------------------- ----------- chrismeyersfsu.hax0r * ``` It should show the same thing for the vmware collection source checkout ##### ACTUAL RESULTS ``` ANSIBLE_COLLECTIONS_PATHS=awx/plugins/collections ansible-galaxy collection list -vvv [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-galaxy 2.11.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible executable location = /Users/alancoding/.virtualenvs/awx_collection/bin/ansible-galaxy python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] No config file found; using defaults [DEPRECATION WARNING]: ANSIBLE_COLLECTIONS_PATHS option, all PATH-type options are singular PATH , use the "ANSIBLE_COLLECTIONS_PATH" environment variable instead. This feature will be removed in version 2.14. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. Searching /Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections for collections Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/alancoding-cloud-0.0.1.tar.gz' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/alancoding-cloud-0.0.3.tar.gz' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/.tox' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/plugins/inventory/__pycache__' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/build_artifact/openstack-cloud-0.0.1-dev82.tar.gz' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/alancoding-cloud-0.0.2.tar.gz' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud/galaxy.yml' for collection build Found installed collection alancoding.cloud:0.0.3 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/openstack/cloud' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/amazon/aws/plugins/doc_fragments/__pycache__' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/amazon/aws/plugins/inventory/__pycache__' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/amazon/aws/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/amazon/aws/galaxy.yml' for collection build Found installed collection amazon.aws:0.1.0 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/amazon/aws' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/azure/azcollection/plugins/doc_fragments/__pycache__' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/azure/azcollection/plugins/inventory/__pycache__' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/azure/azcollection/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/azure/azcollection/galaxy.yml' for collection build Found installed collection azure.azcollection:0.1.3 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/azure/azcollection' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/google/cloud/plugins/inventory/__pycache__' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/google/cloud/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/google/cloud/galaxy.yml' for collection build Found installed collection google.cloud:0.0.9 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/google/cloud' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/ansible/posix/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/ansible/posix/galaxy.yml' for collection build Found installed collection ansible.posix:0.1.1 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/ansible/posix' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/ansible/amazon/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/ansible/amazon/galaxy.yml' for collection build Found installed collection ansible.amazon:0.1.0 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/ansible/amazon' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/theforeman/foreman/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/theforeman/foreman/galaxy.yml' for collection build Found installed collection theforeman.foreman:0.7.0 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/theforeman/foreman' Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/community/general/.git' for collection build Skipping '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/community/general/galaxy.yml' for collection build Found installed collection community.general:0.1.1 at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/community/general' ERROR! The collection galaxy.yml at '/Users/alancoding/Documents/tower/awx/plugins/collections/ansible_collections/community/vmware/galaxy.yml' is missing the following mandatory keys: version ``` It's bad that the command terminates so fragilely. This also just doesn't jive with the common, published, policies of first-class collections. It's also bad that it won't give a traceback for the error that happened. FYI to @Akasurde (I'd expect no change in vmware collection) @jborean93 (most likely expect change in CLI error handling)
https://github.com/ansible/ansible/issues/70180
https://github.com/ansible/ansible/pull/76596
9b79d6ba3582bb0ef339738b7e1ade879d00dfe3
05608b20e8f875d51866a184f8c579fe60498e05
2020-06-19T19:09:14Z
python
2022-08-02T15:46:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,168
["changelogs/fragments/70168-fix-delegate_facts-without-interpreter-set.yml", "lib/ansible/plugins/action/__init__.py", "test/integration/targets/delegate_to/aliases", "test/integration/targets/delegate_to/runme.sh", "test/integration/targets/delegate_to/verify_interpreter_delegate_facts.yml"]
2.9.10: UnboundLocalError: local variable 'module_style' referenced before assignment
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> after upgrade from 2.9.9 to 2.9.10 we see an exception in a task using ~~lineinfile~~ `delegate_facts=true` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.9.10 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_NOCOWS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = True ANSIBLE_PIPELINING(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = True ANSIBLE_SSH_ARGS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no CACHE_PLUGIN(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = .cache/facts CACHE_PLUGIN_TIMEOUT(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = 86400 COLLECTIONS_PATHS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = [u'/home/rmoser/Projects/puzzle/ansible-puzzle/collections_galaxy'] CONDITIONAL_BARE_VARS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = False DEFAULT_BECOME(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = True DEFAULT_BECOME_ASK_PASS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = False DEFAULT_BECOME_METHOD(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = sudo DEFAULT_BECOME_USER(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = root DEFAULT_FORKS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = 20 DEFAULT_GATHERING(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = smart DEFAULT_HOST_LIST(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = [u'/home/rmoser/Projects/puzzle/ansible-puzzle/inventories/cloud_staging'] DEFAULT_LOAD_CALLBACK_PLUGINS(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = False DEFAULT_MANAGED_STR(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = Warning: File is managed by Ansible DEFAULT_PRIVATE_KEY_FILE(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = /home/rmoser/.ssh/id_rsa DEFAULT_REMOTE_USER(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = ansible DEFAULT_ROLES_PATH(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = [u'/home/rmoser/Projects/puzzle/ansible-puzzle/roles_galaxy', u'/home/rmoser/Projects/puzzle/ansible-puzzle/roles'] DEFAULT_STDOUT_CALLBACK(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = yaml HOST_KEY_CHECKING(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = True INTERPRETER_PYTHON(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = auto RETRY_FILES_ENABLED(/home/rmoser/Projects/puzzle/ansible-puzzle/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml --- - hosts: my.example.com gather_facts: yes tasks: - name: make something delegate_facts: True delegate_to: other.example.com lineinfile: path: /tmp/foo.txt regexp: '^Listen ' insertafter: '^#Listen ' line: Listen 8080 ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below The full traceback is: Traceback (most recent call last): File "/home/rmoser/Projects/resmo/ansible/lib/ansible/executor/task_executor.py", line 146, in run res = self._execute() File "/home/rmoser/Projects/resmo/ansible/lib/ansible/executor/task_executor.py", line 654, in _execute result = self._handler.run(task_vars=variables) File "/home/rmoser/Projects/resmo/ansible/lib/ansible/plugins/action/normal.py", line 46, in run result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async)) File "/home/rmoser/Projects/resmo/ansible/lib/ansible/plugins/action/__init__.py", line 831, in _execute_module (module_style, shebang, module_data, module_path) = self._configure_module(module_name=module_name, module_args=module_args, task_vars=task_vars) File "/home/rmoser/Projects/resmo/ansible/lib/ansible/plugins/action/__init__.py", line 244, in _configure_module return (module_style, module_shebang, module_data, module_path) UnboundLocalError: local variable 'module_style' referenced before assignment fatal: [server.example.com]: FAILED! => msg: Unexpected failure during module execution. stdout: '' ```
https://github.com/ansible/ansible/issues/70168
https://github.com/ansible/ansible/pull/70171
b2d6db7916c8e65c1d6855706e3f2f5a33255b4e
eaf6086eeab3ffc0389694a037c776cd3d6ac0b5
2020-06-19T11:42:43Z
python
2020-06-22T14:07:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,157
["docs/docsite/rst/dev_guide/developing_collections.rst"]
[1]Umlauts not handled properly in `ansible-galaxy collection init`
### SUMMARY When I create a new collection with an umlaut in the name, `ansible-galaxy` produces a wrong name string in `galaxy.yml`. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/frank/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible python version = 3.7.7 (default, Mar 13 2020, 10:23:39) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION ```paste below ``` ##### OS / ENVIRONMENT Fedora 31 Silverblue ##### STEPS TO REPRODUCE ```yaml ansible-galaxy collection init abcö ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS `abcö/galaxy.yml` ``` … name: "abcö" … ``` ##### ACTUAL RESULTS `abcö/galaxy.yml` ``` … name: "abc\xF6" … ```
https://github.com/ansible/ansible/issues/70157
https://github.com/ansible/ansible/pull/71639
2f240f5dd7c6cc99c8c7eed57a58d7106a6fdda5
bbd4ec13f1a2ceba493054fa6e846d749d9a875e
2020-06-19T00:49:11Z
python
2020-09-04T19:37:44Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,147
["changelogs/fragments/collection-list-site-packages.yaml", "lib/ansible/cli/galaxy.py", "test/integration/targets/ansible-galaxy/runme.sh"]
`ansible-galaxy collection list` vs site-packages
##### SUMMARY `ansible-base collection list` doesn't show the packages installed by the new `ansible` package As a workaround, you need to do: ``` COLLECTION_INSTALL=$(python -c 'import ansible, os.path ; print("%s/../ansible_collections" % os.path.dirname(ansible.__file__))') ansible-galaxy collection list -p "$COLLECTION_INSTALL" ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-galaxy ##### ANSIBLE VERSION ```paste below 2.10 beta1 ``` ##### CONFIGURATION ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> 1. Install Ansible 2.10.0a1 https://pypi.python.org/packages/source/a/ansible/ansible-2.10.0a1.tar.gz 2. `ansible-galaxy collection list` ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/70147
https://github.com/ansible/ansible/pull/70173
0a60e5e341f9a781c27462e047ebe0f73129f4a1
e7dee73774b0b436551e4993ba917eec1e03af2d
2020-06-18T18:36:33Z
python
2020-12-10T23:59:33Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,050
["lib/ansible/executor/task_executor.py", "test/integration/targets/templating_lookups/runme.sh", "test/integration/targets/templating_lookups/runme.yml", "test/integration/targets/templating_lookups/template_lookups/tasks/errors.yml", "test/integration/targets/templating_lookups/template_lookups/tasks/main.yml"]
Templating errors exit loop with ignore_errors early
##### SUMMARY Behavior of failures inside of loops is inconsistent between "fatal" and "failed" outcomes. The "fatal" loop task loses data that one should reasonably expect to find in the `register` variable. It doesn't continue past the failed item, even though "failed" outcomes do, and templating errors can be specific to the `item` in the loop. This limits the parameterization which can be done in integration tests, making them more verbose. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/plugins/strategy/linear.py ##### ANSIBLE VERSION ``` ansible 2.10.0.dev0 config file = None configured module search path = ['/Users/alancoding/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/alancoding/Documents/repos/ansible/lib/ansible executable location = /Users/alancoding/.virtualenvs/ansible3/bin/ansible python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ##### CONFIGURATION defaults ##### OS / ENVIRONMENT N/A, all local ##### STEPS TO REPRODUCE playbook: ```yaml - hosts: all gather_facts: false connection: local vars: loop_seq: [0, 0, 1] tasks: # expected case - name: Loop that fails due to task and ignores errors debug: msg="hello" failed_when: item == 0 ignore_errors: true register: result loop: "{{ loop_seq }}" - debug: var=result # the undesired case - name: Loop that fails due to templating error in first entry and ignores errors debug: msg="{{ 5 / item }}" ignore_errors: true register: result loop: "{{ loop_seq }}" - debug: var=result ``` ##### EXPECTED RESULTS I expect to have generally the same ability to process errors in the registered `result` for both of the 2 tasks in that playbook that fail. The task that fails due to `failed_when` (works same as `failed:`) exhibits desired behavior. ``` TASK [Loop that fails due to task and ignores errors] ******************************************************************************************************************************* failed: [localhost] (item=0) => { "msg": "hello" } failed: [localhost] (item=0) => { "msg": "hello" } ok: [localhost] => (item=1) => { "msg": "hello" } fatal: [localhost]: FAILED! => {"msg": "All items completed"} ...ignoring TASK [debug] ************************************************************************************************************************************************************************ ok: [localhost] => { "result": { "changed": false, "failed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": false, "failed": true, "failed_when_result": true, "item": 0, "msg": "hello" }, { "ansible_loop_var": "item", "changed": false, "failed": true, "failed_when_result": true, "item": 0, "msg": "hello" }, { "ansible_loop_var": "item", "changed": false, "failed": false, "failed_when_result": false, "item": 1, "msg": "hello" } ] } } ``` With this, I can make assertions that multiple elements in the loop are failed. I can check that both `result.results[0].failed` and `result.results[1].failed` are `true`. Additionally, the ignored failure does not prevent the task from running with the 3rd value, which doesn't fail. ##### ACTUAL RESULTS I can't make any kind of item-by-item assertions about templating, because it exits on the first item in the loop, and it doesn't give any return data like `result.results`. It still ignores the overall loop errors and continues execution of the playbook. ``` TASK [Loop that fails due to templating error in first entry and ignores errors] **************************************************************************************************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ZeroDivisionError: division by zero fatal: [localhost]: FAILED! => {"msg": "Unexpected failure during module execution."} ...ignoring TASK [debug] ************************************************************************************************************************************************************************ ok: [localhost] => { "result": { "exception": "Traceback (most recent call last):\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/executor/task_executor.py\", line 112, in run\n item_results = self._run_loop(items)\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/executor/task_executor.py\", line 366, in _run_loop\n res = self._execute(variables=task_vars)\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/executor/task_executor.py\", line 587, in _execute\n self._task.post_validate(templar=templar)\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/playbook/task.py\", line 296, in post_validate\n super(Task, self).post_validate(templar)\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/playbook/base.py\", line 431, in post_validate\n value = templar.template(getattr(self, name))\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/template/__init__.py\", line 627, in template\n disable_lookups=disable_lookups,\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/template/__init__.py\", line 582, in template\n disable_lookups=disable_lookups,\n File \"/Users/alancoding/.virtualenvs/ansible29/lib/python3.7/site-packages/ansible/template/__init__.py\", line 841, in do_template\n res = j2_concat(rf)\n File \"<template>\", line 12, in root\nZeroDivisionError: division by zero\n", "failed": true, "msg": "Unexpected failure during module execution.", "stdout": "" } } ``` I can appreciate the need to separate failed/fatal cases, but I cannot convince myself that this error is caught in the right layer. The templated value `"{{ 5 / item }}"` obviously changes with each item in the loop. If the end result of the loop is going to be ignored (not halt playbook execution), then all of the items in the loop should be tried.
https://github.com/ansible/ansible/issues/70050
https://github.com/ansible/ansible/pull/70240
cc2cee6980dc53378b16d42c7988524c5e1be83b
30e70f4b6356e692c7ade3dd95f2e55d07f3e8f5
2020-06-13T14:06:54Z
python
2020-06-30T13:31:58Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,024
["docs/docsite/rst/dev_guide/developing_modules_general.rst", "docs/docsite/rst/dev_guide/developing_program_flow_modules.rst"]
Add example of how to use the required_if and other parts of argspec in modules
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> Based on a request in IRC: Currently, the only documentation about `required_if` exists in the Windows module development doc: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general_windows.html There may be other parts of the argspec we don't currently document clearly as well. Steps to fix this include: - [ ] add that detail to https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general - [ ] Add examples as well. This can be taken from the source code - https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/common/validation.py#L198-L237 - [ ] Verify ^^^ that page should is still accurate, especially the example code. - [ ] Add relevant details to this page as well https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#ansiblemodule <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/70024
https://github.com/ansible/ansible/pull/72335
569d937df8cfc2bd0e4c9f62b5b25021ae5e5cc1
01d207a3e344ab8e2c79085eb1a9a1efd8f65f80
2020-06-11T19:09:10Z
python
2020-11-04T17:17:46Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,017
["changelogs/fragments/70017-avoid-params-to-callable-checkers.yml", "lib/ansible/module_utils/basic.py", "test/units/module_utils/basic/test_argument_spec.py"]
arguments_spec fails if elements is a type (vs a string)
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY Since https://github.com/ansible/ansible/pull/57145, `elements=str` in Arguments_spec raises an error. We need to use elements="str" instead. I've done a workaround for VMware ( ansible-collections/vmware#235 ), but we may see more cases like that in the future. Is this an expected behaviour? ```python associable_object_types=dict( type='list', elements=str, ), ``` The error: ``` The full traceback is: File "/tmp/ansible_vmware_category_payload_w4g0m32x/ansible_vmware_category_payload.zip/ansible/module_utils/basic.py", line 1775, in _handle_elements validated_params.append(type_checker(value, **kwargs)) fatal: [testhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "associable_object_types": [ "Folder" ], "category_cardinality": "multiple", "category_description": "Folder", "category_name": "Folder", "hostname": "vcenter.test", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 443, "protocol": "https", "state": "present", "username": "[email protected]", "validate_certs": false } }, "msg": "Elements value for option associable_object_types is of type <class 'str'> and we were unable to convert to str: 'param' is an invalid keyword argument for str()" } ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/module_utils/basic.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel ```
https://github.com/ansible/ansible/issues/70017
https://github.com/ansible/ansible/pull/70151
87406890cf82d24ea78509e55bf94f2cf801dc6a
bc0541510938dcbe14803e37e0081ec082d796f1
2020-06-11T17:46:11Z
python
2020-06-19T13:52:05Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,009
["lib/ansible/galaxy/collection.py", "test/units/cli/galaxy/test_collection_extract_tar.py"]
`ansible-galaxy collection install` explodes for some collections on `devel`
#### SUMMARY <!--- Explain the problem briefly below --> Installing `amazon.aws` collection fails on ansible/ansible@devel, supposedly because of the embedded symlinks: ```console ERROR! Unexpected Exception, this is probably a bug: "filename 'tests/unit/mod ules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_ lag_status' not found" ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ansible-galaxy CLI ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> devel ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> N/A ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> N/A ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Running the install should be enough: <!--- Paste example playbooks or commands between quotes below --> ```console $ ANSIBLE_DEBUG=1 ansible-galaxy -vvvv collection install amazon.aws ``` ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> The collection install should succeed. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```python-traceback Exception, this is probably a bug: "filename 'tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status' not found" the full traceback was: Traceback (most recent call last): File "/home/bcoca/work/ansible/bin/ansible-galaxy", line 123, in <module> exit_code = cli.run() File "/home/bcoca/work/ansible/lib/ansible/cli/galaxy.py", line 490, in run context.CLIARGS['func']() File "/home/bcoca/work/ansible/lib/ansible/cli/galaxy.py", line 1057, in execute_install self._execute_install_collection(collection_requirements, collection_path) File "/home/bcoca/work/ansible/lib/ansible/cli/galaxy.py", line 1079, in _execute_install_collection no_deps, force, force_with_deps, allow_pre_release=allow_pre_release) File "/home/bcoca/work/ansible/lib/ansible/galaxy/collection.py", line 675, in install_collections collection.install(output_path, b_temp_path) File "/home/bcoca/work/ansible/lib/ansible/galaxy/collection.py", line 250, in install self.install_artifact(b_collection_path, b_temp_path) File "/home/bcoca/work/ansible/lib/ansible/galaxy/collection.py", line 275, in install_artifact _extract_tar_dir(collection_tar, file_name, b_collection_path) File "/home/bcoca/work/ansible/lib/ansible/galaxy/collection.py", line 1387, in _extract_tar_dir tar_member = tar.getmember(to_native(dirname, errors='surrogate_or_strict')) File "/usr/lib/python3.7/tarfile.py", line 1752, in getmember raise KeyError("filename %r not found" % name) KeyError: "filename 'tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status' not found" ```
https://github.com/ansible/ansible/issues/70009
https://github.com/ansible/ansible/pull/70016
2609482975255b829dd6e99b258711c55f60b4d6
d45cb01b845d78779877325f03f2d1ab74e1f6b4
2020-06-11T15:00:13Z
python
2020-06-15T21:36:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
70,000
["lib/ansible/executor/play_iterator.py", "test/integration/targets/blocks/always_failure_no_rescue_rc.yml", "test/integration/targets/blocks/always_failure_with_rescue_rc.yml", "test/integration/targets/blocks/always_no_rescue_rc.yml", "test/integration/targets/blocks/runme.sh"]
ansible-playbook returns 0 when failure occures in always block after rescue was used
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY https://github.com/ansible/ansible/issues/31543#issuecomment-390455919 @mixja wrote: To add to this, if you rescue a block and then have a failure in the always section, the playbook will exit with a failure message, however the shell exit code is 0 (success). If you don't have a rescue block, failures in the always section do fail and correctly return an non-zero (error) shell exit code. Also discovered this in https://github.com/linux-system-roles/network/pull/232#discussion_r435540835 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ansible-playbook ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.9 config file = /home/till/.ansible.cfg configured module search path = ['/home/till/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible python version = 3.8.3 (default, May 15 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: block always failure hosts: localhost gather_facts: no tasks: - block: - debug: msg="Hello" - fail: msg="Initial failure" rescue: - debug: msg="Rescued" always: - fail: msg="Failed" ``` ansible-playbook testfail.yml -i localhost; echo $? <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ``` PLAY RECAP ************************************************************************************************************************************************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=1 ignored=0 1 ``` or some other returncode than 0 ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ansible-playbook 2.9.9 config file = /home/till/.ansible.cfg configured module search path = ['/home/till/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.8.3 (default, May 15 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] Using /home/till/.ansible.cfg as config file setting up inventory plugins host_list declined parsing /home/till/localhost 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 /home/till/localhost as it did not pass its verify_file() method auto declined parsing /home/till/localhost 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 /home/till/localhost 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 /home/till/localhost 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 /home/till/localhost as it did not pass its verify_file() method [WARNING]: Unable to parse /home/till/localhost as an inventory source [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 /usr/lib/python3.8/site-packages/ansible/plugins/callback/default.py PLAYBOOK: testfail.yml ************************************************************************************************************************************************************************************* Positional arguments: testfail.yml verbosity: 4 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/home/till/localhost',) forks: 5 1 plays in testfail.yml PLAY [block always failure] ******************************************************************************************************************************************************************************** META: ran handlers TASK [debug] *********************************************************************************************************************************************************************************************** task path: /home/till/testfail.yml:6 ok: [localhost] => { "msg": "Hello" } TASK [fail] ************************************************************************************************************************************************************************************************ task path: /home/till/testfail.yml:7 fatal: [localhost]: FAILED! => { "changed": false, "msg": "Initial failure" } TASK [debug] *********************************************************************************************************************************************************************************************** task path: /home/till/testfail.yml:9 ok: [localhost] => { "msg": "Rescued" } TASK [fail] ************************************************************************************************************************************************************************************************ task path: /home/till/testfail.yml:11 fatal: [localhost]: FAILED! => { "changed": false, "msg": "Failed" } PLAY RECAP ************************************************************************************************************************************************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=1 ignored=0 0 ```
https://github.com/ansible/ansible/issues/70000
https://github.com/ansible/ansible/pull/70094
33e25504ac1211559e47ba35b6163b502e7dbc32
0ed5b7737708127899762ba768af93cae11e116a
2020-06-11T06:57:11Z
python
2020-06-18T16:03:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,983
["changelogs/fragments/70318-dnf-add-nobest-option.yml", "lib/ansible/modules/dnf.py", "test/integration/targets/dnf/tasks/main.yml", "test/integration/targets/dnf/tasks/nobest.yml"]
Add --nobest to dnf module
<!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Describe the new feature/improvement briefly below --> dnf has a nobest [option](https://dnf.readthedocs.io/en/latest/command_ref.html#options-label) which does the following: > --nobest > Set best option to False, so that transactions are not limited to best candidates only. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> dnf ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> Docker cannot be installed on CentOS8 without `--nobest` option and later on every time you want to do dnf upgrade you should pass `--nobest` option again, so that it does not complain about `docker-ce` package.
https://github.com/ansible/ansible/issues/69983
https://github.com/ansible/ansible/pull/70318
205eda335fbd23c0aaace869542045ec7a40319f
9d2982549d5af1e64b8df20f7a60adae5f351a4a
2020-06-10T11:48:09Z
python
2020-07-27T10:02:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,963
["changelogs/fragments/ensure_discovery_delegate.yml", "lib/ansible/plugins/action/__init__.py", "test/integration/targets/delegate_to/discovery_applied.yml", "test/integration/targets/delegate_to/runme.sh"]
Interpreter discovery error leads to undefined error
When using delegation to a non localhost entry (possibly any entry w/o ansible_python_interpreter defined). ``` An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnboundLocalError: local variable 'module_style' referenced before assignment fatal: [me]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""} ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> interpreter_discovery ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel (2.9 works) ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> any ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Have at least one host w/o ansible_python_interpreter defined and delegate to it. <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: all gather_facts: no tasks: - command: hostname delegate_to: "{{ item }}" with_items: - localhost - "{{ inventory_hostname }}" ``` run ```ansible-playbook ~/test.yml -i me, -e ansible_connection=local``` but real hosts also work <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ``` changed: [me -> localhost] => (item=localhost) changed: [me -> me] => (item=me) ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> short message in summary, here is -vvv output <!--- Paste verbatim command output between quotes --> ```paste below task path: /home/bcoca/test.yml:4 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: bcoca <localhost> EXEC /bin/sh -c 'echo ~bcoca && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/bcoca/.ansible/tmp `"&& mkdir /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729 && echo ansible-tmp-1591711343.9575436-11872-36560578379729="` echo /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729 `" ) && sleep 0' Using module file /home/bcoca/work/ansible/lib/ansible/modules/command.py <localhost> PUT /home/bcoca/.ansible/tmp/ansible-local-11861uysw5vr0/tmprw25yp0h TO /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729/AnsiballZ_command.py <localhost> EXEC /bin/sh -c 'chmod u+x /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729/ /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729/AnsiballZ_command.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/lib/python-exec/python3.6/python /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729/AnsiballZ_command.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /home/bcoca/.ansible/tmp/ansible-tmp-1591711343.9575436-11872-36560578379729/ > /dev/null 2>&1 && sleep 0' changed: [me] => (item=localhost) => { "ansible_loop_var": "item", "changed": true, "cmd": [ "hostname" ], "delta": "0:00:00.001170", "end": "2020-06-09 10:02:24.175489", "invocation": { "module_args": { "_raw_params": "hostname", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": true } }, "item": "localhost", "rc": 0, "start": "2020-06-09 10:02:24.174319", "stderr": "", "stderr_lines": [], "stdout": "erebos", "stdout_lines": [ "erebos" ] } <me> ESTABLISH LOCAL CONNECTION FOR USER: bcoca <me> EXEC /bin/sh -c 'echo ~bcoca && sleep 0' <me> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/bcoca/.ansible/tmp `"&& mkdir /home/bcoca/.ansible/tmp/ansible-tmp-1591711344.1984553-11872-223967576967825 && echo ansible-tmp-1591711344.1984553-11872-223967576967825="` echo /home/bcoca/.ansible/tmp/ansible-tmp-1591711344.1984553-11872-223967576967825 `" ) && sleep 0' <me> Attempting python interpreter discovery <me> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; 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' <me> EXEC /bin/sh -c '/usr/bin/python && sleep 0' <me> Python interpreter discovery fallback (unsupported Linux distribution: gentoo) <me> Attempting python interpreter discovery <me> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; 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' <me> EXEC /bin/sh -c '/usr/bin/python && sleep 0' <me> Python interpreter discovery fallback (unsupported Linux distribution: gentoo) <me> EXEC /bin/sh -c 'rm -f -r /home/bcoca/.ansible/tmp/ansible-tmp-1591711344.1984553-11872-223967576967825/ > /dev/null 2>&1 && sleep 0' The full traceback is: Traceback (most recent call last): File "/home/bcoca/work/ansible/lib/ansible/executor/task_executor.py", line 121, in run item_results = self._run_loop(items) File "/home/bcoca/work/ansible/lib/ansible/executor/task_executor.py", line 375, in _run_loop res = self._execute(variables=task_vars) File "/home/bcoca/work/ansible/lib/ansible/executor/task_executor.py", line 669, in _execute result = self._handler.run(task_vars=variables) File "/home/bcoca/work/ansible/lib/ansible/plugins/action/command.py", line 24, in run results = merge_hash(results, self._execute_module(task_vars=task_vars, wrap_async=wrap_async)) File "/home/bcoca/work/ansible/lib/ansible/plugins/action/__init__.py", line 844, in _execute_module (module_style, shebang, module_data, module_path) = self._configure_module(module_name=module_name, module_args=module_args, task_vars=task_vars) File "/home/bcoca/work/ansible/lib/ansible/plugins/action/__init__.py", line 256, in _configure_module return (module_style, module_shebang, module_data, module_path) UnboundLocalError: local variable 'module_style' referenced before assignment fatal: [me]: FAILED! => { "msg": "Unexpected failure during module execution.", "stdout": "" } ```
https://github.com/ansible/ansible/issues/69963
https://github.com/ansible/ansible/pull/70013
8ffaed00f87f1ae41f86cb4a7fe399d8aa339286
4c9d9dbb56273c632d391a355fdb35504cc92be3
2020-06-09T14:02:44Z
python
2020-06-11T22:04:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,954
["changelogs/fragments/deprecate_default_call_fragmentless.yml", "lib/ansible/plugins/callback/default.py"]
default value 'show_per_host_start' is missing
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY When enabling zuul's executor verbose status for ansible, there are a lot of traces like: ``` 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b'(<ansible.plugins.callback.zuul_unreachable.CallbackModule object at' 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b"0x7f0d248e2c10>): 'show_per_host_start'" 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b'Callback Exception:' 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b' File "/usr/local/lib/zuul/ansible/2.9/lib/python3.7/site-packages/ansible/executor/task_queue_manager.py", line 324, in send_callback' 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b' method(*new_args, **kwargs)' 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b' File "/usr/local/lib/zuul/ansible/2.9/lib/python3.7/site-packages/ansible/plugins/callback/default.py", line 256, in v2_runner_on_start' 2020-06-08 17:33:29,930 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b" if self.get_option('show_per_host_start'):" 2020-06-08 17:33:29,931 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b' File "/usr/local/lib/zuul/ansible/2.9/lib/python3.7/site-packages/ansible/plugins/callback/__init__.py", line 91, in get_option' 2020-06-08 17:33:29,931 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b' return self._plugin_options[k]' 2020-06-08 17:33:30,126 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b'Using module file /usr/local/lib/zuul/ansible/2.9/lib/python3.7/site-packages/ansible/modules/system/setup.py' 2020-06-08 17:33:30,126 DEBUG zuul.AnsibleJob.output: [e: 26a6cd8eb86144b9871b4841690cca62] [build: 71bc75c1ccc448aaa064ae393fe6ae51] Ansible output: b'Pipelining is enabled.' ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> !component ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.9 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/zuul/ansible/2.9/lib/python3.7/site-packages/ansible executable location = /usr/local/lib/zuul/ansible/2.9/bin/ansible python version = 3.7.7 (default, Apr 23 2020, 14:54:40) [GCC 8.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> config per playbooks used by zuul is defined in https://opendev.org/zuul/zuul/src/branch/master/zuul/executor/server.py#L2019-L2109 no show_per_host_start config is written, but ansible source shows that a default value should be defined, see "EXPECTED RESULTS" below ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> docker image zuul/zuul-executor image:7e5160e0f9b0 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> run zuul quick-start tutorial https://zuul-ci.org/docs/zuul/tutorials/quick-start.html enable executor debug logging: add `doc/source/examples/etc_zuul/logging.conf` ``` [loggers] keys=root,zuul [handlers] keys=console [formatters] keys=simple [logger_root] level=INFO handlers=console [logger_zuul] level=DEBUG handlers=console qualname=zuul propagate=0 [handler_console] level=DEBUG class=StreamHandler formatter=simple args=(sys.stdout,) [formatter_simple] format=%(asctime)s %(levelname)s %(name)s: %(message)s datefmt= ``` in `doc/source/examples/etc_zuul/zuul.conf` add `log_config=/etc/zuul/logging.conf` to `[executor]` perform steps manually or using `ansible-playbook -v playbooks/quick-start/localtest.yaml` when executor container is up and executor is available, run: `docker exec examples_executor_1 zuul-executor verbose` <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> default value defined in https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/default.py#L56-L60 and/or https://github.com/ansible/ansible/blob/devel/lib/ansible/config/base.yml updated to include default value as described in https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/doc_fragments/default_callback.py#L58-L68 ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/69954
https://github.com/ansible/ansible/pull/69972
f1ab7cf0c65f6ff6e6f25f787e18beb127b12f46
805dff41290af657d21b00567c418c338f42e720
2020-06-08T20:55:14Z
python
2020-06-10T12:35:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,930
["changelogs/fragments/crypt-oserror.yml", "lib/ansible/utils/encrypt.py"]
password_hash('bcrypt') fails with python 3.9
##### SUMMARY Evaluating `"{{ 'changeme' | password_hash('bcrypt') }}"` results in: ``` The full traceback is: Traceback (most recent call last): File "/home/orion/ansible/lib/ansible/executor/task_executor.py", line 155, in run res = self._execute() File "/home/orion/ansible/lib/ansible/executor/task_executor.py", line 599, in _execute self._task.post_validate(templar=templar) File "/home/orion/ansible/lib/ansible/playbook/task.py", line 299, in post_validate super(Task, self).post_validate(templar) File "/home/orion/ansible/lib/ansible/playbook/base.py", line 431, in post_validate value = templar.template(getattr(self, name)) File "/home/orion/ansible/lib/ansible/template/__init__.py", line 747, in template d[k] = self.template( File "/home/orion/ansible/lib/ansible/template/__init__.py", line 701, in template result = self.do_template( File "/home/orion/ansible/lib/ansible/template/__init__.py", line 966, in do_template res = j2_concat(rf) File "<template>", line 12, in root File "/home/orion/ansible/lib/ansible/plugins/filter/core.py", line 270, in get_encrypted_password return passlib_or_crypt(password, hashtype, salt=salt, salt_size=salt_size, rounds=rounds) File "/home/orion/ansible/lib/ansible/utils/encrypt.py", line 193, in passlib_or_crypt return CryptHash(algorithm).hash(secret, salt=salt, salt_size=salt_size, rounds=rounds) File "/home/orion/ansible/lib/ansible/utils/encrypt.py", line 90, in hash return self._hash(secret, salt, rounds) File "/home/orion/ansible/lib/ansible/utils/encrypt.py", line 109, in _hash result = crypt.crypt(secret, saltstring) File "/usr/lib64/python3.9/crypt.py", line 82, in crypt return _crypt.crypt(word, salt) OSError: [Errno 22] Invalid argument fatal: [pfsense-test]: FAILED! => { "msg": "Unexpected failure during module execution.", "stdout": "" } ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME encrypt ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.10.0.dev0 config file = /home/orion/ansible-pfsense/ansible.cfg configured module search path = ['/home/orion/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/orion/ansible/lib/ansible executable location = /home/orion/ansible/bin/ansible python version = 3.9.0b1 (default, May 29 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] ``` Current develop head ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_HOST_LIST(/home/orion/ansible-pfsense/ansible.cfg) = ['/home/orion/ansible-pfsense/hosts'] DEFAULT_REMOTE_USER(/home/orion/ansible-pfsense/ansible.cfg) = root ``` ##### OS / ENVIRONMENT host is Fedora Rawhide (F33). ##### STEPS TO REPRODUCE ```yaml --- - hosts: pfsense tasks: - debug: msg: "{{ 'changeme' | password_hash('bcrypt') }}" This seems related: https://bitbucket.org/ecollins/passlib/issues/115 https://bugs.python.org/issue39289
https://github.com/ansible/ansible/issues/69930
https://github.com/ansible/ansible/pull/70246
ebd20ddca66224e4614a031ccc972452dcc0dd20
2531d548800d916b13ebecf4d5ebc63d50cff949
2020-06-07T02:54:08Z
python
2020-06-24T18:50:28Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,905
["changelogs/fragments/configurable_pipelining.yml", "lib/ansible/plugins/action/__init__.py", "lib/ansible/plugins/connection/ssh.py"]
Documentation conflicts about which ini section to use to enable pipelining
##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> The [main configuration documentation](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-pipelining) says that pipelining is enabled in the `ssh_connection` or `connection` section. The [ssh connection plugin](https://docs.ansible.com/ansible/latest/plugins/connection/ssh.html#parameter-pipelining) configuration says pipelining should be enabled in the `defaults` section. #31125 (and the associated commit) seems to imply that the `ssh_connection` section is legacy, but the comments (https://github.com/ansible/ansible/issues/31125#issuecomment-334071699) seem to say otherwise. The actual sections (as demonstrated in the configuration section below) that works are `ssh_connection` and `connection`. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME ssh ##### ANSIBLE VERSION ```paste below ansible 2.9.9 config file = /c/xxx/ansible/ansible.cfg configured module search path = ['/c/Users/bendem/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /c/Users/bendem/.local/share/virtualenvs/ansible-oaopcvR0/lib/python3.8/site-packages/ansible executable location = /c/Users/bendem/.local/share/virtualenvs/ansible-oaopcvR0/bin/ansible python version = 3.8.3 (default, May 18 2020, 08:39:23) [GCC 9.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> With `[defaults]\npipelining = true` ``` ALLOW_WORLD_READABLE_TMPFILES(/c/xxx/ansible/ansible.cfg) = False ANSIBLE_SSH_EXECUTABLE(/c/xxx/ansible/ansible.cfg) = /usr/bin/ssh ANSIBLE_SSH_RETRIES(/c/xxx/ansible/ansible.cfg) = 1 DEFAULT_HOST_LIST(/c/xxx/ansible/ansible.cfg) = ['/c/xxx/ansible/inventory/inventory.ini'] DEFAULT_ROLES_PATH(/c/xxx/ansible/ansible.cfg) = ['/c/xxx/ansible/vendors/roles', '/c/xxx/ansible/roles'] DEFAULT_VAULT_ID_MATCH(/c/xxx/ansible/ansible.cfg) = true DIFF_ALWAYS(/c/xxx/ansible/ansible.cfg) = True INTERPRETER_PYTHON(/c/xxx/ansible/ansible.cfg) = /usr/bin/python3 INVENTORY_UNPARSED_IS_FAILED(/c/xxx/ansible/ansible.cfg) = True ``` With `[ssh_connection]\npipelining = true` ```paste below ALLOW_WORLD_READABLE_TMPFILES(/c/xxx/ansible/ansible.cfg) = False ANSIBLE_PIPELINING(/c/xxx/ansible/ansible.cfg) = True ANSIBLE_SSH_EXECUTABLE(/c/xxx/ansible/ansible.cfg) = /usr/bin/ssh ANSIBLE_SSH_RETRIES(/c/xxx/ansible/ansible.cfg) = 1 DEFAULT_HOST_LIST(/c/xxx/ansible/ansible.cfg) = ['/c/xxx/ansible/inventory/inventory.ini'] DEFAULT_ROLES_PATH(/c/xxx/ansible/ansible.cfg) = ['/c/xxx/ansible/vendors/roles', '/c/xxx/ansible/roles'] DEFAULT_VAULT_ID_MATCH(/c/xxx/ansible/ansible.cfg) = true DIFF_ALWAYS(/c/xxx/ansible/ansible.cfg) = True INTERPRETER_PYTHON(/c/xxx/ansible/ansible.cfg) = /usr/bin/python3 INVENTORY_UNPARSED_IS_FAILED(/c/xxx/ansible/ansible.cfg) = True ``` With `[connection]\npipelining = true` ```paste below ALLOW_WORLD_READABLE_TMPFILES(/c/xxx/ansible/ansible.cfg) = False ANSIBLE_PIPELINING(/c/xxx/ansible/ansible.cfg) = True ANSIBLE_SSH_EXECUTABLE(/c/xxx/ansible/ansible.cfg) = /usr/bin/ssh ANSIBLE_SSH_RETRIES(/c/xxx/ansible/ansible.cfg) = 1 DEFAULT_HOST_LIST(/c/xxx/ansible/ansible.cfg) = ['/c/xxx/ansible/inventory/inventory.ini'] DEFAULT_ROLES_PATH(/c/xxx/ansible/ansible.cfg) = ['/c/xxx/ansible/vendors/roles', '/c/xxx/ansible/roles'] DEFAULT_VAULT_ID_MATCH(/c/xxx/ansible/ansible.cfg) = true DIFF_ALWAYS(/c/xxx/ansible/ansible.cfg) = True INTERPRETER_PYTHON(/c/xxx/ansible/ansible.cfg) = /usr/bin/python3 INVENTORY_UNPARSED_IS_FAILED(/c/xxx/ansible/ansible.cfg) = True ``` ##### OS / ENVIRONMENT Windows 10, msys2 python3, not that it matters. ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/69905
https://github.com/ansible/ansible/pull/69920
4a4a11d2826d9a76b2e2d86147186b6c214dbd1c
8c3eb7ae4ac902b045620cef911059f0816ddbfb
2020-06-05T09:23:13Z
python
2020-06-11T20:17:58Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,881
["changelogs/fragments/69881-add_host-show-changed.yml", "lib/ansible/plugins/action/add_host.py", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/add_host/tasks/main.yml"]
add_host always returns as 'changed' even if no change is made
##### SUMMARY add_host will return 'changed' for every invocation, it does not matter if the host already existed and no changes were actually made to inventory ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> add_host ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.7, 2.8, 2.9, 2.10 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> all ##### STEPS TO REPRODUCE Simplest example, but also happens when specifying variables and/or groups test.yml ```yaml - hosts: localhost gather_facts: false tasks: - add_host: name=testhost ``` test_inv.ini ```ini testhost ``` run: ``` ansible-playbook -i test_inv.ini test.yml``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ``` _________________ < TASK [add_host] > ----------------- \ ,__, \ (oo)____ (__) )\ ||--|| * OK: [localhost] ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below _________________ < TASK [add_host] > ----------------- \ ,__, \ (oo)____ (__) )\ ||--|| * changed: [localhost] ```
https://github.com/ansible/ansible/issues/69881
https://github.com/ansible/ansible/pull/69897
062e780a68f9acd2ee6f824f252458b8a0351f24
efe103cdff39326f27e12616d3cee76e7f30226c
2020-06-04T14:09:13Z
python
2020-06-05T02:01:56Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,867
["lib/ansible/cli/galaxy.py", "test/integration/targets/ansible-galaxy/runme.sh"]
`ansible-galaxy role info` broken for uninstalled roles by PR#67409
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> Changes in PR #67409 mean that `ansible-galaxy role info` fails too early, complaining that a role does not exist, before ever actually fetching data from the API. It can only give information about roles that have already been installed now and is unable to be used to learn about roles _before_ installation. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ansible-galaxy ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.10.0.dev0 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/calvin/projects/ansible/lib/ansible executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible python version = 3.6.9 (default, Jul 3 2019, 17:57:57) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below [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. DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30 GALAXY_SERVER_LIST(/etc/ansible/ansible.cfg) = ['automation_hub', 'galaxy', 'galaxy_dev', 'automation_hub_ci', 'automation_hub_qa', 'automation_hub_local'] PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 60 PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 30 ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Fedora 30 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml # Fails, if you don't already have this role installed ansible-galaxy role info orionuser1.ansible_role_logstash ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> The information parsed from the Galaxy V1 Role API ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below - the role orionuser1.ansible_role_logstash was not found ```
https://github.com/ansible/ansible/issues/69867
https://github.com/ansible/ansible/pull/69924
32c392e622976b9921720f6961d4e871a88b7646
3815ed67d53d3874d8f1b5d232ac77e127cab216
2020-06-03T19:13:05Z
python
2020-06-10T19:36:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,862
["lib/ansible/config/ansible_builtin_runtime.yml"]
Incorrect entries in ansible_builtin_runtime.yml file
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> Incorrect entries in `ansible_builtin_runtime.yml` Problematic lines: https://github.com/ansible/ansible/blob/devel/lib/ansible/config/ansible_builtin_runtime.yml#L2163 to https://github.com/ansible/ansible/blob/devel/lib/ansible/config/ansible_builtin_runtime.yml#L2178 The entries should be as below: ``` bigip_device_facts: redirect: f5networks.f5_modules.bigip_device_info bigip_iapplx_package: redirect: f5networks.f5_modules.bigip_lx_package bigip_security_address_list: redirect: f5networks.f5_modules.bigip_firewall_address_list bigip_security_port_list: redirect: f5networks.f5_modules.bigip_firewall_port_list bigip_traffic_group: redirect: f5networks.f5_modules.bigip_device_traffic_group bigip_facts: tombstone: removal_date: 2019-11-06 warning_text: bigip_facts has been removed please use bigip_device_info module bigip_gtm_facts: tombstone: removal_date: 2019-11-06 warning_text: bigip_gtm_facts has been removed please use bigip_device_info module ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> lib/ansible/config/ansible_builtin_runtime.yml ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/69862
https://github.com/ansible/ansible/pull/69865
22da903e9c4adc9ef2e99c794c5f7abeafa014bd
16f5dbf985f45bbd4aa199acb559772d9cdafa74
2020-06-03T17:42:23Z
python
2020-06-03T20:58:27Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,846
["changelogs/fragments/git_fixes.yml", "lib/ansible/modules/git.py"]
Git module: don't encourage MITM attacks
<!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY The Git module encourages use of `StrictHostKeyChecking=no` with SSH, which makes the connection vulnerable to a MITM attack. ##### ISSUE TYPE OpenSSH 7.5+ (2017-03-20) added a safer option which automatically accepts the key on first use but will not allow a MITM on subsequent connections: `StrictHostKeyChecking=accept-new` https://man.openbsd.org/ssh_config#StrictHostKeyChecking It would be great if Ansible encouraged use of that mode by default in the documentation and to implement features such as the Git module's [`accept_hostkey`](https://github.com/ansible/ansible/blob/323d2adfcce9a53e906c2c4a40f6ac5fb32a0e68/lib/ansible/modules/git.py#L1103-L1108) feature. ##### ANSIBLE VERSION ```paste below N/A ``` ##### COMPONENT NAME * `/modules/source_control/git.py`
https://github.com/ansible/ansible/issues/69846
https://github.com/ansible/ansible/pull/73404
be19863e44cc6b78706147b25489a73d7c8fbcb5
b493c590bcee9b64e8ae02c17d4fde2331e0598b
2020-06-02T21:33:23Z
python
2022-02-07T21:05:16Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,834
["changelogs/fragments/70122-improve-error-message-ssh-client-is-not-found.yml", "lib/ansible/plugins/connection/ssh.py"]
Adding ssh client not found debug message
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY If you don't have an ssh client installed in container image or on your system, ansible just throws following error - `The error was: FileNotFoundError: [Errno 2] No such file or directory: b'ssh': b'ssh'` error. ``` TASK [Gathering Facts] ********************************************************* [WARNING]: Unhandled error in Python interpreter discovery for host <hostname1>: [Errno 2] No such file or directory: b'ssh': b'ssh' [WARNING]: Unhandled error in Python interpreter discovery for host <hostname2>: [Errno 2] No such file or directory: b'ssh': b'ssh' An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: b'ssh': b'ssh' fatal: [<hostname1>]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""} An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: b'ssh': b'ssh' fatal: [<hostname2>]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""} ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.9.6 ``` ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run playbook on the system where ssh client is not installed & playbook is expecting to use ssh keys for remote hosts. <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> If possible adding an error message indicating `ssh client is not installed on the system` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below Error message mentioned in the summary The error was: FileNotFoundError: [Errno 2] No such file or directory: b'ssh': b'ssh' ``` Thank you!!
https://github.com/ansible/ansible/issues/69834
https://github.com/ansible/ansible/pull/70122
e396715d7be28da70c34b1e9e191a9ecbe63e52a
70bb2b33cae7173d19f31343cee6719940c4d319
2020-06-02T14:23:35Z
python
2020-06-29T21:26:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,814
["docs/docsite/requirements.txt"]
Update the documentation requirements file
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> Some things missing: - [x] assumes make is already installed (which may not be true for new contributors) - [x] need to fix the sphinx version to 2.1.2 <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com
https://github.com/ansible/ansible/issues/69814
https://github.com/ansible/ansible/pull/70020
47d14a33bd673e0c353eae31b18552b767893972
1d63b6f4f8525b19e6cf92993e1859c9fff0ce74
2020-06-01T20:11:31Z
python
2020-06-11T18:47:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,783
["changelogs/fragments/69993-copy-remote-src-perms.yml", "lib/ansible/modules/copy.py", "test/integration/targets/copy/tasks/tests.yml"]
Copy module with src trailing slash does not preserve mode of files on first level
##### SUMMARY If I use copy module with `mode: preserve` and `remote_src: yes` and `src` has trailing slash (`/`), mode of files on first level directory hierarchy are not preserved. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `lib/ansible/modules/files/copy.py` ##### ANSIBLE VERSION ```paste below ansible 2.9.9 config file = /home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg configured module search path = ['/home/pbabinca/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible python version = 3.7.7 (default, Mar 13 2020, 10:23:39) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION ```paste below COMMAND_WARNINGS(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = True DEFAULT_ASK_VAULT_PASS(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = False DEFAULT_HOST_LIST(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = ['/home/pbabinca/workspace/pbabinca-pub-configs/production'] DEFAULT_ROLES_PATH(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = ['/home/pbabinca/workspace/pbabinca-pub-configs/roles'] DEFAULT_STDOUT_CALLBACK(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = yaml DEFAULT_UNDEFINED_VAR_BEHAVIOR(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = True HOST_KEY_CHECKING(/home/pbabinca/workspace/pbabinca-pub-configs/ansible.cfg) = False ``` ##### OS / ENVIRONMENT ``` $ cat /etc/os-release NAME=Fedora VERSION="31 (Workstation Edition)" ID=fedora VERSION_ID=31 VERSION_CODENAME="" PLATFORM_ID="platform:f31" PRETTY_NAME="Fedora 31 (Workstation Edition)" ANSI_COLOR="0;34" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:31" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=31 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=31 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Workstation Edition" VARIANT_ID=workstation ``` ##### STEPS TO REPRODUCE Creates directory structure and copies it around: ```yaml - name: Temp dir tempfile: state: directory register: tmp_dir - name: Create directory structure file: path: "{{ tmp_dir.path }}/{{ item }}" state: directory loop: - "src/dir" - "dest-src-slash" - name: Create file structure file: path: "{{ tmp_dir.path }}/src/{{ item.name }}" state: touch mode: "{{ item.mode }}" loop: - { name: 'normal', mode: 'u+rw,g=r,o=r' } - { name: 'executable', mode: 'u=rwx,go=rx' } - { name: 'readonly', mode: 'a=r' } - { name: 'dir/normal', mode: 'u+rw,g=r,o=r' } - { name: 'dir/executable', mode: 'u=rwx,go=rx' } - { name: 'dir/readonly', mode: 'a=r' } - name: Recursive remote copy with preserve copy: src: "{{ tmp_dir.path }}/{{ item.src }}" dest: "{{ tmp_dir.path }}/{{ item.dest }}" remote_src: yes mode: preserve loop: - { src: 'src/', dest: 'dest-src-slash/' } - name: List dest command: "ls -lR {{ tmp_dir.path }}/src {{ tmp_dir.path }}/dest-src-slash" register: listing - name: Print Listing debug: msg: "{{ listing.stdout }}" - name: Remove temp dir file: name: "{{ tmp_dir.path }}" state: absent ``` ##### EXPECTED RESULTS Task "Print Listing" should include these lines - note that modes correspond to modes listed above: ``` /tmp/ansible.bx788pbc/dest-src-slash: total 0 drwxrwxr-x. 2 ansible ansible 100 May 31 22:42 dir1 -rwxr-xr-x. 1 ansible ansible 0 May 31 22:42 executable -rw-r--r--. 1 ansible ansible 0 May 31 22:42 normal -r--r--r--. 1 ansible ansible 0 May 31 22:42 readonly ``` ##### ACTUAL RESULTS Task "Print Listing" includes these lines - note that of all files is `a=rw`: ```paste below /tmp/ansible.bx788pbc/dest-src-slash: total 0 drwxrwxr-x. 2 ansible ansible 100 May 31 22:42 dir1 -rw-rw-r--. 1 ansible ansible 0 May 31 22:42 executable -rw-rw-r--. 1 ansible ansible 0 May 31 22:42 normal -rw-rw-r--. 1 ansible ansible 0 May 31 22:42 readonly ```
https://github.com/ansible/ansible/issues/69783
https://github.com/ansible/ansible/pull/69993
2251b239a315d0a5119e8a31dc0be629861205c0
0ae4dac65a6f78dac4fcfce6d1074074eeac2f4e
2020-05-31T21:01:10Z
python
2020-06-11T19:18:59Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,781
["lib/ansible/config/ansible_builtin_runtime.yml", "lib/ansible/executor/task_queue_manager.py", "test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/meta/runtime.yml", "test/integration/targets/collections/noop.yml", "test/integration/targets/collections/runme.sh"]
Callback plugin redirection does not work
##### SUMMARY `callback_whitelist = profile_tasks` in ansible.cfg does not activate `ansible.posix.profile_tasks`. This breaks 2.9 compatibility. CC @nitzmahone (as discussed on IRC) ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME collection redirection ##### ANSIBLE VERSION devel
https://github.com/ansible/ansible/issues/69781
https://github.com/ansible/ansible/pull/70086
598786e16d6c51bcde189ee23c37c42e6881dbbd
29c6aae2fcffa92a693ef3278b94e97fff1ebbd3
2020-05-31T11:02:10Z
python
2020-06-17T00:17:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,752
["changelogs/fragments/69752_service_facts.yml", "lib/ansible/modules/service_facts.py"]
service status is not always `enabled`, `disabled` or `unknown`
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY According to the https://docs.ansible.com/ansible/devel/modules/service_facts_module.html#return-ansible_facts/services/status the status of a service is either `enabled`, `disabled`, or `unknown`. This seems not to be the case. Here I report on an example where `static` is returned. ##### ISSUE TYPE Probably the documentation is not accurate. ##### COMPONENT NAME [service_facts_module](https://docs.ansible.com/ansible/devel/modules/service_facts_module.html), more precisely https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/service_facts.py#L68. ##### ANSIBLE VERSION Tested with <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.9 config file = <REMOVED> configured module search path = ['<HOME_DIR_REMOVED>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible python version = 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0] ``` The behavior is also reproducible using https://github.com/ansible/ansible/commit/d0a25f004c8dc4c86952e09ff1aaa823c3bbac31. ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ALLOW_WORLD_READABLE_TMPFILES(<PATH_REMOVED>/ansible.cfg) = True ANSIBLE_SSH_ARGS(<PATH_REMOVED>/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s DEFAULT_VAULT_PASSWORD_FILE(<PATH_REMOVED>/ansible.cfg) = <REMOVED> ``` ##### OS / ENVIRONMENT Source host: ArchLinux ``` $ uname -vro 5.6.14-arch1-1 #1 SMP PREEMPT Wed, 20 May 2020 20:43:19 +0000 GNU/Linux ``` Target host: Debian stretch ``` uname -vro 4.15.17-3-pve #1 SMP PVE 4.15.17-12 (Fri, 08 Jun 2018 11:18:32 +0200) GNU/Linux ``` ##### STEPS TO REPRODUCE With ```yaml $ cat status.yml --- - hosts: all tasks: - name: populate service facts service_facts: - debug: var: services['systemd-journald.service'] ``` do ``` $ ansible-playbook -i <ENV> -l <HOST> status.yml ``` ##### EXPECTED RESULTS The actual result (see below) is expected. Just the documentation seems to be off. ##### ACTUAL RESULTS ``` $ ansible-playbook -i <ENV> -l <HOST> status.yml PLAY [all] ******************************************************************************************************************* TASK [Gathering Facts] ******************************************************************************************************* [WARNING]: Platform linux on host <HOST> is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. ok: [<HOST>] TASK [populate service facts] ************************************************************************************************ ok: [<HOST>] TASK [debug] ***************************************************************************************************************** ok: [<HOST>] => { "services['systemd-journald.service']": { "name": "systemd-journald.service", "source": "systemd", "state": "running", "status": "static" } } PLAY RECAP ******************************************************************************************************************* <HOST> : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` So `status` here is **static**.
https://github.com/ansible/ansible/issues/69752
https://github.com/ansible/ansible/pull/69757
598e3392a9597f0214d68882da4f4ca07314ce41
d757995bb62dfa3f8022b5bf7a1a3082c7a93ce8
2020-05-28T21:16:56Z
python
2020-06-02T15:07:02Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,721
["changelogs/fragments/69776-add-aix-root-ca-certs-paths.yml", "lib/ansible/module_utils/urls.py"]
Add AIX default CA certs path to module_utils/urls.py
<!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Describe the new feature/improvement briefly below --> Adding the AIX standard capath to the CA certs search folders ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> - Playbook module: uri - get_ca_certs in class SSLValidationHandler - At line: https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/module_utils/urls.py#L833 ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> Problems: - The **uri** Ansible playbook module fails to GET https in AIX - Missing the AIX standard CA certs locations Solution: We will have better support for the uri Ansible module under AIX managed host By adding: ```python elif system == u'AIX': paths_checked.append('/var/ssl/certs') paths_checked.append('/opt/freeware/etc/ssl/certs') ``` Those cert paths are part of the package **ca-certificates** downloadable from the IBM Official [AIX Toolbox for Linux® Applications site](https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha#C) <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: GET https page uri: url: https://www.google.com method: GET return_content: yes validate_certs: yes register: get_replay ``` Before the change: ``` TASK [users-access : GET https page] ******************************************************************* fatal: [myserver]: FAILED! => { "changed": false, "content": "", "elapsed": 0, "invocation": { "module_args": { "attributes": null, "backup": null, "body": null, "body_format": "raw", "client_cert": null, "client_key": null, "content": null, "creates": null, "delimiter": null, "dest": null, "directory_mode": null, "follow": false, "follow_redirects": "safe", "force": false, "force_basic_auth": false, "group": null, "headers": {}, "http_agent": "ansible-httpget", "method": "GET", "mode": null, "owner": null, "regexp": null, "remote_src": null, "removes": null, "return_content": true, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "status_code": [ 200 ], "timeout": 30, "unix_socket": null, "unsafe_writes": null, "url": "https://www.google.com", "url_password": null, "url_username": null, "use_proxy": true, "validate_certs": true } }, "msg": "Status code was -1 and not [200]: Request failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>", "redirected": false, "status": -1, "url": "https://www.google.com" } ``` After the change: ``` TASK [users-access : GET https page] ******************************************************************* ok: [myserver] => { "accept_ranges": "none", "alt_svc": "h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"", "cache_control": "private, max-age=0", "changed": false, "connection": "close", "content": ".....", "content_type": "text/html; charset=ISO-8859-1", ... ... "invocation": { "module_args": { "attributes": null, "backup": null, "body": null, "body_format": "raw", "client_cert": null, "client_key": null, "content": null, "creates": null, "delimiter": null, "dest": null, "directory_mode": null, "follow": false, "follow_redirects": "safe", "force": false, "force_basic_auth": false, "group": null, "headers": {}, "http_agent": "ansible-httpget", "method": "GET", "mode": null, "owner": null, "regexp": null, "remote_src": null, "removes": null, "return_content": true, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "status_code": [ 200 ], "timeout": 30, "unix_socket": null, "unsafe_writes": null, "url": "https://www.google.com", "url_password": null, "url_username": null, "use_proxy": true, "validate_certs": true } }, "msg": "OK (unknown bytes)", "p3p": "CP=\"This is not a P3P policy! See g.co/p3phelp for more info.\"", "redirected": false, "server": "gws", "set_cookie": "...", "status": 200, "transfer_encoding": "chunked", "url": "https://www.google.com", "vary": "Accept-Encoding", "x_frame_options": "SAMEORIGIN", "x_xss_protection": "0" ```
https://github.com/ansible/ansible/issues/69721
https://github.com/ansible/ansible/pull/69776
c1df36e3ae999a32131442d124fd00dd0d649e35
71f399677801dabfe3f52910a66cd1b920b3bdba
2020-05-27T08:35:14Z
python
2022-01-12T20:19:40Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,649
["lib/ansible/modules/find.py"]
Module Find returns empty list when setting path to "/" and depth to 1
##### SUMMARY Module "find", when setting path to "/" and depth to 1. The list returned is empty. The reason is that the way currently used to calculate the depth being scanned, against the depth set on the parameter, gives a wrong value for objects under "/", such as "/var", attributing depth 2 to such objects. That way they are not included on the returned list. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME m:find ##### ANSIBLE VERSION ``` ansible 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/awx/.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, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] ``` ##### CONFIGURATION ``` ``` ##### OS / ENVIRONMENT NAME="CentOS Linux" VERSION="8 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="8" ##### STEPS TO REPRODUCE { "ANSIBLE_MODULE_ARGS": { "depth": 1, "recurse": true, "paths": "/", "file_type": "directory" } } python3 -m ansible.modules.find /tmp/args.json ``` {"files": [], "changed": false, "msg": "", "matched": 0, "invocation": {"module_args": {"depth": 1, "hidden": false, "file_type": "directory", "excludes": null, "patterns": ["*"], "age": null, "get_checksum": false, "recurse": true, "follow": false, "use_regex": false, "size": null, "contains": null, "age_stamp": "mtime", "paths": ["/"]}}, "examined": 0} ``` ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> A list with the directories below: / # ls -l total 60 drwxr-xr-x 1 root root 4096 Apr 24 01:34 bin drwxr-xr-x 5 root root 340 May 11 21:41 dev drwxr-xr-x 1 root root 4096 May 11 21:41 etc drwxr-xr-x 2 root root 4096 Apr 23 06:25 home drwxr-xr-x 1 root root 4096 Apr 24 01:34 lib drwxr-xr-x 5 root root 4096 Apr 23 06:25 media drwxr-xr-x 2 root root 4096 Apr 23 06:25 mnt drwxr-xr-x 2 root root 4096 Apr 23 06:25 opt dr-xr-xr-x 206 root root 0 May 11 21:41 proc drwx------ 1 root root 4096 May 11 21:43 root drwxr-xr-x 1 root root 4096 May 11 21:41 run drwxr-xr-x 2 root root 4096 Apr 23 06:25 sbin drwxr-xr-x 2 root root 4096 Apr 23 06:25 srv dr-xr-xr-x 13 root root 0 May 1 02:30 sys drwxrwxrwt 1 root root 4096 May 21 17:22 tmp drwxr-xr-x 1 root root 4096 Apr 24 01:34 usr drwxr-xr-x 1 root root 4096 Apr 24 01:34 var ##### ACTUAL RESULTS ``` {"files": [], "changed": false, "msg": "", "matched": 0, "invocation": {"module_args": {"depth": 1, "hidden": false, "file_type": "directory", "excludes": null, "patterns": ["*"], "age": null, "get_checksum": false, "recurse": true, "follow": false, "use_regex": false, "size": null, "contains": null, "age_stamp": "mtime", "paths": ["/"]}}, "examined": 0} ```
https://github.com/ansible/ansible/issues/69649
https://github.com/ansible/ansible/pull/69650
dae3ba71a85ec39396f08235550e06b5c6fe739a
fdfa6fec75da14d7e145eccf7c092fba684ee1e2
2020-05-21T18:04:11Z
python
2020-05-26T16:30:59Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,634
["lib/ansible/executor/task_executor.py", "test/integration/targets/cli/aliases", "test/integration/targets/cli/setup.yml", "test/integration/targets/cli/test_k_and_K.py"]
-K option no longer works for become_password
##### SUMMARY After 2165f9ac40cf212891b11a75bd9b9b2f4f0b8dc3, `-K` no longer works for become password. #69629 has a fix to send it to the plugin and get things working again, but @bcoca suggested we should try to do something other than threading it through TQM -> play_context. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME become, task_executor ##### ANSIBLE VERSION devel after 2165f9ac40cf212891b11a75bd9b9b2f4f0b8dc3
https://github.com/ansible/ansible/issues/69634
https://github.com/ansible/ansible/pull/69629
de3f7c7739851852dec8ea99a76c353317270b70
fe9696be525d4ef3177decda6919206492977582
2020-05-20T21:30:38Z
python
2020-05-22T13:34:26Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,619
["docs/docsite/rst/reference_appendices/special_variables.rst", "lib/ansible/cli/__init__.py", "test/integration/targets/tags/ansible_run_tags.yml", "test/integration/targets/tags/runme.sh", "test/units/playbook/test_taggable.py"]
Default specified in documentation for ansible_run_tags is incorrect
##### SUMMARY ansible_run_tags documentation says the default is empty ("[]") at https://docs.ansible.com/ansible/latest/reference_appendices/config.html#tags-run However when running a debug print with no tags specified, we get this output: ``` - name: print tags debug: msg: "{{ ansible_run_tags }}" ``` ``` $ ansible-playbook deploy.yml ``` ``` TASK [workstation : print tags] ************************************************************************************************************************************************************************************************************************************************************ task path: /home/gdevenyi/projects/lozano_ansible/roles/workstation/tasks/main.yml:4 ok: [192.168.56.104] => { "msg": [ "all" ] } ``` <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> tag ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.9.9 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> Ubuntu 18.04 ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/69619
https://github.com/ansible/ansible/pull/70939
b1cb2553af9e3811ce6f66e54c0f050977332eba
14dc4de424e2ba94ce0cf88132db3c06b07bff63
2020-05-20T15:24:13Z
python
2020-07-29T22:16:57Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,606
["changelogs/fragments/discovery_delegation_fix.yml", "lib/ansible/plugins/action/__init__.py", "test/integration/targets/delegate_to/inventory_interpreters", "test/integration/targets/delegate_to/library/detect_interpreter.py", "test/integration/targets/delegate_to/runme.sh", "test/integration/targets/delegate_to/verify_interpreter.yml", "test/units/plugins/action/test_action.py"]
Discovered interpreter path not used on delegated hosts
##### SUMMARY Delegating a task to another host that uses a different Python interpreter always fails. This was reported previously (#61002, #63180), but the fix (#64906) does not seem to have resolved the issue. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME discovered_interpreter_python ##### ANSIBLE VERSION ``` ansible 2.9.9 config file = None configured module search path = ['/home/dhatch/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/dhatch/.local/lib/python3.8/site-packages/ansible executable location = /home/dhatch/.local/bin/ansible python version = 3.8.2 (default, Feb 28 2020, 00:00:00) [GCC 10.0.1 20200216 (Red Hat 10.0.1-0.8)] ``` ##### CONFIGURATION ``` ``` ##### OS / ENVIRONMENT Control machine: Ansible 2.9.9 on Fedora 32 Host A: CentOS 8 Host B (delegation target): CentOS 7 ##### STEPS TO REPRODUCE This playbook shows that delegating a task to the CentOS 7 machine does not work when the task host is CentOS 8: ```yaml - hosts: all tasks: - meta: clear_facts - hosts: all gather_facts: true tasks: - debug: var: discovered_interpreter_python - command: 'true' - hosts: centos-8-host tasks: - command: 'true' delegate_to: centos-7-host ignore_errors: true - hosts: centos-8-host tasks: - command: 'true' delegate_to: centos-7-host delegate_facts: false ignore_errors: true ``` ##### EXPECTED RESULTS The Python interpreter used on the delegation target should be the one discovered for that host, NOT the host of the task itself. ##### ACTUAL RESULTS ```paste below PLAY [all] ************************************************************************************************************************************* TASK [Gathering Facts] ************************************************************************************************************************* ok: [centos-7-host] ok: [centos-8-host] PLAY [all] ************************************************************************************************************************************* TASK [Gathering Facts] ************************************************************************************************************************* ok: [centos-7-host] ok: [centos-8-host] TASK [debug] *********************************************************************************************************************************** ok: [centos-8-host] => { "discovered_interpreter_python": "/usr/libexec/platform-python" } ok: [centos-7-host] => { "discovered_interpreter_python": "/usr/bin/python" } TASK [command] ********************************************************************************************************************************* changed: [centos-7-host] changed: [centos-8-host] PLAY [centos-8-host] ********************************************************************************************************* TASK [Gathering Facts] ************************************************************************************************************************* ok: [centos-8-host] TASK [command] ********************************************************************************************************************************* fatal: [centos-8-host -> centos-7-host]: FAILED! => {"changed": false, "module_stderr": "Shared connection to centos-7-host closed.\r\n", "module_stdout": "/bin/sh: /usr/libexec/platform-python: No such file or directory\r\n", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127} ...ignoring PLAY [centos-8-host] ********************************************************************************************************* TASK [Gathering Facts] ************************************************************************************************************************* ok: [centos-8-host] TASK [command] ********************************************************************************************************************************* fatal: [centos-8-host -> centos-7-host]: FAILED! => {"changed": false, "module_stderr": "Shared connection to centos-7-host closed.\r\n", "module_stdout": "/bin/sh: /usr/libexec/platform-python: No such file or directory\r\n", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127} ...ignoring PLAY RECAP ************************************************************************************************************************************* centos-8-host : ok=8 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=2 centos-7-host : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/69606
https://github.com/ansible/ansible/pull/69604
dc63b365011a583b9e9bcd60d1fad6fb10b553c7
de3f7c7739851852dec8ea99a76c353317270b70
2020-05-19T21:08:12Z
python
2020-05-22T13:31:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,574
["changelogs/fragments/discovery_delegation_fix.yml", "lib/ansible/plugins/action/__init__.py", "test/integration/targets/delegate_to/inventory_interpreters", "test/integration/targets/delegate_to/library/detect_interpreter.py", "test/integration/targets/delegate_to/runme.sh", "test/integration/targets/delegate_to/verify_interpreter.yml", "test/units/plugins/action/test_action.py"]
Connection plugins broke in devel branch
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY Podman connection plugin started to fail after May 14 2020 Seems like https://github.com/ansible/ansible/commit/2165f9ac40cf212891b11a75bd9b9b2f4f0b8dc3 broke it ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible-playbook 2.10.0.dev0 config file = /home/sshnaidm/.ansible.cfg configured module search path = ['/home/sshnaidm/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/sshnaidm/venvs/ansible-dev/lib/python3.7/site-packages/ansible executable location = /home/sshnaidm/venvs/ansible-dev/bin/ansible-playbook python version = 3.7.7 (default, Mar 13 2020, 10:23:39) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] commit hash: 01e7915b0a9778a934a0f0e9e9d110dbef7e31ec ``` ##### STEPS TO REPRODUCE ```bash # install podman podman run -d --rm --name "podman-container" python:3-alpine sleep 1d git clone https://github.com/containers/ansible-podman-collections cd ansible-podman-collections/tests/integration/targets/connection_podman # install collection # run twice with 2.9 (it pass) and 2.10dev from devel (it fails) ANSIBLE_DEBUG=1 ansible-playbook -vvvvv ../connection/test_connection.yml -i test_connection.inventory -e target_hosts=podman -e action_prefix= -e local_tmp=/tmp/ansible-local -e remote_tmp=/tmp/ansible-remote ``` Testing playbook ```yaml - hosts: "{{ target_hosts }}" gather_facts: no serial: 1 tasks: ### raw with unicode arg and output - name: raw with unicode arg and output raw: echo 汉语 register: command - name: check output of raw with unicode arg and output assert: that: - "'汉语' in command.stdout" - command is changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules ### copy local file with unicode filename and content - name: create local file with unicode filename and content local_action: lineinfile dest={{ local_tmp }}-汉语/汉语.txt create=true line=汉语 - name: remove remote file with unicode filename and content action: "{{ action_prefix }}file path={{ remote_tmp }}-汉语/汉语.txt state=absent" # [skip] ``` Inventory ``` [podman] podman-container [podman:vars] ansible_host=podman-container ansible_connection=containers.podman.podman ansible_python_interpreter=/usr/local/bin/python ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> It pass on both 2.9 and 2.10 ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Paste of passed result on 2.9: https://pastebin.com/cmbfEH1k Paste of failed result on 2.10: https://pastebin.com/RER8SBm6 Diff between them, just for better visibility: https://linediff.com/?id=5ec170a6687f4bf1358b4567 !component =lib/ansible/executor/task_executor.py This is the failed log: <!--- Paste verbatim command output between quotes --> ```paste below TASK [create local file with unicode filename and content] ******************************************************************************************************************************************************** task path: /home/sshnaidm/sources/ansible-podman-collections/tests/integration/targets/connection/test_connection.yml:19 sending task start callback entering _queue_task() for podman-container/lineinfile Creating lock for lineinfile worker is 1 (out of 1 available) exiting _queue_task() for podman-container/lineinfile running TaskExecutor() for podman-container/TASK: create local file with unicode filename and content done queuing things up, now waiting for results queue to drain waiting for pending results... in run() - task 54e1addb-4632-6ef6-342a-00000000000a variable 'ansible_connection' from source: group vars, precedence entry 'groups_inventory' variable 'ansible_search_path' from source: unknown variable '_ansible_loop_cache' from source: unknown calling self._execute() variable 'ansible_delegated_vars' from source: unknown variable 'ansible_connection' from source: host vars for 'localhost' no remote address found for delegated host localhost using its name, so success depends on DNS resolution variable 'omit' from source: magic vars variable 'omit' from source: magic vars variable 'omit' from source: magic vars Loading FilterModule 'core' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False) Loading FilterModule 'mathstuff' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False) Loading FilterModule 'urls' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/filter/urls.py (found_in_cache=True, class_only=False) Loading FilterModule 'urlsplit' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False) Loading TestModule 'core' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False) Loading TestModule 'files' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False) Loading TestModule 'mathstuff' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False) variable 'local_tmp' from source: extra vars variable 'ansible_delegated_vars' from source: unknown variable 'ansible_connection' from source: host vars for 'localhost' trying /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/connection Loading Connection 'local' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/connection/local.py (found_in_cache=True, class_only=False) trying /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/shell Loading ShellModule 'sh' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False) Loading ShellModule 'sh' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False) variable 'ansible_delegated_vars' from source: unknown Loading ActionModule 'normal' from /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/action/normal.py (searched paths: /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/action/__pycache__:/home/sshnaidm/.local/lib/python3.7/site-packages/ansible/plugins/action) variable 'omit' from source: magic vars starting attempt loop running the handler _low_level_execute_command(): starting _low_level_execute_command(): executing: /bin/sh -c 'echo ~ && sleep 0' <podman-container> ESTABLISH LOCAL CONNECTION FOR USER: sshnaidm in local.exec_command() <podman-container> EXEC /bin/sh -c 'echo ~ && sleep 0' opening command with Popen() done running command with Popen() getting output with communicate() done communicating done with local.exec_command() _low_level_execute_command() done: rc=0, stdout=/home/sshnaidm , stderr= _low_level_execute_command(): starting _low_level_execute_command(): executing: /bin/sh -c '( umask 77 && mkdir -p "` echo /home/sshnaidm/.ansible/tmp `"&& mkdir /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791 && echo ansible-tmp-1589733889.9242184-4036062-66574237396791="` echo /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791 `" ) && sleep 0' in local.exec_command() <podman-container> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/sshnaidm/.ansible/tmp `"&& mkdir /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791 && echo ansible-tmp-1589733889.9242184-4036062-66574237396791="` echo /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791 `" ) && sleep 0' opening command with Popen() done running command with Popen() getting output with communicate() done communicating done with local.exec_command() _low_level_execute_command() done: rc=0, stdout=ansible-tmp-1589733889.9242184-4036062-66574237396791=/home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791 , stderr= trying /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/modules ANSIBALLZ: Using lock for lineinfile ANSIBALLZ: Acquiring lock ANSIBALLZ: Lock acquired: 139849027519056 ANSIBALLZ: Creating module Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/basic.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/_text.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/__init__.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/_json_compat.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/six/__init__.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/compat/selectors.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/text/__init__.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/validation.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/_utils.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/compat/__init__.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/warnings.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/file.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/parsing/convert_bool.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/_collections_compat.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/text/converters.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/process.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/sys_info.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/text/formatters.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/pycompat24.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/parsing/__init__.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/parameters.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/compat/_selectors2.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/common/collections.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/distro/__init__.py Using module_utils file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/module_utils/distro/_distro.py ANSIBALLZ: Writing module into payload ANSIBALLZ: Writing module ANSIBALLZ: Renaming module ANSIBALLZ: Done creating module variable 'ansible_python_interpreter' from source: group vars, precedence entry 'groups_inventory' variable 'ansible_facts' from source: unknown Using module file /home/sshnaidm/.local/lib/python3.7/site-packages/ansible/modules/lineinfile.py transferring module to remote /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/AnsiballZ_lineinfile.py <podman-container> PUT /home/sshnaidm/.ansible/tmp/ansible-local-4035979hft6_xtg/tmp48y3pu6p TO /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/AnsiballZ_lineinfile.py done transferring module to remote _low_level_execute_command(): starting _low_level_execute_command(): executing: /bin/sh -c 'chmod u+x /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/ /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/AnsiballZ_lineinfile.py && sleep 0' in local.exec_command() <podman-container> EXEC /bin/sh -c 'chmod u+x /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/ /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/AnsiballZ_lineinfile.py && sleep 0' opening command with Popen() done running command with Popen() getting output with communicate() done communicating done with local.exec_command() _low_level_execute_command() done: rc=0, stdout=, stderr= _low_level_execute_command(): starting _low_level_execute_command(): executing: /bin/sh -c '/usr/local/bin/python /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/AnsiballZ_lineinfile.py && sleep 0' in local.exec_command() <podman-container> EXEC /bin/sh -c '/usr/local/bin/python /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/AnsiballZ_lineinfile.py && sleep 0' opening command with Popen() done running command with Popen() getting output with communicate() done communicating done with local.exec_command() _low_level_execute_command() done: rc=127, stdout=, stderr=/bin/sh: /usr/local/bin/python: No such file or directory done with _execute_module (lineinfile, {'dest': '/tmp/ansible-local-汉语/汉语.txt', 'create': 'true', 'line': '汉语', '_ansible_check_mode': False, '_ansible_no_log': False, '_ansible_debug': True, '_ansible_diff': False, '_ansible_verbosity': 5, '_ansible_version': '2.10.0.dev0', '_ansible_module_name': 'lineinfile', '_ansible_syslog_facility': 'LOG_USER', '_ansible_selinux_special_fs': ['fuse', 'nfs', 'vboxsf', 'ramfs', '9p', 'vfat'], '_ansible_string_conversion_action': 'warn', '_ansible_socket': None, '_ansible_shell_executable': '/bin/sh', '_ansible_keep_remote_files': False, '_ansible_tmpdir': '/home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/', '_ansible_remote_tmp': '~/.ansible/tmp'}) _low_level_execute_command(): starting _low_level_execute_command(): executing: /bin/sh -c 'rm -f -r /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/ > /dev/null 2>&1 && sleep 0' in local.exec_command() <podman-container> EXEC /bin/sh -c 'rm -f -r /home/sshnaidm/.ansible/tmp/ansible-tmp-1589733889.9242184-4036062-66574237396791/ > /dev/null 2>&1 && sleep 0' opening command with Popen() done running command with Popen() getting output with communicate() done communicating done with local.exec_command() _low_level_execute_command() done: rc=0, stdout=, stderr= handler run complete attempt loop complete, returning result _execute() done dumping result to json done dumping result, returning done running TaskExecutor() for podman-container/TASK: create local file with unicode filename and content [54e1addb-4632-6ef6-342a-00000000000a] sending task result for task 54e1addb-4632-6ef6-342a-00000000000a done sending task result for task 54e1addb-4632-6ef6-342a-00000000000a WORKER PROCESS EXITING marking podman-container as failed marking host podman-container failed, current state: HOST STATE: block=2, task=3, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False ^ failed state is now: HOST STATE: block=2, task=3, rescue=0, always=0, 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 getting the next task for host podman-container host podman-container is done iterating, returning fatal: [podman-container]: FAILED! => { "changed": false, "rc": 127 } MSG: The module failed to execute correctly, you probably need to set the interpreter. See stdout/stderr for the exact error MODULE_STDERR: /bin/sh: /usr/local/bin/python: No such file or directory ```
https://github.com/ansible/ansible/issues/69574
https://github.com/ansible/ansible/pull/69604
dc63b365011a583b9e9bcd60d1fad6fb10b553c7
de3f7c7739851852dec8ea99a76c353317270b70
2020-05-17T17:15:28Z
python
2020-05-22T13:31:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,561
["changelogs/fragments/72699-validate-modules-default-for-bools.yml", "lib/ansible/modules/apt.py", "lib/ansible/modules/cron.py", "lib/ansible/modules/debconf.py", "lib/ansible/modules/get_url.py", "lib/ansible/modules/iptables.py", "test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py", "test/sanity/ignore.txt"]
ansible-test validate-modules: missing `default` in docs not detected if `default=False` in argspec
##### SUMMARY Happened here: https://github.com/ansible-collections/community.general/pull/341 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-test ##### ANSIBLE VERSION ```paste below devel ```
https://github.com/ansible/ansible/issues/69561
https://github.com/ansible/ansible/pull/72699
f94ba68d8f287918456c5de8115dafb0c69e8e7c
5226ac5778d3b57296b925de5d4ad0b485bb11cd
2020-05-16T12:58:26Z
python
2020-12-04T17:13:14Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,550
["changelogs/fragments/powershell-nested-clixml.yml", "lib/ansible/plugins/shell/powershell.py", "test/units/plugins/shell/test_powershell.py"]
SSH Windows - Fails to decode stderr when pipelining is disabled
##### SUMMARY When using SSH against a Windows host with PowerShell v5 the stderr when pipelining is not being used contains a nested CLIXML message in the stderr. We should be able to handle this correctly and not fail. Currently I can only explicitly disable pipelining for Windows as it should always be enabled but there is a report where this has happened in the wild so it's not unheard of https://github.com/ansible/awx/issues/6990. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ssh powershell ##### ANSIBLE VERSION ```paste below devel ``` ##### CONFIGURATION Not sure yet, need to figure out how pipelining was disabled on the Windows case. ##### OS / ENVIRONMENT Targeting Windows Server with PowerShell v5 and the SSH default shell is `powershell.exe` ##### STEPS TO REPRODUCE Not sure yet, can only replicate by connecting to SSH on a WIndows host and manually changing https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/ssh.py#L464 to False. ##### EXPECTED RESULTS Works just fine ##### ACTUAL RESULTS Fails because the stderr looks like (see nested CLIXML header) ```paste below b'#< CLIXML\r\n#< CLIXML\r\n<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs><Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><Obj S="progress" RefId="1"><TNRef RefId="0" /><MS><I64 N="SourceId">2</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>') ```
https://github.com/ansible/ansible/issues/69550
https://github.com/ansible/ansible/pull/71412
3c8744f0c157b867cb5808b3a9efae3f22f26735
8897d7e2ff8fa37c25cd4ba039984fd3a9e13b33
2020-05-15T20:52:54Z
python
2020-08-25T21:06:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,516
["changelogs/fragments/69516_flatcar_distribution.yml", "hacking/tests/gen_distribution_version_testcase.py", "lib/ansible/module_utils/facts/system/distribution.py", "lib/ansible/modules/hostname.py", "test/units/module_utils/basic/test_platform_distribution.py", "test/units/module_utils/common/test_sys_info.py", "test/units/module_utils/facts/system/distribution/fixtures/flatcar_2492.0.0.json"]
Flatcar Container Linux not properly discovered
### SUMMARY [Flatcar Container Linux](https://www.flatcar-linux.org) is not properly discovered by Ansible, especially while setting hostname. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME hostname ##### ANSIBLE VERSION ```paste below ansible --version ansible 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = ['.../.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible python version = 3.8.2 (default, Feb 28 2020, 00:00:00) [GCC 10.0.1 20200216 (Red Hat 10.0.1-0.8)] ``` ##### OS / ENVIRONMENT Guest OS: Flatcar Container Linux Alpha 2492.0.0 Host: Fedora 32 ##### STEPS TO REPRODUCE 1. Clone [image builder](https://github.com/kubernetes-sigs/image-builder). 2. Adjust files for Flatcar. 3. Run `packer build`, which creates Flatcar image, provisions a host. ##### EXPECTED RESULTS No error ##### ACTUAL RESULTS Failure like: ``` flatcar-alpha: TASK [sysprep : Set hostname] ************************************************** flatcar-alpha: fatal: [default]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Flatcar)"}^ ``` For info, in Flatcar you can see for example: ``` $ cat /etc/os-release NAME="Flatcar Container Linux by Kinvolk" ID=flatcar ID_LIKE=coreos VERSION=2492.0.0 VERSION_ID=2492.0.0 BUILD_ID=2020-04-28-2210 PRETTY_NAME="Flatcar Container Linux by Kinvolk 2492.0.0 (Rhyolite)" ANSI_COLOR="38;5;75" HOME_URL="https://flatcar-linux.org/" BUG_REPORT_URL="https://issues.flatcar-linux.org" FLATCAR_BOARD="amd64-usr" $ cat /etc/lsb-release DISTRIB_ID="Flatcar Container Linux by Kinvolk" DISTRIB_RELEASE=2492.0.0 DISTRIB_CODENAME="Rhyolite" DISTRIB_DESCRIPTION="Flatcar Container Linux by Kinvolk 2492.0.0 (Rhyolite)" ``` As far as I understand, so far Ansible only supported [CoreOS Container Linux](https://github.com/ansible/ansible/blob/cedfe34619128783d2a799695bd4c53d6adc9dd1/lib/ansible/module_utils/facts/system/distribution.py#L387), which will be soon EOL. Recently there was an attempt to support [Fedora CoreOS or RedHat CoreOS](https://github.com/ansible/ansible/pull/53563), which was not merged. I am not sure if there is any recent progress about that. So would it be reasonable to simply add new code for Flatcar, just like CoreOS Container Linux?
https://github.com/ansible/ansible/issues/69516
https://github.com/ansible/ansible/pull/69627
d7f61cbc281f4b8eccf7fe67eea5522cb28b52b2
598e3392a9597f0214d68882da4f4ca07314ce41
2020-05-14T15:36:51Z
python
2020-06-02T13:11:53Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,468
["shippable.yml"]
AIX tests temporarily disabled
##### SUMMARY AIX tests have been temporarily disabled in https://github.com/ansible/ansible/commit/cc4c38ef7c053a03e08db272bed98ab9e2c0be99 due to provisioning failures. ##### ISSUE TYPE Bug Report ##### COMPONENT NAME shippable.yml ##### ANSIBLE VERSION devel ##### CONFIGURATION Shippable ##### OS / ENVIRONMENT Shippable ##### STEPS TO REPRODUCE Run AIX tests. ##### EXPECTED RESULTS Tests pass. ##### ACTUAL RESULTS Provisioning fails. Example: https://app.shippable.com/github/ansible/ansible/runs/166171/94/console
https://github.com/ansible/ansible/issues/69468
https://github.com/ansible/ansible/pull/69469
cc4c38ef7c053a03e08db272bed98ab9e2c0be99
cdaf7da11a2cdffe7c9bd5cff7d1b2acfa8e95e1
2020-05-12T20:54:54Z
python
2020-05-12T22:05:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,465
["changelogs/fragments/add_prefix_to_cache.yml", "lib/ansible/plugins/cache/__init__.py", "test/integration/targets/collections/cache.statichost.yml", "test/integration/targets/collections/runme.sh", "test/integration/targets/set_fact/runme.sh"]
jsonfile cache plugin prefix option does not work
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> Ansible documents a fact_caching_prefix option for the jsonfile cache plugin. It does not appear to do anything. Also, the fact_caching_connection option is documented as `_uri` rather than `_connection`. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> jsonfile ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.8 config file = /home/mark/src/ansible/ansible2/ansible.cfg configured module search path = [u'/home/mark/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /home/mark/src/ansible-playground/venv-2.9/local/lib/python2.7/site-packages/ansible executable location = /home/mark/src/ansible-playground/venv-2.9/bin/ansible python version = 2.7.12 (default, Oct 8 2019, 14:14:10) [GCC 5.4.0 20160609] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Ubuntu ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below ```
https://github.com/ansible/ansible/issues/69465
https://github.com/ansible/ansible/pull/69872
ad3721820022e27944dbfc7b9dff84b1e9943c04
ebb22655e42f944cfa898488a7cfd3003297ecfe
2020-05-12T20:05:43Z
python
2020-06-11T14:40:25Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,457
["changelogs/fragments/69457-free-strategy-handler-race.yml", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/handler_race/aliases", "test/integration/targets/handler_race/inventory", "test/integration/targets/handler_race/roles/do_handlers/handlers/main.yml", "test/integration/targets/handler_race/roles/do_handlers/tasks/main.yml", "test/integration/targets/handler_race/roles/more_sleep/tasks/main.yml", "test/integration/targets/handler_race/roles/random_sleep/tasks/main.yml", "test/integration/targets/handler_race/runme.sh", "test/integration/targets/handler_race/test_handler_race.yml"]
Using the free strategy with a mix of tasks and roles with handlers can lead to failure
<!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below --> If you use the free strategy with a complex playbook that has a mix of regular tasks, roles and handlers, some nodes may fail because the strategy attempts to load ansible roles as files when handlers are run. I tracked it down to the _do_handler_run in the lib/ansible/plugins/strategy/__init__.py because included_files are not check to see if they are a role before being included. https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/strategy/free.py#L240-L259 vs https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/strategy/__init__.py#L1005-L1031 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> free.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/centos/.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, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> CentOS8 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml TBD. ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> No error because it correctly loads the role ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below fatal: [overcloud-novacompute-0]: FAILED! => { "reason": "Could not find or access '/home/centos/config-download/overcloud/tripleo_timezone' on the Ansible Controller. Traceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/ansible/plugins/strategy/__init__.py\", line 869, in _load_included_file\n data = self._loader.load_from_file(included_file._filename)\n File \"/usr/lib/python3.6/site-packages/ansible/parsing/dataloader.py\", line 94, in load_from_file\n (b_file_data, show_content) = self._get_file_contents(file_name)\n File \"/usr/lib/python3.6/site-packages/ansible/parsing/dataloader.py\", line 162, in _get_file_contents\n raise AnsibleFileNotFound(\"Unable to retrieve file contents\", file_name=file_name)\nansible.errors.AnsibleFileNotFound: Unable to retrieve file contents\nCould not find or access '/home/centos/config-download/overcloud/tripleo_timezone' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option\n" } ```
https://github.com/ansible/ansible/issues/69457
https://github.com/ansible/ansible/pull/69498
cd8920af998e297a549a4f05cf4a4b3656d7d67e
a4072ad0e9c718b6946d599ba05c8a67e26a8195
2020-05-12T16:16:27Z
python
2020-05-21T20:55:08Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,401
["changelogs/fragments/no_fatal_bad_cb.yml", "lib/ansible/executor/task_queue_manager.py", "test/integration/targets/collections/runme.sh"]
Ansible crashes when callback_whitelist contains collection callback that does not exist
##### SUMMARY If `callback_whitelist` contains a FQCN that does not exist, Ansible will crash: ``` ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'set_options' the full traceback was: Traceback (most recent call last): File "ansible/bin/ansible-playbook", line 123, in <module> exit_code = cli.run() File "ansible/lib/ansible/cli/playbook.py", line 127, in run results = pbex.run() File "ansible/lib/ansible/executor/playbook_executor.py", line 99, in run self._tqm.load_callbacks() File "ansible/lib/ansible/executor/task_queue_manager.py", line 165, in load_callbacks callback_obj.set_options() AttributeError: 'NoneType' object has no attribute 'set_options' ``` This happens since #66128 (unsurprisingly). This is easy to fix by changing line 165 to ``` if callback_obj is not None: callback_obj.set_options() ``` but this only fixes the symptom (crash), not the cause (no handling when callback not found). I guess a better behavior would be to: ``` if callback_obj is None: raise AnsibleError("Cannot find callback: %s" % callback_plugin_name) ``` or at least print a warning. Since I'm not sure what the correct behavior is, I'm creating this issue. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/executor/task_queue_manager.py ##### ANSIBLE VERSION ```paste below 2.9 devel ```
https://github.com/ansible/ansible/issues/69401
https://github.com/ansible/ansible/pull/69440
eb3e4b3a7b8dc39f90264ab6b40c72a48cc0fd59
0aa76503dc706340d85f4d3f19f472880187eb14
2020-05-09T07:36:27Z
python
2020-05-13T16:02:31Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,397
["changelogs/fragments/73820-yumdnf-add_cacheonly_option.yaml", "lib/ansible/module_utils/yumdnf.py", "lib/ansible/modules/dnf.py", "lib/ansible/modules/yum.py", "test/integration/targets/dnf/tasks/cacheonly.yml", "test/integration/targets/dnf/tasks/main.yml", "test/integration/targets/yum/tasks/cacheonly.yml", "test/integration/targets/yum/tasks/main.yml"]
Feature: yum --cacheonly
<!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Describe the new feature/improvement briefly below --> Add a --cacheonly option to the ansible yum module, similar to the --downloadonly option. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> lib/ansible/modules/packaging/os/yum.py ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> We have a group of Oracle servers that have no repository management server. They update directly from Oracle's repositories. Our thought is to do a "yum update --downloadonly" on all dev and prod servers. Then we can update the dev servers first using "yum update --cacheonly" to test then updated and run the same command on the prod at a later time to make them consistent with the dev. <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- HINT: You can also paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/69397
https://github.com/ansible/ansible/pull/73820
0c101f3f769b9aaed1a99f8858197f4d28b11034
fdee5ca16dd169b83997b6c82130a2d9c7fe3688
2020-05-08T18:48:18Z
python
2021-04-16T15:08:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,374
["docs/docsite/rst/network/user_guide/platform_eos.rst", "docs/docsite/rst/network/user_guide/platform_frr.rst", "docs/docsite/rst/network/user_guide/platform_ios.rst", "docs/docsite/rst/network/user_guide/platform_iosxr.rst", "docs/docsite/rst/network/user_guide/platform_junos.rst", "docs/docsite/rst/network/user_guide/platform_netconf_enabled.rst", "docs/docsite/rst/network/user_guide/platform_nxos.rst", "docs/docsite/rst/network/user_guide/platform_vyos.rst"]
Update Ansible-maintained scenario guides to use FQCN
<!--- Verify first that your improvement is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY <!--- Explain the problem briefly below, add suggestions to wording or structure --> - [x] Update to use FQCN - [x] Add link to collection on Galaxy <!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure --> docs.ansible.com ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> ##### ADDITIONAL INFORMATION <!--- Describe how this improves the documentation, e.g. before/after situation or screenshots --> <!--- HINT: You can paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/69374
https://github.com/ansible/ansible/pull/70369
ae1291004e2d6d127f70a2588012d5b1342d9dee
172230d7b80c8565c4d9d6b6a8b301932b6785c0
2020-05-07T15:57:08Z
python
2020-08-10T20:09:35Z
closed
ansible/ansible
https://github.com/ansible/ansible
69,371
["lib/ansible/modules/package.py"]
Discourage use of `package` module
#### SUMMARY As detailed in https://github.com/ansible/ansible/issues/68134 `package` is only good in the simplest of cases. We should guide people towards the dedicated modules `apt`, `dnf`, etc. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME package ##### ANSIBLE VERSION ```paste below 2.10 ```
https://github.com/ansible/ansible/issues/69371
https://github.com/ansible/ansible/pull/70345
ea119d30894478b84b5fbe271f580cb2b0401b86
3af7425367db1ab77e3d684ab8cf849bc68381a2
2020-05-07T12:31:20Z
python
2020-09-30T16:57:39Z