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
67,067
["lib/ansible/modules/setup.py"]
Add example of Setup Module with delegated_facts
<!--- 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 Please update the documentation for the Setup module to include a note to check the Delegated Facts (https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html#delegated-facts) documentation. I spent a long time trying to figure out how to set just the required facts for a group of servers remote servers and it was simple once I found the right document. Or better yet, include the example from the Delegated Facts in the Examples section of the Setup module. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME Setup module ##### ANSIBLE VERSION N/A ##### CONFIGURATION N/A ##### OS / ENVIRONMENT N/A ##### ADDITIONAL INFORMATION Directly related information would be super helpful and save a lot of Google Search time.
https://github.com/ansible/ansible/issues/67067
https://github.com/ansible/ansible/pull/74479
f194108a261ba015673916c07a76da094aaff3c1
7b03ebf939259710b44092cc780e5f02374dcab9
2020-02-04T00:02:53Z
python
2021-04-28T12:53:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,050
["changelogs/fragments/67050-yum-releasever.yaml", "lib/ansible/modules/packaging/os/yum.py", "test/integration/targets/yum/tasks/yuminstallroot.yml"]
yum module - releasever option not working as expected
I am using the yum module to lock the release version for a RHEL 7.6 machine to 7.7 version. However the yum --releasever option does not set the release version to 7.7. I am using Ansible 2.7.10 version. Here is the discussion regarding the issue: https://access.redhat.com/discussions/4774501 ISSUE TYPE Bug Report COMPONENT NAME yum --releasever ANSIBLE VERSION 2.7.10 STEPS TO REPRODUCE name: installing updated packages yum: name: '*' state: latest releasever: '7.7' ACTUAL RESULTS Play runs successfully however it does not update the release version of the server
https://github.com/ansible/ansible/issues/67050
https://github.com/ansible/ansible/pull/69057
cace616aab91480f2139dc7b14d7d13929f34104
8b30360ca98cf9fa9694f86d122b18da68c14c96
2020-02-03T14:36:10Z
python
2020-04-23T07:02:00Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,035
["changelogs/fragments/67036-openssl_publickey-backend.yml", "lib/ansible/module_utils/crypto.py", "lib/ansible/modules/crypto/openssl_publickey.py"]
openssl_publickey always fails with name 'crypto' is not defined
<!--- 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 `openssl_publickey` calls `module_utils.crypto.get_fingerprint()` and cannot tell it what backend to use, and it calls `module_utils.crypto.load_privatekey()` without backend anyways, then default to `pyopenssl` backend and fails. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `openssl_publickey` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.4 config file = /root/ansible_workspace/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible python version = 3.8.1 (default, Jan 22 2020, 06:38:00) [GCC 9.2.0] ``` It should affects devel. ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` irrelevant ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> I'm running Manjaro 18.1.5. ##### 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: Reproduction hosts: localhost tasks: - openssl_privatekey: path: /tmp/test.key - openssl_publickey: path: /tmp/test.pub privatekey_path: /tmp/test.key ``` <!--- 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 `openssl_publickey` task should not fail and `/tmp/test.pub` should be created. ##### 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.4 config file = /root/ansible_workspace/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.8.1 (default, Jan 22 2020, 06:38:00) [GCC 9.2.0] Using /root/ansible_workspace/ansible.cfg as config file host_list declined parsing /root/ansible_workspace/managed_nodes.yml as it did not pass its verify_file() method script declined parsing /root/ansible_workspace/managed_nodes.yml as it did not pass its verify_file() method Skipping empty key (hosts) in group (all) Skipping empty key (hosts) in group (critical_infra_servers) Skipping empty key (hosts) in group (application_servers) Skipping empty key (hosts) in group (database_servers) Parsed /root/ansible_workspace/managed_nodes.yml inventory source with yaml plugin PLAYBOOK: testground.yml ****************************************************************************** 1 plays in testground.yml PLAY [Reproduction] *********************************************************************************** META: ran handlers TASK [openssl_privatekey] ***************************************************************************** task path: /root/ansible_workspace/testground.yml:6 Sunday 02 February 2020 23:49:44 +0800 (0:00:00.018) 0:00:00.018 ******* Using module file /usr/lib/python3.8/site-packages/ansible/modules/crypto/openssl_privatekey.py Pipelining is enabled. <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python && sleep 0' changed: [localhost] => { "changed": true, "filename": "/tmp/test.key", "fingerprint": { "blake2b": "06:c9:0a:b4:12:e7:13:cc:aa:6a:9a:22:00:6b:c8:48:06:a1:4d:5d:df:0e:ed:10:d5:3a:23:7f:4b:6e:45:b7:1e:b0:b1:13:f6:95:46:6f:67:54:c2:07:fd:10:f1:7c:8f:84:91:96:6b:5a:44:cf:2e:e1:c3:36:78:b4:b1:db", "blake2s": "f9:b2:ab:8f:32:4f:5d:91:2b:89:dc:da:07:89:b8:41:cd:59:5f:ac:1d:3b:e3:d8:42:5b:ee:3d:a1:87:84:4b", "md5": "3d:b2:37:ff:11:0d:26:c3:35:9e:3a:67:66:5b:77:ac", "sha1": "11:1f:aa:0b:4b:58:44:2a:85:e6:29:10:96:6c:44:7f:f4:f9:a2:4b", "sha224": "a4:60:9f:fb:cd:e9:7e:b4:bb:54:84:03:70:d6:0c:39:cb:9d:cb:77:8a:c8:b7:fe:97:f7:ad:11", "sha256": "b4:92:9a:ac:a6:84:5b:a6:31:e4:11:fe:5c:29:09:76:4c:7f:29:34:fa:a2:89:c5:25:d3:08:69:07:54:2d:69", "sha384": "51:41:bd:08:d5:fa:2d:c1:3f:d8:69:e8:b9:36:fc:9e:68:f0:92:b3:c6:a4:f2:f1:9f:80:f4:66:e8:ad:47:f5:8d:57:ca:b4:71:b5:6d:ed:8c:f7:01:11:a6:68:27:96", "sha3_224": "5d:73:c9:b6:80:a4:6f:0a:60:6a:8a:c9:b8:af:9e:4f:18:ca:cb:85:35:44:b4:1d:65:a3:51:4f", "sha3_256": "a6:ac:fb:5c:8a:a8:b9:1c:c0:99:05:15:20:03:9f:ce:a8:42:03:80:75:50:aa:5d:4c:8e:0e:0e:a4:d0:6d:27", "sha3_384": "9f:46:2a:b7:6c:14:68:37:ad:c0:12:ae:9c:a9:6a:ab:34:86:06:02:15:a5:10:57:9f:2b:78:b5:69:af:d9:f9:81:33:d2:67:58:08:00:84:8b:50:9f:76:45:ab:51:e3", "sha3_512": "b1:3c:df:1e:27:0c:b3:b0:55:3e:cd:42:d2:67:ce:58:02:39:ac:8d:38:11:bf:74:e6:0a:84:c1:fd:4c:a5:01:74:f1:5a:3d:4b:8c:7e:98:b7:6a:18:5a:e5:98:04:a7:b6:5d:9a:4e:93:88:85:80:4f:9b:8c:35:b8:55:f6:c6", "sha512": "cd:3a:f3:ed:dd:86:28:75:2a:8a:c5:65:88:f3:b0:8b:c5:c3:d3:b9:3d:a5:5d:78:1a:04:cb:dd:0b:58:a5:4d:9a:02:37:a4:e5:4b:ce:f3:4f:54:11:98:93:f3:dd:67:ac:ef:04:06:17:2d:a5:08:09:1a:19:12:cc:1f:56:63", "shake_128": "f7:de:e4:52:c2:65:c0:e6:c8:7a:f9:35:d5:63:94:59:1d:c1:c5:52:b1:3e:8a:2a:dc:5a:2a:57:df:cc:32:d0", "shake_256": "ba:d5:37:e1:78:23:f3:39:ed:be:e0:d8:f3:c1:75:a5:28:fe:b2:e1:2b:17:1d:8c:7f:04:2c:0a:2a:5e:ae:c4" }, "invocation": { "module_args": { "attributes": null, "backup": false, "cipher": null, "content": null, "curve": null, "delimiter": null, "directory_mode": null, "follow": false, "force": false, "group": null, "mode": "0600", "owner": null, "passphrase": null, "path": "/tmp/test.key", "regexp": null, "remote_src": null, "select_crypto_backend": "auto", "selevel": null, "serole": null, "setype": null, "seuser": null, "size": 4096, "src": null, "state": "present", "type": "RSA", "unsafe_writes": null } }, "size": 4096, "type": "RSA" } TASK [openssl_publickey] ****************************************************************************** task path: /root/ansible_workspace/testground.yml:9 Sunday 02 February 2020 23:49:45 +0800 (0:00:00.824) 0:00:00.843 ******* Using module file /usr/lib/python3.8/site-packages/ansible/modules/crypto/openssl_publickey.py Pipelining is enabled. <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python && sleep 0' The full traceback is: Traceback (most recent call last): File "/tmp/ansible_openssl_publickey_payload__lythb6u/ansible_openssl_publickey_payload.zip/ansible/module_utils/crypto.py", line 209, in load_privatekey NameError: name 'crypto' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 102, in <module> File "<stdin>", line 94, in _ansiballz_main File "<stdin>", line 40, in invoke_module File "/usr/lib/python3.8/runpy.py", line 206, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.8/runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/tmp/ansible_openssl_publickey_payload__lythb6u/ansible_openssl_publickey_payload.zip/ansible/modules/crypto/openssl_publickey.py", line 432, in <module> File "/tmp/ansible_openssl_publickey_payload__lythb6u/ansible_openssl_publickey_payload.zip/ansible/modules/crypto/openssl_publickey.py", line 416, in main File "/tmp/ansible_openssl_publickey_payload__lythb6u/ansible_openssl_publickey_payload.zip/ansible/modules/crypto/openssl_publickey.py", line 266, in generate File "/tmp/ansible_openssl_publickey_payload__lythb6u/ansible_openssl_publickey_payload.zip/ansible/module_utils/crypto.py", line 171, in get_fingerprint File "/tmp/ansible_openssl_publickey_payload__lythb6u/ansible_openssl_publickey_payload.zip/ansible/module_utils/crypto.py", line 212, in load_privatekey NameError: name 'crypto' is not defined fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "*snip*", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } PLAY RECAP ******************************************************************************************** localhost : ok=1 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Sunday 02 February 2020 23:49:45 +0800 (0:00:00.270) 0:00:01.113 ******* =============================================================================== openssl_privatekey ----------------------------------------------------------------------------- 0.82s /root/ansible_workspace/testground.yml:6 ------------------------------------------------------------- openssl_publickey ------------------------------------------------------------------------------ 0.27s /root/ansible_workspace/testground.yml:9 ------------------------------------------------------------- ```
https://github.com/ansible/ansible/issues/67035
https://github.com/ansible/ansible/pull/67036
b1a8bded3fe769244b16525dadcd19c2007b80c7
a0e5e2e4c597c8cf0fdd39c2df45fe33fd38eedb
2020-02-02T15:55:25Z
python
2020-02-03T05:18:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,031
["changelogs/fragments/wait_for_connection-interpreter-discovery-retry.yaml", "lib/ansible/plugins/action/wait_for_connection.py"]
pipelining: wait_for_connection only tries python discovery on first connection attempt
<!--- 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 --> Same issue as (locked and closed) https://github.com/ansible/ansible/issues/63285 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> wait_for_connection python discovery ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.1 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/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible python version = 3.7.5 (default, Oct 17 2019, 12:21:00) [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 ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Fedora 29 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml 1. start a `wait_for_connection` task 2. create host with no `/usr/bin/python` 3. observe that `wait_for_connection` fails due to not detecting python and attempting to use `/usr/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 --> ansible connects successfully ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below wait_for_connection: attempting ping module test <vmguest136> Attempting python interpreter discovery <192.168.122.23> ESTABLISH SSH CONNECTION FOR USER: root <192.168.122.23> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/2f078e0ae4 192.168.122.23 '/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'"'"'' <192.168.122.23> (255, b'', b'ssh: connect to host 192.168.122.23 port 22: Connection refused\r\n') [WARNING]: Unhandled error in Python interpreter discovery for host vmguest136: Failed to connect to the host via ssh: ssh: connect to host 192.168.122.23 port 22: Connection refused Using module file /usr/lib/python3.7/site-packages/ansible/modules/system/ping.py Pipelining is enabled. <192.168.122.23> ESTABLISH SSH CONNECTION FOR USER: root <192.168.122.23> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/2f078e0ae4 192.168.122.23 '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"'' wait_for_connection: attempting ping module test Using module file /usr/lib/python3.7/site-packages/ansible/modules/system/ping.py Pipelining is enabled. <192.168.122.23> ESTABLISH SSH CONNECTION FOR USER: root <192.168.122.23> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/2f078e0ae4 192.168.122.23 '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"'' wait_for_connection: attempting ping module test Using module file /usr/lib/python3.7/site-packages/ansible/modules/system/ping.py Pipelining is enabled. <192.168.122.23> ESTABLISH SSH CONNECTION FOR USER: root <192.168.122.23> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/2f078e0ae4 192.168.122.23 '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"'' wait_for_connection: attempting ping module test Using module file /usr/lib/python3.7/site-packages/ansible/modules/system/ping.py Pipelining is enabled. <192.168.122.23> ESTABLISH SSH CONNECTION FOR USER: root <192.168.122.23> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/2f078e0ae4 192.168.122.23 '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"'' wait_for_connection: attempting ping module test Using module file /usr/lib/python3.7/site-packages/ansible/modules/system/ping.py Pipelining is enabled. ```
https://github.com/ansible/ansible/issues/67031
https://github.com/ansible/ansible/pull/67040
f4a80bb600510669801c5d5c0a250952748e99fd
fd954a9c5c05c7149eb23271529ff070f2b1f9dc
2020-02-02T10:13:41Z
python
2020-02-04T19:40:09Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,016
["changelogs/fragments/67282-remove_options_from_some_vmware_modules_that_aren't_used_in_the_code.yml", "docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/modules/cloud/vmware/vmware_guest_find.py", "lib/ansible/modules/cloud/vmware/vmware_vmkernel.py", "test/integration/targets/vmware_guest_find/tasks/main.yml"]
some vmware modules have options which should have been removed for Ansible 2.9
##### SUMMARY As detected by https://github.com/ansible/ansible/pull/66920, (some of) these modules have options marked with `removed_in_version='2.9'`. These options should have been removed before Ansible 2.9 was released. Since that is too late, it would be good if they could be removed before Ansible 2.10 is released. ``` lib/ansible/modules/cloud/vmware/vmware_guest_find.py:0:0: ansible-deprecated-version: Argument 'datacenter' in argument_spec has a deprecated removed_in_version '2.9', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) lib/ansible/modules/cloud/vmware/vmware_vmkernel.py:0:0: ansible-deprecated-version: Argument 'ip_address' in argument_spec has a deprecated removed_in_version '2.9', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) lib/ansible/modules/cloud/vmware/vmware_vmkernel.py:0:0: ansible-deprecated-version: Argument 'subnet_mask' in argument_spec has a deprecated removed_in_version '2.9', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/modules/cloud/vmware/vmware_guest_find.py lib/ansible/modules/cloud/vmware/vmware_vmkernel.py ##### ANSIBLE VERSION ```paste below 2.10 ```
https://github.com/ansible/ansible/issues/67016
https://github.com/ansible/ansible/pull/67282
88f0c8522882467d512eb4f1769e0eaf78404760
808bf02588febe08f109364f20ad5d4a96a28100
2020-02-01T13:58:36Z
python
2020-02-11T11:30:22Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,015
["docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/modules/windows/win_psexec.ps1", "lib/ansible/modules/windows/win_psexec.py", "lib/ansible/modules/windows/win_stat.ps1", "lib/ansible/modules/windows/win_stat.py", "test/integration/targets/win_stat/tasks/tests.yml"]
win_stat has option which should be removed for Ansible 2.10
##### SUMMARY As detected by https://github.com/ansible/ansible/pull/66920, this module has an option marked with `removed_in_version='2.10'`. This option should better be removed before Ansible 2.10 is released. ``` lib/ansible/modules/windows/win_stat.ps1:0:0: ansible-deprecated-version: Argument 'get_md5' in argument_spec has a deprecated removed_in_version '2.9', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/modules/windows/win_stat.ps1 ##### ANSIBLE VERSION ```paste below 2.10 ```
https://github.com/ansible/ansible/issues/67015
https://github.com/ansible/ansible/pull/67105
1bb94ec92fe837a30177b192a477522b30132aa1
78470c43c21d834a9513fb309fb219b74a5d1cee
2020-02-01T13:51:09Z
python
2020-02-04T23:02:04Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,014
["docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/modules/windows/win_psexec.ps1", "lib/ansible/modules/windows/win_psexec.py", "lib/ansible/modules/windows/win_stat.ps1", "lib/ansible/modules/windows/win_stat.py", "test/integration/targets/win_stat/tasks/tests.yml"]
win_psexec has option which should be removed for Ansible 2.10
##### SUMMARY As detected by https://github.com/ansible/ansible/pull/66920, this module has an option marked with `removed_in_version='2.10'`. This option should better be removed before Ansible 2.10 is released. ``` lib/ansible/modules/windows/win_psexec.ps1:0:0: ansible-deprecated-version: Argument 'extra_opts' in argument_spec has a deprecated removed_in_version '2.10', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/modules/windows/win_psexec.ps1 ##### ANSIBLE VERSION ```paste below 2.10 ```
https://github.com/ansible/ansible/issues/67014
https://github.com/ansible/ansible/pull/67105
1bb94ec92fe837a30177b192a477522b30132aa1
78470c43c21d834a9513fb309fb219b74a5d1cee
2020-02-01T13:50:55Z
python
2020-02-04T23:02:04Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,012
["changelogs/fragments/67186_remove_deprecated_keys_nxos.yaml", "docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/modules/network/nxos/nxos_igmp_interface.py", "test/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml"]
nxos_igmp_interface has options which should be removed for Ansible 2.10
##### SUMMARY As detected by https://github.com/ansible/ansible/pull/66920, this module has options marked with `removed_in_version='2.10'`. These options should better be removed before Ansible 2.10 is released. ``` lib/ansible/modules/network/nxos/nxos_igmp_interface.py:0:0: ansible-deprecated-version: Argument 'oif_prefix' in argument_spec has a deprecated removed_in_version '2.10', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) lib/ansible/modules/network/nxos/nxos_igmp_interface.py:0:0: ansible-deprecated-version: Argument 'oif_source' in argument_spec has a deprecated removed_in_version '2.10', i.e. the version is less than or equal to the current version of Ansible (2.10.0.dev0) ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/modules/network/nxos/nxos_igmp_interface.py lib/ansible/modules/network/nxos/nxos_igmp_interface.py ##### ANSIBLE VERSION ```paste below 2.10 ```
https://github.com/ansible/ansible/issues/67012
https://github.com/ansible/ansible/pull/67186
11eee1181a9ee8f69bc36c44bbe63cf0554b0bff
88f0c8522882467d512eb4f1769e0eaf78404760
2020-02-01T13:48:39Z
python
2020-02-11T11:27:07Z
closed
ansible/ansible
https://github.com/ansible/ansible
67,003
["lib/ansible/plugins/inventory/toml.py"]
TOML inventory examples in documentation are confusing
##### SUMMARY When browsing the [toml inventory source](https://docs.ansible.com/ansible/latest/plugins/inventory/toml.html) documentation, I found the examples included on that page to be confusing. It looks like there should be three separate example TOML files, but instead, there's one code listing, with three YAML parameters, like: ```yaml example1: | toml here... example2: | toml here... example3: | toml here... ``` This makes it confusing as to how I'm supposed to format my toml-based inventory, because it looks like I can define multiple TOML inventories in one YAML file as arbitrary strings, or something along those lines. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME toml ##### ANSIBLE VERSION N/A ##### CONFIGURATION N/A ##### OS / ENVIRONMENT N/A ##### ADDITIONAL INFORMATION N/A
https://github.com/ansible/ansible/issues/67003
https://github.com/ansible/ansible/pull/71180
172230d7b80c8565c4d9d6b6a8b301932b6785c0
edac065bd2ad3c613413c125cad3eee45e5f0835
2020-01-31T21:35:17Z
python
2020-08-10T20:31:26Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,984
["lib/ansible/modules/windows/win_mapped_drive.py"]
win_mapped_drive unable to add webdav network location
##### SUMMARY Can't use webdav url for path in this module <img width="592" alt="image" src="https://user-images.githubusercontent.com/8070665/73541233-ce143480-4429-11ea-8c03-016c608d0e10.png"> ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME win_mapped_drive ##### ANSIBLE VERSION ``` ansible 2.9.3 config file = None configured module search path = ['/Users/sianob/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.3/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.1 (default, Dec 27 2019, 18:05:45) [Clang 11.0.0 (clang-1100.0.33.16)] ``` ##### OS / ENVIRONMENT mac-os mojave ##### STEPS TO REPRODUCE ``` - name: Create mapped drive with credentials that do not persist on the next logon win_mapped_drive: letter: Z path: "{{ artifactory_url }}" state: present username: "{{ artifactory_user }}" password: "{{ artifactory_token }}" ``` ##### EXPECTED RESULTS mount the webdav share ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ``` TASK [win_common : Create mapped drive with credentials that do not persist on the next logon] ************************************* fatal: [server]: FAILED! => {"changed": false, "msg": "argument for path is of type System.String and we were unable to convert to path: The given path's format is not supported."} ```
https://github.com/ansible/ansible/issues/66984
https://github.com/ansible/ansible/pull/67111
12e3adb23a793844baaf4d91b798a1b418c75179
f23cee214592cb252a96ad808c5d99ca99b81826
2020-01-31T13:01:48Z
python
2020-02-05T03:23:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,974
["changelogs/fragments/66974-mysql_user_doesnt_support_privs_with_underscore.yml", "lib/ansible/modules/database/mysql/mysql_user.py"]
New Percona/MySQL 8 privileges with underscore is not working.
<!--- 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 --> New Percona/MySQL 8 privileges with underscore is not working. the following error is coming `MSG: invalid privileges string: Invalid privileges specified: frozenset({'BACKUP_ADMIN'})` ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> mysql_user module most likely the new privileges needs to be added to lib/ansible/modules/database/mysql/mysql_user.py ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> <!--- 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/66974
https://github.com/ansible/ansible/pull/66995
aad286b403746c6e44ab760b2879fd36aaaf3ebd
16ebeda86d63dc4e693e259a8ad96dc664cdbf1c
2020-01-31T08:37:23Z
python
2020-01-31T19:44:03Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,945
["changelogs/fragments/74625-fix-ansible_play_batch-between-plays.yml", "lib/ansible/executor/task_queue_manager.py", "test/integration/targets/special_vars_hosts/aliases", "test/integration/targets/special_vars_hosts/inventory", "test/integration/targets/special_vars_hosts/playbook.yml", "test/integration/targets/special_vars_hosts/runme.sh"]
ansible_play_batch variable is including unreachable hosts
##### SUMMARY ansible_play_batch variable is including unreachable hosts ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible_play_batch ##### ANSIBLE VERSION ```paste below ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/[removed]/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /[removed]/.local/lib/python3.5/site-packages/ansible executable location = /[removed]/.local/bin/ansible python version = 3.5.2 (default, Oct 8 2019, 13:06:37) [GCC 5.4.0 20160609] ``` ##### CONFIGURATION ```paste below DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 25 DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/inventory'] DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible/ansible.log TRANSFORM_INVALID_GROUP_CHARS(/etc/ansible/ansible.cfg) = ignore ``` ##### OS / ENVIRONMENT ubuntu 16.04 ##### STEPS TO REPRODUCE When evaluating ansible_play_batch using jinja in a playbook, ansible_play_batch returns an unreachable hosts, causing the entire play example below to fail (due to run_once). To reproduce, target two machines, and reboot one machine mid-play (causing an unreachable on that machine). <!--- Paste example playbooks or commands between quotes below --> ```yaml - set_fact: emailBody: | {% for item in ansible_play_batch -%} {% if hostvars[item].kernelVersion != hostvars[item].currentKernel.stdout %} {{ hostvars[item].inventory_hostname + ' - ' + hostvars[item].currentKernel.stdout + ' - ' + hostvars[item].kernelVersion }} {% endif %} {%- endfor %} delegate_to: 127.0.0.1 run_once: True ``` ##### EXPECTED RESULTS ansible_play_batch only includes all non-failed/non-unreachable hosts per documentation found at https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html ##### ACTUAL RESULTS ansible_play_batch is including the rebooted (unreachable) machine. <!--- Paste verbatim command output between quotes --> ```paste below "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'kernelVersion' ```
https://github.com/ansible/ansible/issues/66945
https://github.com/ansible/ansible/pull/74625
df6554c4ec8b1256067bc2510134ac49cfc3003c
cf11c38cafc88ec301f48f9673ec1f554e82a589
2020-01-30T13:55:13Z
python
2021-05-11T15:12:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,943
["changelogs/fragments/66943-handle-unicode-in-safe_eval.yml", "lib/ansible/module_utils/common/text/converters.py", "lib/ansible/template/safe_eval.py", "test/integration/targets/templating_lookups/runme.sh", "test/integration/targets/templating_lookups/template_lookup_safe_eval_unicode/playbook.yml", "test/integration/targets/templating_lookups/template_lookup_safe_eval_unicode/template.json.j2"]
Unicode breaks dict
<!--- 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 Ansible can't parse unicode correctly, when reading template ##### COMPONENT NAME template ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = None configured module search path = [u'/home/home/.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, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` ##### OS / ENVIRONMENT CentOS Linux release 7.7.1908 (Core) ##### STEPS TO REPRODUCE vars.yml ```yaml some_var: "test" ``` templates/example.json.j2 ```json { "something": "test", "this-breaks-key": "This breaks the whole file, because of: ü§", "another-key": "{{ some_var }}" } ``` ```yaml - hosts: test connection: local vars: reference: "{{ lookup('template', 'templates/example.json.j2') }}" delta: {} tasks: - name: Test | Get configuration changes set_fact: delta: "{{ delta | combine({item.key: item.value}, recursive=true) }}" loop: "{{ reference | dict2items }}" ``` ##### EXPECTED RESULTS The valid json file should be correctly parsed and unicode should not be a problem in 2020. Everything works just as expected, when `unicode chars` are removed. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> ```json {"msg": "dict2items requires a dictionary, got <type 'unicode'> instead."} ``` The underlying exception that causes this behavior: ``` Traceback (most recent call last): File "/Users/matt/projects/ansibledev/ansible/lib/ansible/template/safe_eval.py", line 142, in safe_eval compiled = compile(parsed_tree, expr, 'eval') UnicodeEncodeError: 'ascii' codec can't encode characters in position 87-88: ordinal not in range(128) ```
https://github.com/ansible/ansible/issues/66943
https://github.com/ansible/ansible/pull/68576
889da811d7fdc4c0fdab6ff573f7bc66b60b753c
ecd986006ededd3ecfd4fb6704d7a68b3bfba5e1
2020-01-30T13:04:45Z
python
2020-05-20T16:08:50Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,858
["lib/ansible/modules/cloud/ovirt/ovirt_network.py"]
Unable to create new logical network on oVirt
<!--- 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 --> Unable to create new logical network on oVirt ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ovirt_network ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` master ##### 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 --- - hosts: localhost tasks: - ovirt_auth: state: present username: admin@internal password: '123456' url: https://ovirt-master.virt/ovirt-engine/api insecure: true - ovirt_network: auth: "{{ ovirt_auth }}" data_center: Default name: network_123 ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> network is created ##### 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 "/tmp/ansible_ovirt_network_payload_32f6rvf8/ansible_ovirt_network_payload.zip/ansible/modules/cloud/ovirt/ovirt_network.py", line 327, in main File "/tmp/ansible_ovirt_network_payload_32f6rvf8/ansible_ovirt_network_payload.zip/ansible/module_utils/ovirt.py", line 620, in create self.build_entity(), File "/tmp/ansible_ovirt_network_payload_32f6rvf8/ansible_ovirt_network_payload.zip/ansible/modules/cloud/ovirt/ovirt_network.py", line 175, in build_entity File "/tmp/ansible_ovirt_network_payload_32f6rvf8/ansible_ovirt_network_payload.zip/ansible/module_utils/ovirt.py", line 327, in get_id_by_name raise Exception("Entity '%s' was not found.".format(service, name, entity)) Exception: Entity '%s' was not found. fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "clusters": null, "comment": null, "data_center": "Default", "description": null, "external_provider": null, "fetch_nested": false, "id": null, "label": null, "mtu": null, "name": "network_123", "nested_attributes": [], "poll_interval": 3, "state": "present", "timeout": 180, "vlan_tag": null, "vm_network": null, "wait": true } }, "msg": "Entity '%s' was not found." } PLAY RECAP *****************************************************************************************************************************************************************$ localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/66858
https://github.com/ansible/ansible/pull/66859
d385a648c456f14e379e53d4545dbbc6be1ae9e9
b74ca2fe4f8818a17f093ea083fe30263d6dfbdb
2020-01-28T15:12:31Z
python
2020-01-28T16:08:46Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,830
["test/integration/targets/ipify_facts/tasks/main.yml"]
ipify_facts integration tests fail intermittently
<!--- 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 --> The `ipify_facts` integration tests fail intermittently. We may be hitting API limits, but it's hard to tell based on the error message. https://app.shippable.com/github/ansible/ansible/runs/157231/73/tests ``` { "changed": false, "msg": "No valid or no response from url https://api.ipify.org/ within 30 seconds (timeout)" } ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `test/integration/targets/ipify_facts/` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below Shippable ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Shippable ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```shell ansible-test integration --docker centos8 ipify_facts ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Tests pass ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Tests fail <!--- Paste verbatim command output between quotes --> ```paste below { "changed": false, "msg": "No valid or no response from url https://api.ipify.org/ within 30 seconds (timeout)" } ```
https://github.com/ansible/ansible/issues/66830
https://github.com/ansible/ansible/pull/66897
8ba324a33db302ed705fd1935955dfd718462777
91063f40d6470b418616bee638030988ae08bdc9
2020-01-27T22:15:26Z
python
2020-01-29T15:43:40Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,803
["changelogs/fragments/collection-install-mode.yaml", "lib/ansible/galaxy/collection.py", "test/units/cli/test_galaxy.py", "test/units/galaxy/test_collection_install.py"]
Collection tarballs don't preserve file modes
##### SUMMARY If you have executable files in your source code they are not kept in the tarball. Could be related to https://github.com/ansible/ansible/blob/99d7f150873011e7515851db9b44ff486efa9d77/lib/ansible/galaxy/collection.py#L763 This was noticed as I had some auxiliary scripts in my repo. Need to also consider scripts in `files/` if/when Collections support roles. This seems to fail the "principal of least suprise" **Proposal 1: Keep on stripping executable flags** Add some line to the output `WARNING: tests/coverage.sh: source file has executable flag, though this will be ignored in generated tar.gz` Update developing a collection documentation page Update integration tests to ensure that executable mode is always stripped. Update code to link to this issue **Proposal 2: Allow executible flags** Update developing a collection documentation page Update integration tests to ensure that executable mode is preserved Update code to link to this issue Changelog ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-galaxy ##### ANSIBLE VERSION ```paste below 2.10 ``` ##### 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 -->
https://github.com/ansible/ansible/issues/66803
https://github.com/ansible/ansible/pull/68418
a9d2ceafe429171c0e2ad007058b88bae57c74ce
127d54b3630c65043ec12c4af2024f8ef0bc6d09
2020-01-27T11:28:53Z
python
2020-03-24T22:08:23Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,764
["changelogs/fragments/66764-host-pattern-warning.yml", "lib/ansible/playbook/play.py", "test/integration/targets/include_import/empty_group_warning/playbook.yml", "test/integration/targets/include_import/empty_group_warning/tasks.yml", "test/integration/targets/include_import/runme.sh"]
"Could not match supplied host pattern" warning printed for non-empty group before any plays
##### SUMMARY `[WARNING]: Could not match supplied host pattern, ignoring: <group_name>` is printed prior to the first play for a non-empty group when using a combination of group_by and import_role/import_tasks/include_tasks. Using include_role however works correctly (no warning is displayed). ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-playbook ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.4 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/vrevelas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/vrevelas/ansible-warning-bug/venv/lib/python3.6/site-packages/ansible executable location = /home/vrevelas/ansible-warning-bug/venv/bin/ansible python version = 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ``` ##### OS / ENVIRONMENT Ubuntu 18.04 / Python 3.6.9 Note that this behaviour is not reproducible when using the same version of Ansible (2.9.4) and Python 2.7 as opposed to Python 3. ##### STEPS TO REPRODUCE test.yml ```yaml --- - hosts: localhost tasks: - name: Group group_by: key: test_{{ inventory_hostname }} - hosts: test_localhost tasks: - name: Print import_tasks: test-tasks.yml # the below also trigger the warning - but note that it is not issued when include_role is used: # include_tasks: test-tasks.yml # import_role: # name: test ``` test-tasks.yml ```yaml - name: test debug: msg: hello ``` inventory ``` localhost ``` ##### EXPECTED RESULTS No warning should be printed at the beginning of the output. Replacing `import_tasks` with an `include_role` produces the expected result (no warning). ##### ACTUAL RESULTS A false-positive warning is printed at the beginning of the output. Note that the same version of Ansible (2.9.4) installed and run under Python 2.7.17 does not print the false positive warning. ``` ansible-playbook -i inventory test.yml [WARNING]: Could not match supplied host pattern, ignoring: test_localhost PLAY [localhost] **************************************************************************************** TASK [Gathering Facts] ********************************************************************************** ok: [localhost] TASK [Group] ******************************************************************************************** ok: [localhost] PLAY [test_localhost] *********************************************************************************** TASK [Gathering Facts] ********************************************************************************** ok: [localhost] TASK [test] ********************************************************************************************* ok: [localhost] => { "msg": "hello" } PLAY RECAP ********************************************************************************************** localhost : ok=4 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/66764
https://github.com/ansible/ansible/pull/67432
c45d193af4ddac6938ac1bab59deca492b5f739b
9b28f1f5d931b727f2a06270314f2c2a8a5494bb
2020-01-24T14:48:10Z
python
2020-02-14T21:50:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,725
["changelogs/fragments/66726-galaxy-fix-attribute-error.yml", "lib/ansible/cli/galaxy.py"]
ansible galaxy install exception on empty requirements.yml
<!--- 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 exception `ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'keys'` if requirements.yml is empty 2.8.x works as expected. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME galaxy ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.9.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. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml # empty requirements.yml --- ``` run ``` ansible-galaxy install -r requirements.yml -vvv ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ansible 2.8 ``` $ ansible-galaxy install -r requirements.yml ERROR! No roles found in file: requirements.yml ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> ansible 2.9 ``` ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'keys' the full traceback was: Traceback (most recent call last): File "/home/rmoser/.local/share/virtualenvs/ansible-puzzle-SlJRgz1S/bin/ansible-galaxy", line 123, in <module> exit_code = cli.run() File "/home/rmoser/.local/share/virtualenvs/ansible-puzzle-SlJRgz1S/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 375, in run context.CLIARGS['func']() File "/home/rmoser/.local/share/virtualenvs/ansible-puzzle-SlJRgz1S/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 857, in execute_install roles_left = self._parse_requirements_file(role_file)['roles'] File "/home/rmoser/.local/share/virtualenvs/ansible-puzzle-SlJRgz1S/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 461, in _parse_requirements_file extra_keys = set(file_requirements.keys()).difference(set(['roles', 'collections'])) AttributeError: 'NoneType' object has no attribute 'keys' ```
https://github.com/ansible/ansible/issues/66725
https://github.com/ansible/ansible/pull/66726
5c721e8a47848543b4e111783235eafff221666c
9e8fb5b7f535dabfe9cb365091bab7831e5ae5f2
2020-01-23T15:00:48Z
python
2020-01-23T20:06:44Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,720
["changelogs/fragments/66747-zabbix_template-newupdaterule-deletemissinglinkedtemplate.yml", "lib/ansible/modules/monitoring/zabbix/zabbix_template.py"]
Linked Templates not updated with xml/json templates
##### SUMMARY If you import a template with a xml/json file the linked templates of a templates ( so the child templates not the root ones ) aren't processed if you want to remove linked templates. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME zabbix_templates ##### ANSIBLE VERSION ```shell ansible 2.9.2 config file = /mnt/d/Code/gitlab/zabbix-servers/ansible/ansible.cfg configured module search path = ['/home/fism/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /mnt/d/Code/gitlab/zabbix-servers/venv/lib/python3.6/site-packages/ansible executable location = /mnt/d/Code/gitlab/zabbix-servers/venv/bin/ansible python version = 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] ``` ##### OS / ENVIRONMENT Zabbix 4.4.4 on RHEL7 ##### STEPS TO REPRODUCE Export a template (no matter if with Zabbix itself or ansible). Change the corresponding linked template section of a template and reimport it. Exported with Zabbix: ```yaml <zabbix_export> <version>4.4</version> <date>2020-01-23T13:25:32Z</date> <groups> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>fisma</template> <name>fisma</name> <templates> <template> <name>fismb</name> </template> </templates> <groups> <group> <name>Templates</name> </group> </groups> </template> </templates> </zabbix_export> ``` Change to this with removing all linked templates ( fismb in above example ). ```yaml <zabbix_export> <version>4.4</version> <date>2020-01-23T13:25:32Z</date> <groups> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>fisma</template> <name>fisma</name> <groups> <group> <name>Templates</name> </group> </groups> </template> </templates> </zabbix_export> ``` ##### EXPECTED RESULTS fismb should be unlinked from fisma. ##### ACTUAL RESULTS fismb is still linked with fisma.
https://github.com/ansible/ansible/issues/66720
https://github.com/ansible/ansible/pull/66747
99d7f150873011e7515851db9b44ff486efa9d77
055cf91d026c237ee71f30e22f4139313e4f5204
2020-01-23T13:41:07Z
python
2020-01-27T14:20:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,716
["changelogs/fragments/66863-ec2_asg-max_instance_lifetime-and-honor-wait-on-replace.yaml", "lib/ansible/modules/cloud/amazon/ec2_asg.py", "test/integration/targets/ec2_asg/tasks/main.yml"]
ec2_asg: Add MaxInstanceLifetime support
<!--- 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 support for `MaxInstanceLifetime` option to AWS ec2_asg module. AWS feature introduction link: https://aws.amazon.com/about-aws/whats-new/2019/11/amazon-ec2-auto-scaling-supports-max-instance-lifetime/ ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ec2_asg ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> Usage example: <!--- Paste example playbooks or commands between quotes below --> ```yaml - ec2_asg: name: myasg region: us-east-1 launch_config_name: my_new_lc min_size: 1 max_size: 5 desired_capacity: 3 max_instance_lifetime: 604800 # seconds ``` <!--- HINT: You can also paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/66716
https://github.com/ansible/ansible/pull/66863
d2f4d305ee4175cc0315a705824b168b3096e06a
f98874e4f98837e4b9868780b19cf6614b00282a
2020-01-23T12:18:38Z
python
2020-02-15T12:56:39Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,707
["changelogs/fragments/66792-vultr-improve-plan.yml", "lib/ansible/module_utils/vultr.py", "lib/ansible/modules/cloud/vultr/vultr_server.py", "lib/ansible/modules/cloud/vultr/vultr_server_info.py"]
vultr_server_info fails with "Could not find plans with VPSPLANID: 200"
<!--- Verify first that your issue is not already reported on GitHub --> Not found. <!--- Also test if the latest release and devel branch are affected too --> Apologies, I'm not in a position to do that now. <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY vultr_server_info crashes for a server using a no-longer-available plan. I have a vultr server purchased as special offer. That offer is no longer available (boo). It uses plan 200. I suggest vultr_server_info should still return other server data when it cannot find information out about a plan. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> vultr_server_info ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.4 config file = /home/dylan/ansible/ansible.cfg configured module search path = ['/home/dylan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.4 (default, Oct 11 2019, 11:15:58) [Clang 8.0.1 (tags/RELEASE_801/final)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_SSH_ARGS(/home/dylan/ansible/ansible.cfg) = -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 DEFAULT_BECOME_METHOD(/home/dylan/ansible/ansible.cfg) = doas DEFAULT_HOST_LIST(/home/dylan/ansible/ansible.cfg) = ['/home/dylan/ansible/inventory'] DEFAULT_VAULT_PASSWORD_FILE(/home/dylan/ansible/ansible.cfg) = /home/dylan/.vault_password ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> OpenBSD 6.6 fully patched (master and target). Ansible acquired from pip/pip3. vultr_server_info actually run on target , which is the vultr server in question. Vultr can provide all the info about the vm hardware, etc., I hope. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Ansible-playbook running script including yml below. Clearly, one needs a vultr account! <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Gather Vultr servers information vultr_server_info: api_key: "{{ vultr_api }}" register: result - name: Print the gathered information debug: var: result.vultr_server_info ``` <!--- 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 to get information about my vultr server(s). ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> TASK [Gather Vultr servers information] ****************************************************************************************************************************************************** task path: /home/dylan/ansible/tasks/vultr/info.yml:123 <deaddog.example.com> ESTABLISH SSH CONNECTION FOR USER: ansible <deaddog.example.com> SSH: EXEC ssh -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 -o Port=9¾ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/home/dylan/.ansible/cp/0a5f5743ed deaddog.example.com '/bin/sh -c '"'"'echo ~ansible && sleep 0'"'"'' <deaddog.example.com> (0, b'/home/ansible\n', b'') <deaddog.example.com> ESTABLISH SSH CONNECTION FOR USER: ansible <deaddog.example.com> SSH: EXEC ssh -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 -o Port=9¾ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/home/dylan/.ansible/cp/0a5f5743ed deaddog.example.com '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438 `" && echo ansible-tmp-1579766233.5392485-31526552794438="` echo /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438 `" ) && sleep 0'"'"'' <deaddog.example.com> (0, b'ansible-tmp-1579766233.5392485-31526552794438=/home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438\n', b'') Using module file /usr/local/lib/python3.7/site-packages/ansible/modules/cloud/vultr/vultr_server_info.py <deaddog.example.com> PUT /home/dylan/.ansible/tmp/ansible-local-445881sc7e_7k/tmp6l65zgg5 TO /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438/AnsiballZ_vultr_server_info.py <deaddog.example.com> SSH: EXEC sftp -b - -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 -o Port=9¾ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/home/dylan/.ansible/cp/0a5f5743ed '[deaddog.example.com]' <deaddog.example.com> (0, b'sftp> put /home/dylan/.ansible/tmp/ansible-local-445881sc7e_7k/tmp6l65zgg5 /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438/AnsiballZ_vultr_server_info.py\n', b'') <deaddog.example.com> ESTABLISH SSH CONNECTION FOR USER: ansible <deaddog.example.com> SSH: EXEC ssh -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 -o Port=9¾ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/home/dylan/.ansible/cp/0a5f5743ed deaddog.example.com '/bin/sh -c '"'"'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438/ /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438/AnsiballZ_vultr_server_info.py && sleep 0'"'"'' <deaddog.example.com> (0, b'', b'') <deaddog.example.com> ESTABLISH SSH CONNECTION FOR USER: ansible <deaddog.example.com> SSH: EXEC ssh -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 -o Port=9¾ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/home/dylan/.ansible/cp/0a5f5743ed -tt deaddog.example.com '/bin/sh -c '"'"'doas /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-kyusbotingfhthztzyzhtjhwrwcuxdvz ; /usr/local/bin/python3 /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438/AnsiballZ_vultr_server_info.py'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Escalation succeeded <deaddog.example.com> (1, b'\r\r\n\r\n{"msg": "Could not find plans with VPSPLANID: 200", "failed": true, "invocation": {"module_args": {"api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "api_account": "default", "validate_certs": true, "api_timeout": null, "api_retries": null, "api_retry_max_delay": null, "api_endpoint": null}}}\r\n', b'Connection to deaddog.example.com closed.\r\n') <deaddog.example.com> Failed to connect to the host via ssh: Connection to deaddog.example.com closed. <deaddog.example.com> ESTABLISH SSH CONNECTION FOR USER: ansible <deaddog.example.com> SSH: EXEC ssh -C -o ControlMaster=no -o ControlPersist=60s -o ServerAliveInterval=30 -o Port=9¾ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o ControlPath=/home/dylan/.ansible/cp/0a5f5743ed deaddog.example.com '/bin/sh -c '"'"'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1579766233.5392485-31526552794438/ > /dev/null 2>&1 && sleep 0'"'"'' <deaddog.example.com> (0, b'', b'') fatal: [butterfly]: FAILED! => { "changed": false, "invocation": { "module_args": { "api_account": "default", "api_endpoint": null, "api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "api_retries": null, "api_retry_max_delay": null, "api_timeout": null, "validate_certs": true } }, "msg": "Could not find plans with VPSPLANID: 200" } [[NOTE: identifying information may have been nibbled ]] <!--- Paste verbatim command output between quotes --> ```paste below TASK [Gather Vultr servers information] ****************************************************************************************************************************************************** fatal: [butterfly]: FAILED! => {"changed": false, "msg": "Could not find plans with VPSPLANID: 200"} ```
https://github.com/ansible/ansible/issues/66707
https://github.com/ansible/ansible/pull/66792
2dc9841806499810f55c8284bef3d8206ccb20ee
78e666dd39e76c99e2c6d52a07cfa5cba175114a
2020-01-23T08:07:50Z
python
2020-01-28T09:46:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,663
["changelogs/fragments/70284-facts-get-nvme-serial-from-file.yml", "lib/ansible/module_utils/facts/hardware/linux.py"]
device serial number not retrieved without sudo
##### SUMMARY NVMe devices can have their serial number read by reading (eg) /sys/block/nvme1n1/device/serial, without having to try and run sg_inq, which requires root. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME Facts collection, linux.py ##### ANSIBLE VERSION ```paste below $ ansible --version ansible 2.10.0.dev0 config file = None configured module search path = ['/local/apps/egsadmin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /local/apps/egsadmin/randy/ansible-src-current/lib/ansible executable location = /local/apps/egsadmin/randy/ansible-src-current/bin/ansible python version = 3.6.8 (default, Jun 11 2019, 15:15:01) [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 $ ansible-config dump --only-changed <nothing> ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> AWS NVMe-based systems ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run setup task with and without "become" on a system or VM with NVMe and observe that "serial" only appears with "become" <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ansible_devices[*].serial is populated for NVMe, regardless of become ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> ansible_devices[*].serial is populated for NVMe, regardless of become
https://github.com/ansible/ansible/issues/66663
https://github.com/ansible/ansible/pull/70284
8b96caf712d38994cf478b78e34bf019fc30fc9a
953aa26286db433c3509785e24f89f6616233841
2020-01-21T16:59:01Z
python
2020-07-24T05:35:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,617
["changelogs/fragments/66617-version-unicode-fix.yml", "lib/ansible/config/manager.py", "test/integration/targets/unicode/k\u0159\u00ed\u017eek-ansible-project/ansible.cfg", "test/integration/targets/unicode/runme.sh"]
Ansible does not work when the working directory contains some non-ASCII characters
<!--- 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 As of Ansible 2.9, the Ansible CLI commands crashe when the ansible project directory contains some non-ASCII characters. In my case it contains a `é`, a quite common character in french. I get this error: > ERROR! Unexpected Exception, this is probably a bug: 'ascii' codec can't decode byte 0xc3 in position 31: ordinal not in range(128) > to see the full traceback, use -vvv With `---v`, I get that: > ERROR! Unexpected Exception, this is probably a bug: 'ascii' codec can't decode byte 0xc3 in position 31: ordinal not in range(128) > the full traceback was: > > Traceback (most recent call last): > File "/usr/bin/ansible-playbook", line 123, in <module> > exit_code = cli.run() > File "/usr/lib/python2.7/dist-packages/ansible/cli/playbook.py", line 69, in run > super(PlaybookCLI, self).run() > File "/usr/lib/python2.7/dist-packages/ansible/cli/__init__.py", line 82, in run > display.vv(to_text(opt_help.version(self.parser.prog))) > File "/usr/lib/python2.7/dist-packages/ansible/cli/arguments/option_helpers.py", line 174, in version > result += "\n config file = %s" % C.CONFIG_FILE > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 31: ordinal not in range(128) If I remove this character from the directory path, it gets working. Note that this also happens for other Ansible commands, such as `ansible --version`. It sounds like it happens as soon as the project configuration is read. <!--- Explain the problem briefly below --> ##### 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. ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.3 config file = /tmp/project/ansible.cfg configured module search path = [u'/home/username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 7.4.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ANSIBLE_PIPELINING(/tmp/project/ansible.cfg) = True DEFAULT_HOST_LIST(/tmp/project/ansible.cfg) = [u'/tmp/project/hosts'] DEFAULT_REMOTE_USER(/tmp/project/ansible.cfg) = username ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Ubuntu 18.04. Ansible installed from the [Ansible PPA](https://launchpad.net/~ansible). ##### STEPS TO REPRODUCE Create any ansible project in a directory containing a non-ASCII character. <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS Ansible should work and used to work until Ansible 2.9. <!--- Describe what you expected to happen when running the steps above --> ##### ACTUAL RESULTS Get the error reported above. <!--- 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/66617
https://github.com/ansible/ansible/pull/66624
1dd8247fba3fc5e07b65e28bc4b45ddbaa9a93ba
3606dcfe652ab45a8c7e4dedd5e2a64edd820ef5
2020-01-20T08:32:13Z
python
2020-05-29T18:42:44Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,610
["docs/docsite/rst/user_guide/playbooks_reuse_roles.rst"]
Role Variables leak to other Roles when using vars
<!--- 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 --> The documentation for roles (https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html) state that we can pass variable to roles using the following syntax: ``` --- - hosts: webservers roles: - common - role: foo_app_instance vars: dir: '/opt/a' app_port: 5000 - role: foo_app_instance vars: dir: '/opt/b' app_port: 5001 ``` but if the role contains a variable that can be omitted ( |default(omit) ), and this variable is defined in another role, the variable will take the other role value even if it has not been defined in this role. Edit: This is also the case for any default value. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> core ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below AWX 9.1.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. --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> with the following role: ```yaml --- # tasks file for myRole - name: print debug debug: msg: "{{ message | default(omit)}}" ``` and the following playbook: ```yaml --- - name: POC hosts: all roles: - role: myRole vars: message: "my message" - role: myRole ``` <!--- 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 [myRole : print debug] **************************************************** task path: /tmp/awx_57_w8e0389h/project/roles/myRole/tasks/main.yml:4 ok: [kimsufi.pandore2015.fr] => { "msg": "my message" } TASK [myRole : print debug] **************************************************** task path: /tmp/awx_59_mvl8pj9p/project/roles/myRole/tasks/main.yml:4 ok: [kimsufi.pandore2015.fr] => { "msg": "Hello world!" } ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below TASK [myRole : print debug] **************************************************** task path: /tmp/awx_57_w8e0389h/project/roles/myRole/tasks/main.yml:4 ok: [kimsufi.pandore2015.fr] => { "msg": "my message" } TASK [myRole : print debug] **************************************************** task path: /tmp/awx_57_w8e0389h/project/roles/myRole/tasks/main.yml:4 ok: [kimsufi.pandore2015.fr] => { "msg": "my message" } ```
https://github.com/ansible/ansible/issues/66610
https://github.com/ansible/ansible/pull/66907
adf73d47ec7440ad7c56dd755b76c3c329079a89
c8568a5c9431b6d3770d555f865b2d88a294e3d8
2020-01-19T22:31:20Z
python
2020-01-30T16:08:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,609
["lib/ansible/modules/packaging/language/maven_artifact.py", "test/units/modules/packaging/language/test_maven_artifact.py"]
maven_repository: Maven Central now requires `https` and 501 on `http`
##### SUMMARY As of 2019-01-15 Maven Central now requires `https`. https://support.sonatype.com/hc/en-us/articles/360041287334 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME * maven_repository ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below It's in the build system. Full out not relevant. ANSIBLE_VERSION=2.8.5 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below Not relevant ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. Ubuntu 18.04 CIS --> ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Attempt to get an artifact from Maven Central using `http` instead of `https` <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Download latest agent from maven central maven_artifact: group_id: com.contrastsecurity artifact_id: contrast-agent version: "{{ contrast_agent_version }}" dest: "{{ contrast_agent_path }}/contrast/contrast.jar" owner: tomcat group: tomcat mode: 0644 ``` <!--- 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 expected the artifact to be copied to the AMI as it has done for years before this :-) ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> amazon-ebs: TASK [contrast : Download latest agent from maven central] ********************* amazon-ebs: fatal: [teamserver-intuit-1579469195]: FAILED! => {"changed": false, "msg": "Failed to download artifact com.contrastsecurity:contrast-agent:3.6.9.11819 because of HTTP Error 501: HTTPS Requiredfor URL http://repo1.maven.org/maven2/com/contrastsecurity/contrast-agent/3.6.9.11819/contrast-agent-3.6.9.11819.jar"} amazon-ebs: http://repo1.maven.org/maven2/com/contrastsecurity/contrast-agent/3.6.9.11819/contrast-agent-3.6.9.11819.jar <!--- Paste verbatim command output between quotes --> ```paste below Not sure what command you are referring to? ```
https://github.com/ansible/ansible/issues/66609
https://github.com/ansible/ansible/pull/66611
3bf8b1d1c99cf5354cb7687d4a8669a144f3f90d
7129453cd96b40b527a14b16cfcd7fee6d342ca2
2020-01-19T22:29:10Z
python
2020-01-20T05:46:49Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,593
["changelogs/fragments/66866_nxos_fan_facts.yaml", "lib/ansible/module_utils/network/nxos/facts/legacy/base.py"]
Ansible crashes on nxos_facts with virtual Nexus
##### SUMMARY Ansible crashes when `gather_facts` is true for a playbook targeting virtual Nexus switches. I believe this is because it’s looking for information about fans but it’s virtual so there are no fans. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME nxos_facts ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.1 config file = /Users/kbreit/development/gitlab/dev/network_configuration/ansible.cfg configured module search path = ['/Users/kbreit/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.5 (default, Nov 1 2019, 02:16:38) [Clang 10.0.0 (clang-1000.11.45.5)] ``` ##### OS / ENVIRONMENT Control node is macOS Target is NX-OS 9.3(3) ##### STEPS TO REPRODUCE <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Configure Access Devices connection: network_cli gather_facts: true hosts: all tasks: - debug: var: hostvars ``` ##### EXPECTED RESULTS I expect the playbook to execute, even if it’s a single task. It should collect facts. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below <e7csco0nxos03.datalinklabs.local> EXEC /bin/sh -c 'rm -f -r /Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/ > /dev/null 2>&1 && sleep 0' fatal: [e7csco0nxos03.datalinklabs.local]: FAILED! => { "ansible_facts": {}, "changed": false, "failed_modules": { "nxos_facts": { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "exception": "Traceback (most recent call last):\n File \"/Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/AnsiballZ_nxos_facts.py\", line 102, in <module>\n _ansiballz_main()\n File \"/Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/AnsiballZ_nxos_facts.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/AnsiballZ_nxos_facts.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.nxos.nxos_facts', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 188, in run_module\n fname, loader, pkg_name)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/modules/network/nxos/nxos_facts.py\", line 239, in <module>\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/modules/network/nxos/nxos_facts.py\", line 230, in main\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/nxos/facts/facts.py\", line 71, in get_facts\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/common/facts/facts.py\", line 124, in get_network_legacy_facts\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/nxos/facts/legacy/base.py\", line 594, in populate\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/nxos/facts/legacy/base.py\", line 631, in parse_structured_fan_info\nKeyError: 'TABLE_faninfo'\n", "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/AnsiballZ_nxos_facts.py\", line 102, in <module>\n _ansiballz_main()\n File \"/Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/AnsiballZ_nxos_facts.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/kbreit/.ansible/tmp/ansible-local-78117vavbd2gv/ansible-tmp-1579321879.577556-95130404538599/AnsiballZ_nxos_facts.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.nxos.nxos_facts', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 188, in run_module\n fname, loader, pkg_name)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/modules/network/nxos/nxos_facts.py\", line 239, in <module>\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/modules/network/nxos/nxos_facts.py\", line 230, in main\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/nxos/facts/facts.py\", line 71, in get_facts\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/common/facts/facts.py\", line 124, in get_network_legacy_facts\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/nxos/facts/legacy/base.py\", line 594, in populate\n File \"/var/folders/mv/cqcg7q510t9b5bn580y3ksb80000gq/T/ansible_nxos_facts_payload_YMZD8m/ansible_nxos_facts_payload.zip/ansible/module_utils/network/nxos/facts/legacy/base.py\", line 631, in parse_structured_fan_info\nKeyError: 'TABLE_faninfo'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1, "warnings": [ "Platform darwin on host e7csco0nxos03.datalinklabs.local 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." ] } }, "msg": "The following modules failed to execute: nxos_facts\n" } ```
https://github.com/ansible/ansible/issues/66593
https://github.com/ansible/ansible/pull/66866
72e1716f29fbd25f0aa98fdbe36eaa959ea805ed
bf65e7a3f6b89e0b22e30a9944fe75a37230844c
2020-01-18T04:38:45Z
python
2020-01-30T15:23:21Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,546
["test/integration/targets/setup_docker/tasks/RedHat-8.yml", "test/integration/targets/setup_docker/vars/RedHat-8.yml"]
setup_docker integration test failing
<!--- 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 --> The `setup_docker` integration test role is failing on CentOS 8 due to missing packages. This seems to be intermittent. I cannot duplicate it locally and the packages seem to be available (at least in a test container I'm running locally). [Example failed job](https://app.shippable.com/github/ansible/ansible/runs/156205/96/console) ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `test/integration/targets/setup_docker` ##### 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 Default ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Shippable CentOS 8 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ``` ansible-test integration --docker centos8 docker_container -vvv ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Tests pass ##### ACTUAL RESULTS ``` TASK [setup_docker : Install Docker pre-reqs] ********************************** task path: /root/ansible/test/results/.tmp/integration/docker_container-5ud2taj7-ÅÑŚÌβŁÈ/test/integration/targets/setup_docker/tasks/RedHat-8.yml:4 ... fatal: [testhost]: FAILED! => { "changed": false, "failures": [ "No package dnf-utils available.", "No package device-mapper-persistent-data available.", "No package lvm2 available." ], "invocation": { "module_args": { "allow_downgrade": false, "autoremove": false, "bugfix": false, "conf_file": null, "disable_excludes": null, "disable_gpg_check": false, "disable_plugin": [], "disablerepo": [], "download_dir": null, "download_only": false, "enable_plugin": [], "enablerepo": [], "exclude": [], "install_repoquery": true, "install_weak_deps": true, "installroot": "/", "list": null, "lock_timeout": 30, "name": [ "dnf-utils", "device-mapper-persistent-data", "lvm2", "libseccomp" ], "releasever": null, "security": false, "skip_broken": false, "state": "present", "update_cache": false, "update_only": false, "validate_certs": true } }, "msg": "Failed to install some of the specified packages", "rc": 1, "results": [] } ```
https://github.com/ansible/ansible/issues/66546
https://github.com/ansible/ansible/pull/66572
dd68458da2f38bab0d713c2ef58fcc2bebd98029
f15050b09eb8060f4a7c5863630fed4a39a0c57c
2020-01-16T19:55:34Z
python
2020-01-18T04:41:42Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,544
["lib/ansible/plugins/doc_fragments/files.py"]
File Module wrongly interprets numeric username as uid
<!--- 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 the file module to set the owner of a file to a numeric username is wrongly interpreted as setting the uid of a file. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> This affects the file module's 'owner' attribute/functionality and probably the 'group' functionality as well. ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/alyjak/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/alyjak/.local/lib/python3.7/site-packages/ansible executable location = /home/alyjak/.local/bin/ansible python version = 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_CALLBACK_WHITELIST(/etc/ansible/ansible.cfg) = ['profile_roles'] DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/inventory'] DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = ['/etc/ansible/roles'] DEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = yaml RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ``` $ uname -a Linux alyjak-vbox-deb 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux ``` ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> Running the following example playbook using the following command is sufficient to reproduce this for me: `ansible-playbook --ask-become-pass repro.yaml` where `repro.yaml` looks like the following: ```yaml - hosts: localhost become: yes become_user: root tasks: - file: path: /tmp/bar.txt state: touch - stat: path: /tmp/bar.txt register: one - debug: var: one.stat - file: path: /tmp/bar.txt owner: "1234" - stat: path: /tmp/bar.txt register: two - debug: var: two.stat ``` <!--- 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 would expect this to mirror `chown` functionality, which afaik when given a numeric user will first try a uid lookup with the username (something like `id -u <name>` to see if the provided name is a username or uid before assuming the provided argument is a uid. Better yet, always assume user is a username and provide a different argument to set permissions based on a uid. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> as can be seen in the example output, the uid is equal to the provided username. <!--- Paste verbatim command output between quotes --> ```paste below $ ansible-playbook --ask-become-pass test.yaml BECOME password: [WARNING]: Unable to parse /etc/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 [Gathering Facts] *********************************************************************************************************************************************************************** Thursday 16 January 2020 13:08:02 -0500 (0:00:00.038) 0:00:00.038 ****** ok: [localhost] TASK [file] ********************************************************************************************************************************************************************************** Thursday 16 January 2020 13:08:03 -0500 (0:00:01.238) 0:00:01.276 ****** changed: [localhost] TASK [stat] ********************************************************************************************************************************************************************************** Thursday 16 January 2020 13:08:04 -0500 (0:00:00.596) 0:00:01.873 ****** ok: [localhost] TASK [debug] ********************************************************************************************************************************************************************************* Thursday 16 January 2020 13:08:04 -0500 (0:00:00.573) 0:00:02.446 ****** ok: [localhost] => one.stat.uid: '0' TASK [file] ********************************************************************************************************************************************************************************** Thursday 16 January 2020 13:08:04 -0500 (0:00:00.127) 0:00:02.573 ****** changed: [localhost] TASK [stat] ********************************************************************************************************************************************************************************** Thursday 16 January 2020 13:08:05 -0500 (0:00:00.386) 0:00:02.960 ****** ok: [localhost] TASK [debug] ********************************************************************************************************************************************************************************* Thursday 16 January 2020 13:08:05 -0500 (0:00:00.431) 0:00:03.391 ****** ok: [localhost] => two.stat.uid: '1234' PLAY RECAP *********************************************************************************************************************************************************************************** localhost : ok=7 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 16 January 2020 13:08:05 -0500 (0:00:00.125) 0:00:03.516 ****** =============================================================================== gather_facts ------------------------------------------------------------ 1.24s stat -------------------------------------------------------------------- 1.00s file -------------------------------------------------------------------- 0.98s debug ------------------------------------------------------------------- 0.25s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ total ------------------------------------------------------------------- 3.48s ```
https://github.com/ansible/ansible/issues/66544
https://github.com/ansible/ansible/pull/79470
d8dc76e134fa458690acbd70f0cb9a009dbb5e29
913e4863afe44b516e03906868cec7b38f3d2802
2020-01-16T18:10:02Z
python
2023-02-02T19:17:18Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,537
["contrib/inventory/cobbler.py"]
SyntaxWarning over comparison of literals using is in cobbler module.
##### SUMMARY SyntaxWarning over using is for comparison of literals. The fix is simple and is a good beginner issue. ``` contrib/inventory/cobbler.py:218: SyntaxWarning: "is not" with a literal. Did you mean "!="? if this_dns_name is not None and this_dns_name is not "": ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME cobbler ##### ANSIBLE VERSION devel branch
https://github.com/ansible/ansible/issues/66537
https://github.com/ansible/ansible/pull/66543
717b7fee9f369d5b588c1e82cd2c80300c4e8caf
c2ad25020b5fa2f334d61581fb936d3fa58c3280
2020-01-16T16:39:30Z
python
2020-02-15T13:19:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,534
["changelogs/fragments/galaxy-download.yaml", "docs/docsite/rst/user_guide/collections_using.rst", "lib/ansible/cli/galaxy.py", "lib/ansible/galaxy/collection.py", "test/integration/targets/ansible-galaxy-collection/tasks/download.yml", "test/integration/targets/ansible-galaxy-collection/tasks/main.yml"]
ansible-galaxy cli should have an option to keep the collection tarball when installing collection
<!--- 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 --> Use case is for customers on air-gapped customers who want to take the tarball using a flash drive inside their network. Currently that is not possible because cli does not keep the tarball after installing the collection. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ansible-galaxy cli ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> <!--- 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/66534
https://github.com/ansible/ansible/pull/67632
28f8b8976022728b24534cae871d2b3c8724ecce
a2deeb8fa27633194d12dfd8e8768ab57100e6d1
2020-01-16T15:02:42Z
python
2020-03-24T22:32:43Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,530
["lib/ansible/module_utils/network/ios/utils/utils.py", "test/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml", "test/integration/targets/ios_l3_interfaces/vars/main.yaml"]
Module ios_l3_interfaces doesn't set ipv6 correctly when state replaced
<!--- 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 --> New network modules were added in ansible version 2.9. While testing I came across a bug. More precisely module **ios_l3_interfaces** doesn't set ipv6 addresses correctly when state set to **replaced**. Instead of replacing IP, module just adds it (same behavior as when state is set to merged). ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ios_l3_interfaces ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.0 ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below Nothing that would affect module logic ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Host = Debian 9, python 2.7.13 Target = Cisco WS-C4500X-16 Version 03.11.00.E ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Before config: ``` interface Vlan100 ipv6 address 2001:DB8::1/32 ipv6 enable ``` Ansible playbook example: ```yaml - name: Configure IPv6 hosts: cisco4500 gather_facts: yes tasks: - ios_l3_interfaces: config: - name: Vlan100 ipv6: - address: 2001:DB8::2/32 state: replaced ``` ##### EXPECTED RESULTS I expect module to change IP address from 2001:DB8::1/32 to 2001:DB8::2/32 It works like this for ipv4 (same module) and for ipv4/ipv6 in junos_l3_interfaces. Expected after config: ``` interface Vlan100 ipv6 address 2001:DB8::2/32 ipv6 enable ``` ##### ACTUAL RESULTS It merges instead of replaces. Actual after config: ``` interface Vlan100 ipv6 address 2001:DB8::1/32 ipv6 address 2001:DB8::2/32 ipv6 enable ``` Ansible verbose output: ``` changed: [cisco4500] => { "after": [ { "name": "loopback0" }, { "name": "FastEthernet1" }, { "name": "TenGigabitEthernet1/1" }, { "name": "TenGigabitEthernet1/2" }, { "name": "TenGigabitEthernet1/3" }, { "name": "TenGigabitEthernet1/4" }, { "name": "TenGigabitEthernet1/5" }, { "name": "TenGigabitEthernet1/6" }, { "name": "TenGigabitEthernet1/7" }, { "name": "TenGigabitEthernet1/8" }, { "name": "TenGigabitEthernet1/9" }, { "name": "TenGigabitEthernet1/10" }, { "name": "TenGigabitEthernet1/11" }, { "name": "TenGigabitEthernet1/12" }, { "name": "TenGigabitEthernet1/13" }, { "name": "TenGigabitEthernet1/14" }, { "name": "TenGigabitEthernet1/15" }, { "name": "TenGigabitEthernet1/16" }, { "ipv6": [ { "address": "2001:DB8::1/32" }, { "address": "2001:DB8::2/32" } ], "name": "Vlan100" } ], "before": [ { "name": "loopback0" }, { "name": "FastEthernet1" }, { "name": "TenGigabitEthernet1/1" }, { "name": "TenGigabitEthernet1/2" }, { "name": "TenGigabitEthernet1/3" }, { "name": "TenGigabitEthernet1/4" }, { "name": "TenGigabitEthernet1/5" }, { "name": "TenGigabitEthernet1/6" }, { "name": "TenGigabitEthernet1/7" }, { "name": "TenGigabitEthernet1/8" }, { "name": "TenGigabitEthernet1/9" }, { "name": "TenGigabitEthernet1/10" }, { "name": "TenGigabitEthernet1/11" }, { "name": "TenGigabitEthernet1/12" }, { "name": "TenGigabitEthernet1/13" }, { "name": "TenGigabitEthernet1/14" }, { "name": "TenGigabitEthernet1/15" }, { "name": "TenGigabitEthernet1/16" }, { "ipv6": [ { "address": "2001:DB8::1/32" } ], "name": "Vlan100" } ], "changed": true, "commands": [ "interface Vlan100", "ipv6 address 2001:DB8::2/32" ], "invocation": { "module_args": { "config": [ { "ipv6": [ { "address": "2001:DB8::2/32" } ], "name": "Vlan100" } ], "state": "replaced" } } } ```
https://github.com/ansible/ansible/issues/66530
https://github.com/ansible/ansible/pull/66654
ebf21bb48d565b1a860fa7be9b1149a18f52a7da
0c4f167b82e8c898dd8e6d5b00fcd76aa483d875
2020-01-16T13:49:43Z
python
2020-01-22T08:05:51Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,529
["changelogs/fragments/66529-display-both-loop-and-cond-errors.yml", "lib/ansible/executor/task_executor.py"]
Multiple when conditions including a defined check fails if written on a single line
<!--- 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've spent the better part of a working day troubleshooting this specific issue, and I don't think this issue is documented or already reported. I have a dictionary, which *sometimes* contains a list of dicts to be looped on, depending on what a key in the inside dict is set to. So obviously I want to skip the task entirely when that list isn't present, and that is not a problem. But when combined with a check for a key value on item inside the loop, the when condition fails complaining about the list being undefined. Which is hugely annoying as I was checking explicitly for that in the first condition of my when statement. This is part of a larger playbook which I cannot share, but I've managed to reproduce it with a small test case. I will paste two small playbooks, one that works and one that doesn't. (But in my opinion it should.) ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible-playbook 2.8.0a1.post0 config file = /Users/jh/git/ansible_cisco/ansible.cfg configured module search path = [u'/Users/jh/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Users/jh/git/ansible_cisco/lib/python2.7/site-packages/ansible executable location = ./bin/ansible-playbook python version = 2.7.10 (default, Feb 22 2019, 21:55:15) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` DEFAULT_STDOUT_CALLBACK(/Users/jh/git/ansible_cisco/ansible.cfg) = skippy DEFAULT_TIMEOUT(/Users/jh/git/ansible_cisco/ansible.cfg) = 300 HOST_KEY_CHECKING(/Users/jh/git/ansible_cisco/ansible.cfg) = False INTERPRETER_PYTHON(/Users/jh/git/ansible_cisco/ansible.cfg) = ./bin/python PARAMIKO_LOOK_FOR_KEYS(/Users/jh/git/ansible_cisco/ansible.cfg) = False PERSISTENT_COMMAND_TIMEOUT(/Users/jh/git/ansible_cisco/ansible.cfg) = 300 PERSISTENT_CONNECT_TIMEOUT(/Users/jh/git/ansible_cisco/ansible.cfg) = 300 RETRY_FILES_ENABLED(/Users/jh/git/ansible_cisco/ansible.cfg) = False TRANSFORM_INVALID_GROUP_CHARS(/Users/jh/git/ansible_cisco/ansible.cfg) = ignore ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Running MacOS X Mojave and use a python virtualenv for the sole purpose of having stable versions of everything in this specific repository. None of this should matter though as this seems to be a purely ansible core thing. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> This playbook will fail with an error about mylist2 not being defined, despite the when statement explicitly checking for that. Remove the and item.test = test part from the when statement and it will work correctly. ``` --- - name: test ansible when defined hosts: localhost become: no gather_facts: no vars: mydict: var1: "val1" var2: "val2" mylist1: - test1 - test2 tasks: - debug: var: mydict - debug: msg: "This shouldn't be printed." with_items: "{{mydict.mylist2}}" when: mydict.mylist2 is defined and item.test = 'test' ``` This version, with the parts of the when statement on different lines works: ``` --- - name: test ansible when defined hosts: localhost become: no gather_facts: no vars: mydict: var1: "val1" var2: "val2" mylist1: - test1 - test2 tasks: - debug: var: mydict - debug: msg: "This shouldn't be printed." with_items: "{{mydict.mylist2}}" when: - mydict.mylist2 is defined - item.test = 'test' ``` <!--- 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 would expect both cases to work, and just skip the second task. ``` ./bin/ansible-playbook works.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 [test ansible when defined] ************************************************************************************* TASK [debug] ********************************************************************************************************* ok: [localhost] => { "mydict": { "mylist1": [ "test1", "test2" ], "var1": "val1", "var2": "val2" } } TASK [debug] ********************************************************************************************************* PLAY RECAP *********************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ``` ./bin/ansible-playbook fails.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 [test ansible when defined] ************************************************************************************* TASK [debug] ********************************************************************************************************* ok: [localhost] => { "mydict": { "mylist1": [ "test1", "test2" ], "var1": "val1", "var2": "val2" } } TASK [debug] ********************************************************************************************************* fatal: [localhost]: FAILED! => {"msg": "'dict object' has no attribute 'mylist2'"} PLAY RECAP *********************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/66529
https://github.com/ansible/ansible/pull/68485
1e01ac413b874d77cab74457ab6b38f6a1d5becb
061c6c7c6fdb26ca572eba2ccff2557106435c44
2020-01-16T12:48:07Z
python
2020-05-28T21:13:39Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,464
["changelogs/fragments/66464-lookup-case-sensitivity-fix.yml", "docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/template/__init__.py"]
custom lookup plugin found with ansible-doc but not found in playbook
##### SUMMARY Custom lookup plugin appears correctly configured using ```ansible-doc -t lookup listFolders``` however always results in ```FAILED! => {"msg": "lookup plugin (listFolders) not found"}``` when used in playbook. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME - Custom lookup plugin ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = /Users/xxxx/.ansible.cfg configured module search path = ['/Users/xxxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.2_1/libexec/lib/python3.8/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.8.1 (default, Dec 27 2019, 18:05:45) [Clang 11.0.0 (clang-1100.0.33.16)] ``` ##### CONFIGURATION ``` defaults only ``` ##### OS / ENVIRONMENT - macOS Mojave 10.14.6 - zsh 5.3 (x86_64-apple-darwin18.0) ##### STEPS TO REPRODUCE Here is a trivial custom lookup plugin that just contains documentation to test my configuration. It is placed in /Users/xxxx/.ansible/plugins/lookup/listFolders.py ``` DOCUMENTATION = """ lookup: listFolders short_description: returns list from yaml descriptor description: - This lookup returns a list from the yaml descriptor """ ``` This command correctly pics up the lookup plugin: ```ansible-doc -t lookup listFolders``` And shows the output: ``` > LISTFOLDERS (/Users/xxxx/.ansible/plugins/lookup/listFolders.py) This lookup returns a list from the yaml descriptor * This module is maintained by The Ansible Community METADATA: status: - preview supported_by: community ``` However in a playbook I always hit this error: ```fatal: [localhost]: FAILED! => {"msg": "lookup plugin (listFolders) not found"}``` Here is a sample playbook that produces the error: ``` --- - name: "Test custom lookup plugin" hosts: localhost tasks: - name: lookup listFolders debug: msg: '{{ lookup("listFolders") }}' ``` ##### EXPECTED RESULTS ``` TASK [lookup listFolders] *************************************************************************************************************************************************************** ok: [localhost] ``` ##### ACTUAL RESULTS ``` TASK [lookup listFolders] *************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"msg": "lookup plugin (listFolders) not found"} ``` <!--- Paste verbatim command output between quotes --> ``` > ansible-playbook testplaybook.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 [Test custom lookup plugin] ************************************************************************************************************************ TASK [Gathering Facts] ****************************************************************************************************************************************************************** ok: [localhost] TASK [lookup listFolders] *************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"msg": "lookup plugin (listFolders) not found"} PLAY RECAP ****************************************************************************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/66464
https://github.com/ansible/ansible/pull/66521
3ce644051543d5750b1eb03bf92556e5f243bea2
4ca0c7f11676f62ba5298abf2e506f1e953767da
2020-01-14T08:35:18Z
python
2020-01-27T20:09:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,457
["lib/ansible/modules/cloud/vmware/vmware_host_facts.py"]
VMware: require "vmware_host_facts" module return ESXi server update version info
<!--- 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 --> Now "vmware_host_facts" module returns the ESXi version and build number, no update version info, so request getting that info too. References: https://www.virtuallyghetto.com/2016/08/quick-tip-how-to-retrieve-the-esxi-update-level-using-the-vsphere-api.html MOB path: https://esxi_hostname/mob/?moid=ha-adv-options&doPath=setting%5b%22Misc.HostAgentUpdateLevel%22%5d ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> vmware_host_facts ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> Some features of ESXi are introduced in specific ESXi update release, so it's better to get that info and use it as a condition before some tasks. <!--- 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/66457
https://github.com/ansible/ansible/pull/67162
4dd2513371800c649eeb45ea0bd819ac3ebd153b
1b263e77de4c5714a558fe0fe5934363a2d85649
2020-01-14T02:58:02Z
python
2020-02-10T16:47:29Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,450
["changelogs/fragments/66451-win_dns_client-dhcp-support.yml", "lib/ansible/modules/windows/win_dns_client.ps1", "lib/ansible/modules/windows/win_dns_client.py", "test/integration/targets/win_dns_client/tasks/main.yml"]
win_dns_client should properly report status when setting DHCP
<!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY The `win_dns_client` module always shows "changed" when setting the adapter to use DHCP because the PowerShell cmdlets and WMI classes don't have a reliable way to determine that DHCP assigned nameservers are already in use. A comment in the module suggests checking the registry. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME win_dns_client ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> As is, it's not possible to know whether a change was actually made (or would be made in check mode). <!--- Paste example playbooks or commands between quotes below --> <!--- HINT: You can also paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/66450
https://github.com/ansible/ansible/pull/66451
e3d5dc0ed065de989318e8e1ccc10b574c57056b
be26f4916f6bfa07be119b91aadb5fa209f0bf13
2020-01-14T00:52:53Z
python
2020-02-17T05:35:54Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,434
["changelogs/fragments/service_fix_obsd.yml", "lib/ansible/modules/service.py"]
OpenBSD service_flags do not get set
<!--- 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 "service" module somehow utterly fails to handle the "arguments" parameter on OpenBSD targets, never detecting any change, and so never doing anything. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME service module ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.2 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 = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 99 DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = smart DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log DISPLAY_ARGS_TO_STDOUT(/etc/ansible/ansible.cfg) = True RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True ``` ##### OS / ENVIRONMENT Ansible controller: CentOS 7.7.1908 Target: OpenBSD 6.6-STABLE ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml [root@ansible playbooks]# cat openbsd-syslog.yml --- - hosts: openbsd remote_user: root tasks: - name: edit lineinfile: path: /etc/syslog.conf line: '*,mark.* @{{ log_host }}:55514' - name: adjust syslogd settings service: name: syslogd state: started arguments: -Zhr - name: adjust syslogd settings and restart service: name: syslogd state: restarted # vim:set ts=2 sw=2 nu cursorcolumn: ``` ##### EXPECTED RESULTS Should change /etc/rc.conf.local : syslogd_flags=-Zhr, by invoking "rcctl set syslogd flags -Zhr" ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below [root@ansible playbooks]# ansible-playbook -vvvv openbsd-syslog.yml -l rancid.merlinoffice.local ansible-playbook 2.9.2 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 = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [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 /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (2.2.1) doesn't match a supported version! RequestsDependencyWarning) Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc PLAYBOOK: openbsd-syslog.yml ********************************************************************************************************************************************************************* Positional arguments: openbsd-syslog.yml subset: rancid.merlinoffice.local become_method: sudo inventory: (u'/etc/ansible/hosts',) forks: 99 tags: (u'all',) verbosity: 4 connection: smart timeout: 10 1 plays in openbsd-syslog.yml PLAY [openbsd] *********************************************************************************************************************************************************************************** TASK [Gathering Facts gather_subset=['all'], gather_timeout=10] ********************************************************************************************************************************** task path: /etc/ansible/playbooks/openbsd-syslog.yml:2 Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py Pipelining is enabled. <rancid.merlinoffice.local> ESTABLISH SSH CONNECTION FOR USER: root <rancid.merlinoffice.local> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/6a9df0150f rancid.merlinoffice.local '/bin/sh -c '"'"'/usr/local/bin/python2.7 && sleep 0'"'"'' <rancid.merlinoffice.local> (0, '\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "ansible_facts": {"ansible_product_serial": "VMware-42 1d 80 7b 59 37 e8 e3-7e c6 4c d0 83 10 25 94", "ansible_product_version": "None", "ansible_fips": false, "ansible_service_mgr": "bsdinit", "ansible_user_id": "root", "ansible_selinux_python_present": false, "ansible_memtotal_mb": 2031, "gather_subset": ["all"], "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEDCENHjwCqvucund+mo7WlTqg1JeF9rGwkY+R5My/6aF2FVi20+zSo81jA+HQRcdEyfYCAry7zhL1BNI5qDm/Q=", "ansible_kernel_version": "GENERIC.MP#3", "ansible_distribution_version": "6.6", "ansible_domain": "merlinoffice.local", "ansible_virtualization_type": "VMware", "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIB8EEog+UQDB9WhZybSi3C1OaL2CXkjUS/M8rR+ZV0pZ", "ansible_processor_cores": "2", "ansible_virtualization_role": "guest", "ansible_dns": {"nameservers": ["10.1.1.5", "10.1.1.6"], "domain": "merlin.mb.ca", "search": ["merlin.mb.ca", "merlin.ca", "merlinoffice.local"]}, "ansible_effective_group_id": 0, "ansible_processor": ["Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz", "Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz"], "ansible_date_time": {"weekday_number": "1", "iso8601_basic_short": "20200113T140923", "tz": "CST", "weeknumber": "02", "hour": "14", "year": "2020", "minute": "09", "tz_offset": "-0600", "month": "01", "epoch": "1578946163", "iso8601_micro": "2020-01-13T20:09:23.896760Z", "weekday": "Monday", "time": "14:09:23", "date": "2020-01-13", "iso8601": "2020-01-13T20:09:23Z", "day": "13", "iso8601_basic": "20200113T140923896480", "second": "23"}, "ansible_userspace_bits": "64", "ansible_architecture": "amd64", "ansible_real_user_id": 0, "ansible_default_ipv4": {"status": "active", "macaddress": "00:50:56:9d:5b:e2", "network": "10.1.1.0", "media": "Ethernet", "mtu": "1500", "broadcast": "10.1.1.255", "interface": "vic0", "netmask": "255.255.255.0", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "address": "10.1.1.23", "device": "vic0", "media_select": "autoselect", "type": "ether", "gateway": "10.1.1.1"}, "ansible_default_ipv6": {"status": "active", "macaddress": "00:50:56:9d:5b:e2", "media": "Ethernet", "mtu": "1500", "interface": "vic0", "prefix": "64", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "address": "fe80::250:56ff:fe9d:5be2%vic0", "device": "vic0", "scope": "0x1", "media_select": "autoselect", "type": "ether", "gateway": "2620:b0:0:3::1"}, "ansible_user_gid": 0, "ansible_system_vendor": "VMware, Inc.", "ansible_apparmor": {"status": "disabled"}, "ansible_effective_user_id": 0, "ansible_distribution_release": "release", "ansible_mounts": [{"block_used": 2147744, "size_total": 21132113920, "block_total": 10318415, "mount": "/", "block_available": 8170671, "size_available": 16733534208, "fstype": "ffs", "inode_total": 2650366, "options": "rw,wxallowed,sync", "device": "cd72b15d8f2e1e30.a", "inode_used": 303019, "block_size": 16384, "inode_available": 2347347}, {"block_used": 8590976, "size_total": 21132113920, "block_total": 41273660, "mount": "/var/www/rancid", "block_available": 32682684, "size_available": 16733534208, "fstype": "nfs", "inode_total": 2650366, "options": "auto,ro,soft,intr", "device": "localhost:/var/rancid", "inode_used": 303019, "block_size": 8192, "inode_available": 2347347}], "ansible_selinux": {"status": "Missing selinux Python library"}, "ansible_os_family": "OpenBSD", "ansible_vic0": {"status": "active", "macaddress": "00:50:56:9d:5b:e2", "media": "Ethernet", "mtu": "1500", "flags": ["UP", "BROADCAST", "RUNNING", "SIMPLEX", "MULTICAST"], "ipv4": [{"broadcast": "10.1.1.255", "netmask": "255.255.255.0", "network": "10.1.1.0", "address": "10.1.1.23"}], "ipv6": [{"scope": "0x1", "prefix": "64", "address": "fe80::250:56ff:fe9d:5be2%vic0"}, {"prefix": "64", "address": "2620:b0:0:3::23"}], "device": "vic0", "media_select": "autoselect", "type": "ether"}, "ansible_product_uuid": "421d807b-5937-e8e3-7ec6-4cd083102594", "ansible_fqdn": "rancid.merlinoffice.local", "ansible_product_name": "VMware Virtual Platform", "ansible_pkg_mgr": "openbsd_pkg", "ansible_memfree_mb": 0, "ansible_devices": ["sd0:cd72b15d8f2e1e30"], "ansible_user_uid": 0, "ansible_fibre_channel_wwn": [], "ansible_distribution": "OpenBSD", "ansible_user_dir": "/root", "ansible_env": {"SHELL": "/bin/ksh", "SSH_CLIENT": "2620:b0:0:3::41 40830 22", "PWD": "/root", "LOGNAME": "root", "USER": "root", "PATH": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin", "MAIL": "/var/mail/root", "SSH_CONNECTION": "2620:b0:0:3::41 40830 2620:b0:0:3::23 22", "HOME": "/root", "_": "/bin/sh"}, "ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBAMLzajIzlt2GEKtoldLCZKFz65LUgTb3auiqJMewPTu10gwYrAUkt3XUX1lqXxw9114eMe0Adema30fUL6cOtJ8SWVEMaBaL9Sj7dogXRKNllGP8neebFYzOwE6Sx6GeROfJ+YxAmLSrot1mi3QzxUuKzggi3W8+1HefV+aIQB/DAAAAFQDJfqp7krfqsLxJMwZdjDKkndNIdwAAAIEApdkWCeKvKWqWIRHxA5t+dfzDYYba7QQ/rwu4WKS484PBxClUHOQtEVlkr9Y7VEuFWieDNJeqGDMR72h6j4biQgQsguA6bifhMk4+7A8FyeN/0jjH1m++tFyddwaFecXKnFQof6S/oazAbZMGsazCj3QZHKvgPrLxlQgIbXZ9sIUAAACBAK5Kf1jqJUYCwc5GV6LbPJC6bu1hFM3mRbvsEbZdYhCJFGVaQCe4SdM5EUEb9KogTctQlnGV6ZFuyOZ7s7zgnGAYrr62vi2tYpcbdy5EPZOlLdz0jFT+03P/CqCC8QKcesC5Te1i8IwbjXt2XpKRCm8ToCc469eG8Lo3UiDKXIJT", "module_setup": true, "ansible_iscsi_iqn": "", "ansible_hostname": "rancid", "ansible_processor_count": "2", "ansible_lo0": {"macaddress": "unknown", "mtu": "32768", "flags": ["UP", "LOOPBACK", "RUNNING", "MULTICAST"], "ipv4": [{"broadcast": "127.255.255.255", "netmask": "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}], "ipv6": [{"prefix": "128", "address": "::1"}, {"scope": "0x3", "prefix": "64", "address": "fe80::1%lo0"}], "device": "lo0", "type": "loopback"}, "ansible_real_group_id": 0, "ansible_lsb": {}, "ansible_all_ipv6_addresses": ["fe80::250:56ff:fe9d:5be2%vic0", "2620:b0:0:3::23"], "ansible_interfaces": ["lo0", "vic0"], "ansible_local": {}, "ansible_machine": "amd64", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDpn65VAyOKf9FRdOILke6D+6pEp2WDtlXcQobXh4w50Zid/pG4B3t1cGjaPelycQBMOPyT8qnpDnv0QxPvaQdLjgRsl44+jObWT+pakM+7r+TW8o/5st9W/Dkfz/fQeQrvuDpGeiV443V9CvOcl2j/fA/J4yh/JCzSmXFFO+kp/6BUKD0e6eldyw7iaS6LkxwGbZNLsDx3OHD7WmLRva8BMgUHQN0HoELdPSHI3q9Mqy5dJcsLjZwn0hV4kgP3RKWEvJq9Jm5VgsRbHl8Z1R+P74zBjBZupGCM/Iqu1SIUESfNtZ1btYU/BtScYyj2P4/nFC5eo472x0jAdMdjbXrP", "ansible_user_gecos": "Charlie &", "ansible_python": {"executable": "/usr/local/bin/python2.7", "version": {"micro": 16, "major": 2, "releaselevel": "final", "serial": 0, "minor": 7}, "type": "CPython", "has_sslcontext": true, "version_info": [2, 7, 16, "final", 0]}, "ansible_kernel": "6.6", "ansible_is_chroot": false, "ansible_hostnqn": "", "ansible_nodename": "rancid.merlinoffice.local", "ansible_system": "OpenBSD", "ansible_user_shell": "/bin/ksh", "ansible_all_ipv4_addresses": ["10.1.1.23"], "ansible_python_version": "2.7.16"}}\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\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 = 19690\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') ok: [rancid.merlinoffice.local] META: ran handlers TASK [edit path=/etc/syslog.conf, line=*,mark.* @{{ log_host }}:55514] *************************************************************************************************************************** task path: /etc/ansible/playbooks/openbsd-syslog.yml:6 Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/lineinfile.py Pipelining is enabled. <rancid.merlinoffice.local> ESTABLISH SSH CONNECTION FOR USER: root <rancid.merlinoffice.local> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/6a9df0150f rancid.merlinoffice.local '/bin/sh -c '"'"'/usr/local/bin/python2.7 && sleep 0'"'"'' <rancid.merlinoffice.local> (0, '\n{"msg": "", "diff": [{"after": "", "before_header": "/etc/syslog.conf (content)", "after_header": "/etc/syslog.conf (content)", "before": ""}, {"before_header": "/etc/syslog.conf (file attributes)", "after_header": "/etc/syslog.conf (file attributes)"}], "changed": false, "backup": "", "invocation": {"module_args": {"directory_mode": null, "force": null, "remote_src": null, "backrefs": false, "insertafter": null, "path": "/etc/syslog.conf", "owner": null, "follow": false, "validate": null, "group": null, "insertbefore": null, "unsafe_writes": null, "create": false, "setype": null, "content": null, "serole": null, "state": "present", "selevel": null, "regexp": null, "line": "*,mark.* @graylog.merlinoffice.local:55514", "src": null, "seuser": null, "delimiter": null, "mode": null, "firstmatch": false, "attributes": null, "backup": false}}}\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\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 = 19690\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') ok: [rancid.merlinoffice.local] => { "backup": "", "changed": false, "diff": [ { "after": "", "after_header": "/etc/syslog.conf (content)", "before": "", "before_header": "/etc/syslog.conf (content)" }, { "after_header": "/etc/syslog.conf (file attributes)", "before_header": "/etc/syslog.conf (file attributes)" } ], "invocation": { "module_args": { "attributes": null, "backrefs": false, "backup": false, "content": null, "create": false, "delimiter": null, "directory_mode": null, "firstmatch": false, "follow": false, "force": null, "group": null, "insertafter": null, "insertbefore": null, "line": "*,mark.* @graylog.merlinoffice.local:55514", "mode": null, "owner": null, "path": "/etc/syslog.conf", "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "present", "unsafe_writes": null, "validate": null } }, "msg": "" } TASK [adjust syslogd settings state=started, name=syslogd, arguments=-Zhr] *********************************************************************************************************************** task path: /etc/ansible/playbooks/openbsd-syslog.yml:11 Running service Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/service.py Pipelining is enabled. <rancid.merlinoffice.local> ESTABLISH SSH CONNECTION FOR USER: root <rancid.merlinoffice.local> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/6a9df0150f rancid.merlinoffice.local '/bin/sh -c '"'"'/usr/local/bin/python2.7 && sleep 0'"'"'' <rancid.merlinoffice.local> (0, '\n{"invocation": {"module_args": {"name": "syslogd", "pattern": null, "enabled": null, "state": "started", "sleep": null, "arguments": "-Zhr", "runlevel": "default"}}, "state": "started", "changed": false, "name": "syslogd"}\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\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 = 19690\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') ok: [rancid.merlinoffice.local] => { "changed": false, "invocation": { "module_args": { "arguments": "-Zhr", "enabled": null, "name": "syslogd", "pattern": null, "runlevel": "default", "sleep": null, "state": "started" } }, "name": "syslogd", "state": "started" } TASK [adjust syslogd settings and restart state=restarted, name=syslogd] ************************************************************************************************************************* task path: /etc/ansible/playbooks/openbsd-syslog.yml:17 Running service Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/service.py Pipelining is enabled. <rancid.merlinoffice.local> ESTABLISH SSH CONNECTION FOR USER: root <rancid.merlinoffice.local> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/6a9df0150f rancid.merlinoffice.local '/bin/sh -c '"'"'/usr/local/bin/python2.7 && sleep 0'"'"'' <rancid.merlinoffice.local> (0, '\n{"invocation": {"module_args": {"name": "syslogd", "pattern": null, "enabled": null, "state": "restarted", "sleep": null, "arguments": "", "runlevel": "default"}}, "state": "started", "changed": true, "name": "syslogd"}\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\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 = 19690\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') changed: [rancid.merlinoffice.local] => { "changed": true, "invocation": { "module_args": { "arguments": "", "enabled": null, "name": "syslogd", "pattern": null, "runlevel": "default", "sleep": null, "state": "restarted" } }, "name": "syslogd", "state": "started" } META: ran handlers META: ran handlers PLAY RECAP *************************************************************************************************************************************************************************************** rancid.merlinoffice.local : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/66434
https://github.com/ansible/ansible/pull/80628
d5e2e7a0a8ca9017a091922648430374539f878b
9bd698b3a78ad9abc9d0b1775d8f67747a13b295
2020-01-13T20:09:45Z
python
2023-04-27T20:15:24Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,417
["changelogs/fragments/66463-zabbix_template-fix-error-linktemplate-and-importdump.yml", "lib/ansible/modules/monitoring/zabbix/zabbix_template.py"]
zabbix_template check_template_changed error
##### SUMMARY KeyError: 'templates' on second run ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME zabbix_template ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = /mnt/d/Code/gitlab/zabbix-servers/ansible/ansible.cfg configured module search path = ['/home/fism/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /mnt/d/Code/gitlab/zabbix-servers/venv/lib/python3.6/site-packages/ansible executable location = /mnt/d/Code/gitlab/zabbix-servers/venv/bin/ansible python version = 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] ``` ##### STEPS TO REPRODUCE On first run the new template is created ```yaml - name: "create test template" zabbix_template: server_url: "{{ zabbix_apiserver_url }}" login_user: "{{ zabbix_apiuser_rw }}" login_password: "{{ zabbix_apipassword_rw }}" state: present template_name: test1 template_groups: - "Templates" ``` If you run it a second time errors are thrown. ##### EXPECTED RESULTS The second run should succeed without changes. ##### ACTUAL RESULTS ```shell The full traceback is: Traceback (most recent call last): File "<stdin>", line 102, in <module> File "<stdin>", line 94, in _ansiballz_main File "<stdin>", line 40, in invoke_module File "/usr/lib/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_zabbix_template_payload_9t34ekm5/ansible_zabbix_template_payload.zip/ansible/modules/zabbix_template.py", line 743, in <module> File "/tmp/ansible_zabbix_template_payload_9t34ekm5/ansible_zabbix_template_payload.zip/ansible/modules/zabbix_template.py", line 727, in main File "/tmp/ansible_zabbix_template_payload_9t34ekm5/ansible_zabbix_template_payload.zip/ansible/modules/zabbix_template.py", line 398, in check_template_changed KeyError: 'templates' fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n F ile \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\ n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_zabbix_template_payload_9t34ekm5/ansi ble_zabbix_template_payload.zip/ansible/modules/zabbix_template.py\", line 743, in <module>\n File \"/tmp/ansible_zabbix_template_payload_9t34ekm5/ansible_zabbix_template_payload.zip/ansible/modules/ zabbix_template.py\", line 727, in main\n File \"/tmp/ansible_zabbix_template_payload_9t34ekm5/ansible_zabbix_template_payload.zip/ansible/modules/zabbix_template.py\", line 398, in check_template_ch anged\nKeyError: 'templates'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } ``` This is what the existing_template variable looks like ```json { 'zabbix_export': { 'version': '4.4', 'date': '2020-01-13T14: 47: 28Z', 'groups': [ { 'name': 'Templates' } ], 'templates': [ { 'template': 'fismc', 'name': 'fismc', 'groups': [ { 'name': 'Templates' } ], 'items': [ { 'name': 'asdf', 'key': 'asdf' } ] } ] } } ``` So it seams that it fails if there aren't other templates linked.
https://github.com/ansible/ansible/issues/66417
https://github.com/ansible/ansible/pull/66463
eb3d081c1188c10a560b919f48ef9b517a0df65d
e646bd08e1f77b0e2c535c1b3d577ef49df7a41a
2020-01-13T14:55:35Z
python
2020-01-23T13:22:19Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,414
["changelogs/fragments/ssh_connection_fixes.yml", "lib/ansible/cli/arguments/option_helpers.py", "lib/ansible/config/base.yml", "lib/ansible/config/manager.py", "lib/ansible/playbook/play_context.py", "lib/ansible/plugins/connection/ssh.py", "lib/ansible/plugins/strategy/__init__.py", "lib/ansible/utils/ssh_functions.py", "test/integration/targets/connection_windows_ssh/runme.sh", "test/units/plugins/connection/test_ssh.py"]
meta: reset_connection not working on Ansible 2.9.1
##### SUMMARY I add a user to a group, execute the meta module reset_connection, check the group association again, just to find that the connection is still the same. And it's still the same ssh session! ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME Meta Module : reset_connection ##### ANSIBLE VERSION ansible 2.9.1 config file = /workspace/ansible_test_2@2/ansible/ansible.cfg configured module search path = [u'/var/jenkins_home/.ansible/plugins/modules', u'/usr/shar e/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, Aug 7 2019, 00:51:29) [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 ANSIBLE_SSH_ARGS(/workspace/ansible_test_2@2/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=30m ANSIBLE_SSH_CONTROL_PATH(/workspace/ansible_test_2@2/ansible/ansible.cfg) = %(directory)s/%%h-%%p-%%r DEFAULT_HOST_LIST(/workspace/ansible_test_2@2/ansible/ansible.cfg) = [u'/environmen_data'] DEFAULT_REMOTE_USER(/workspace/ansible_test_2@2/ansible/ansible.cfg) = USER DEFAULT_ROLES_PATH(/workspace/ansible_test_2@2/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles', u'/${WORKSPACE}/ansible/roles', u'/workspace/ansible_test_2@2/aHOST_KEY_CHECKING(/workspace/ansible_test_2@2/ansible/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Targed OS = Red Hat Enterprise Linux Server release 7.7 (Maipo) running a normal docker-ce installation Source OS = Docker Container based on a CentOS v5 image, Ansible has been installed manually and it works perfectly. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Check group association with id shell command, change group association using the normal ansible module -> Check id shell command again. <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Id Check 1 shell: id register: id_output - name: Give output of Id Check 1 debug: msg: '{{ id_output.stdout }}' - name: Modify User User group association user: name: '{{ ansible_user }}' groups: docker append: true state: present - name: reset the SSH_CONNECTION!!!! meta: reset_connection # Optional , try a docker command - name: try a docker ps command shell: docker ps register: docker_output ignore_errors: true - name: give output of docker command debug: msg: '{{ docker_output.stdout }}' - name: Id Check 2 shell: id register: id_output_2 - name: Give output of Id Check 2 debug: msg: '{{ id_output_2.stdout }}' ``` <!--- 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 ansible user is added to the docker group, SSH Connection is resetted so that group association is updated. And the second ID command reflects the new group association. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The session is not interrupted, so that the current session is not updated with the new Group ! Thus i cannot use a docker command. <!--- Paste verbatim command output between quotes --> ```paste below The -vvv run of the playbook runs with the META task . META: reset connection So maybe i'm missing something, But i cannot find any indicator that it's the problem with my config file or so. ```
https://github.com/ansible/ansible/issues/66414
https://github.com/ansible/ansible/pull/73708
43300e22798e4c9bd8ec2e321d28c5e8d2018aeb
935528e22e5283ee3f63a8772830d3d01f55ed8c
2020-01-13T13:15:04Z
python
2021-03-03T20:25:16Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,349
["changelogs/fragments/66349-include-role-omit.yml", "lib/ansible/playbook/included_file.py", "test/integration/targets/include_import/include_role_omit/playbook.yml", "test/integration/targets/include_import/include_role_omit/roles/foo/tasks/main.yml", "test/integration/targets/include_import/runme.sh"]
omit does not work on includes
<!--- 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 include_role complains if parameter vars_from is given but no vars file exists ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME include_role ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.8.6 config file = /adm/afroebel/ansible/unix/ansible.cfg configured module search path = [u'/adm/afroebel/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.9 (default, Sep 14 2019, 20:00:08) [GCC 4.9.2] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_GATHERING(/adm/afroebel/ansible/unix/ansible.cfg) = explicit DEFAULT_MANAGED_STR(/adm/afroebel/ansible/unix/ansible.cfg) = {file} DEFAULT_PRIVATE_ROLE_VARS(/adm/afroebel/ansible/unix/ansible.cfg) = True DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = [u'/adm/afroebel/ansible/unix/test'] PERSISTENT_CONNECT_TIMEOUT(/adm/afroebel/ansible/unix/ansible.cfg) = 30 ``` ##### OS / ENVIRONMENT Ansible controller: Debian GNU/Linux 8 managed devices: Oracle Solaris 11.3/11.4 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> Here's a simple Ansible playbook file test/include_role.yml with a single include_role task: ```yaml --- - name: "Test Playbook" hosts: "os_solaris" tasks: - include_role: name: "test_role/solaris" ``` The role consists of the following files and directories and only executes one debug task, which outputs the role name: ``` drwxr-xr-x 4 ... test/roles/test_role/solaris drwxr-xr-x 2 ... test/roles/test_role/solaris/tasks -rw-r--r-- 1 ... test/roles/test_role/solaris/tasks/main.yml drwxr-xr-x 2 ... test/roles/test_role/solaris/vars ``` When executed as follow all works well: ``` # ansible-playbook -i inventory test/include_role.yml -l test07 PLAY [Test Playbook] ************************************************************** TASK [include_role : test_role/solaris] ******************************************* TASK [test_role/solaris : debug] ************************************************** ok: [test07] => { "msg": "test_role/solaris" } PLAY RECAP ************************************************************************ test07 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` Now we slightly change the Playbook by adding the vars_from parameter to the include_role statement and setting it to the default value of "main". ```yaml --- - name: "Test Playbook" hosts: "os_solaris" tasks: - include_role: name: "test_role/solaris" vars_from: "main" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> As we set the vars_from parameter to the default value we would expect the playbook to run the same way as without the parameter. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Instead it complains about the vars file not being found. <!--- Paste verbatim command output between quotes --> ```paste below PLAY [Test Playbook] ************************************************************** TASK [include_role : test_role/solaris] ******************************************* ERROR! Could not find specified file in role: vars/main PLAY RECAP ************************************************************************ ```
https://github.com/ansible/ansible/issues/66349
https://github.com/ansible/ansible/pull/74879
605b1a1c5c3f551835a8228149df0f15e3c4d06d
840825b79c83af67a87eec00ba05b7d2d63d2553
2020-01-10T14:14:59Z
python
2021-06-03T19:07:16Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,341
["changelogs/fragments/66604-powershell-unc-paths.yml", "lib/ansible/plugins/shell/powershell.py", "test/units/plugins/shell/test_powershell.py"]
Add UNC path support to the Fetch action
##### SUMMARY Fetch module fails with path not found error when used with UNC path. ##### ISSUE TYPE - ~Bug Report~ - Feature Idea ##### COMPONENT NAME Fetch module ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/ikanse/.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.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION ``` No changes from the default config ``` ##### OS / ENVIRONMENT ``` Control node: Fedora release 30 (Thirty) Manged node: Windows Server 2016 Datacenter Version: 1607 ``` ##### STEPS TO REPRODUCE Create a share on the managed Windows node. ``` - hosts: localhost gather_facts: false tasks: - name: Add hostname supplied by variable to adhoc_group add_host: name: "HOST" groups: adhoc_group ansible_user: Administrator ansible_password: 'PASSWORD' ansible_connection: winrm ansible_winrm_transport: basic ansible_winrm_server_cert_validation: ignore ansible_winrm_connection_timeout: 600 - hosts: adhoc_group tasks: - name: win copy win_copy: dest: '\\EC2AMAZ-T130RGR\testshare\test123.txt' src: testvars.yml - name: access file fetch: src: '\\EC2AMAZ-T130RGR\testshare\test123.txt' dest: /tmp/ flat: yes ``` ##### EXPECTED RESULTS Path is rendered correctly and the file is fetched from the remote server. ##### ACTUAL RESULTS The path is not rendered correctly by fetch module: ``` "msg": "Path EC2AMAZ-T130RGR\\testshare\\test123.txt is not found" ``` From win_copy module we can see that correct path is used: ``` "dest": "\\\\EC2AMAZ-T130RGR\\testshare\\test123.txt", ``` ``` ansible-playbook 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/ikanse/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.7.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] Using /etc/ansible/ansible.cfg as config file host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Parsed /etc/ansible/hosts inventory source with ini plugin [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAYBOOK: main.yml ************************************************************************************* 2 plays in main.yml PLAY [localhost] *************************************************************************************** META: ran handlers TASK [Add hostname supplied by variable to adhoc_group] ************************************************ task path: /home/ikanse/ansible/windows/main.yml:5 creating host via 'add_host': hostname=13.235.83.165 changed: [localhost] => { "add_host": { "groups": [ "adhoc_group" ], "host_name": "13.235.83.165", "host_vars": { "ansible_connection": "winrm", "ansible_password": "PASSWORD", "ansible_user": "Administrator", "ansible_winrm_connection_timeout": 600, "ansible_winrm_server_cert_validation": "ignore", "ansible_winrm_transport": "basic" } }, "changed": true } META: ran handlers META: ran handlers PLAY [adhoc_group] ************************************************************************************* TASK [Gathering Facts] ********************************************************************************* task path: /home/ikanse/ansible/windows/main.yml:16 Using module file /usr/lib/python3.7/site-packages/ansible/modules/windows/setup.ps1 Pipelining is enabled. <13.235.83.165> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 13.235.83.165 EXEC (via pipeline wrapper) ok: [13.235.83.165] META: ran handlers TASK [win copy] **************************************************************************************** task path: /home/ikanse/ansible/windows/main.yml:18 Using module file /usr/lib/python3.7/site-packages/ansible/modules/windows/win_copy.ps1 Pipelining is enabled. <13.235.83.165> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 13.235.83.165 EXEC (via pipeline wrapper) ok: [13.235.83.165] => { "changed": false, "checksum": "4e8bfbc031942c909e62592f6a3e728af39c156c", "dest": "\\\\EC2AMAZ-T130RGR\\testshare\\test123.txt", "operation": "file_copy", "original_basename": "testvars.yml", "size": 15, "src": "testvars.yml" } TASK [access file] ************************************************************************************* task path: /home/ikanse/ansible/windows/main.yml:23 Using module file /usr/lib/python3.7/site-packages/ansible/modules/windows/win_stat.ps1 Pipelining is enabled. <13.235.83.165> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 13.235.83.165 EXEC (via pipeline wrapper) Using module file /usr/lib/python3.7/site-packages/ansible/modules/windows/slurp.ps1 Pipelining is enabled. EXEC (via pipeline wrapper) fatal: [13.235.83.165]: FAILED! => { "changed": false, "msg": "Path EC2AMAZ-T130RGR\\testshare\\test123.txt is not found" } PLAY RECAP ********************************************************************************************* 13.235.83.165 : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ```
https://github.com/ansible/ansible/issues/66341
https://github.com/ansible/ansible/pull/66604
81378b3e744cd0d13b33d18a4f8a38aeb8a6e97a
fc7980af9a42676913b4054163570ee438b82e9c
2020-01-10T09:31:47Z
python
2020-02-04T06:34:11Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,304
["changelogs/fragments/66304-facts_containerd.yml", "lib/ansible/module_utils/facts/virtual/linux.py"]
fact "ansible_virtualization_type" incorrect for alpine container on GitHub runner "ubuntu-latest"
#### SUMMARY GitHub offers a shared runner of the type ["ubuntu-latest"](https://github.com/robertdebock/ansible-role-hostname/blob/master/.github/workflows/ansible.yml#L27). When molecule spins up an [Alpine container](https://hub.docker.com/repository/docker/robertdebock/alpine), `setup` returns ["VirtualPC"]( https://github.com/robertdebock/ansible-role-debug/runs/376964341#step:6:2307) for `ansible_virtualization_type`. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME setup ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = None configured module search path = ['/home/robertdb/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.5 (default, Dec 15 2019, 17:54:26) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION ``` # empty ``` ##### OS / ENVIRONMENT [GitHub runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources) are Ubuntu machines, [hosted on Azure](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#cloud-hosts-for-github-hosted-runners) ##### STEPS TO REPRODUCE This can only be reproduced in CI, as I don't know any other way to start this type of instance manually. I use this code to check if the play is running in a container: <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: reproduce debug: msg: "I am running in a container" when: - ansible_virtualization_type == "docker" ``` ##### EXPECTED RESULTS I was expecting `ansible_virtualization_type` to return `docker`. ##### ACTUAL RESULTS The fact `ansible_virtualization_type` is set to `VirtualPC` Likely this code is related: https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts/virtual/linux.py#L134
https://github.com/ansible/ansible/issues/66304
https://github.com/ansible/ansible/pull/72210
afba5c2852086590a208a0d1d9938908aed3ed4f
69e510e7672d556702f648fbcda1143c00fb781f
2020-01-09T16:28:22Z
python
2020-10-20T15:39:13Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,271
["lib/ansible/modules/windows/win_user_right.py"]
win_user_right module doesn't support none or 'null' as a data type
##### SUMMARY I have a requirement to ensure that certain Windows users right polices are set to to none. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME win_user_right ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> The win_user_right module is the module that should be used in this case. However, win_user_right doesn't support this specific use case of setting a policy to 'null'. I believe the crux of the problem is when a policy is set to 'null' `$lsa_helper.EnumerateAccountsWithUserRight($name)` will fail to find the permission (i.e. policy). I would suggest an enhancement that would support the following playbook. ```yaml win_user_right: name: SeDenyRemoteInteractiveLogonRight action: none ``` Notice in the above playbook, I'm suggesting adding another action of type `none`. If this action were specified, then `users` shall not be required. Obviously, the TRY, CATCH block around `$lsa_helper.EnumerateAccountsWithUserRight($name)` would need to be adjusted to account for the failure to find the permission (i.e. name) specified. I might have time to get to this if no one else picks it up before I can.
https://github.com/ansible/ansible/issues/66271
https://github.com/ansible/ansible/pull/66315
891c759832d48c3a30f59fedadf6e7016167e897
93bfa4b07ad30cce58a30ffda5db866895aad075
2020-01-08T15:33:32Z
python
2020-01-09T20:33:00Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,263
["changelogs/fragments/66263-podman-connection-no-pause-rootless.yml", "lib/ansible/plugins/connection/podman.py"]
ansible + podman connector not working
##### SUMMARY When using ansible with the podman connector (rootless container as user), I am not able to execute any commands. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME podman connector plugin ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = None configured module search path = ['/var/home/dschier/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /var/home/dschier/.venv-python3/lib64/python3.7/site-packages/ansible executable location = /var/home/dschier/.venv-python3/bin/ansible python version = 3.7.5 (default, Dec 15 2019, 17:54:26) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION ##### OS / ENVIRONMENT - Fedora 31 - Podman 1.6.2 - Ansible 2.9.2 (via pip / virtualenv) ##### STEPS TO REPRODUCE 1. Start a container as user ``` podman run -d --rm --name instance fedora:31 sleep 300 ``` 2. Execute some ansible ``` ansible instance -c podman -m setup -i inventory ``` ##### EXPECTED RESULTS ``` ansible gathers the facts ``` ##### ACTUAL RESULTS ``` ansible 2.9.2 config file = None configured module search path = ['/var/home/dschier/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /var/home/dschier/.venv-python3/lib64/python3.7/site-packages/ansible executable location = /var/home/dschier/.venv-python3/bin/ansible python version = 3.7.5 (default, Dec 15 2019, 17:54:26) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] No config file found; using defaults setting up inventory plugins host_list declined parsing /var/home/dschier/Projects/while-true-do/ansible-testing/inventory as it did not pass its verify_file() method script declined parsing /var/home/dschier/Projects/while-true-do/ansible-testing/inventory as it did not pass its verify_file() method auto declined parsing /var/home/dschier/Projects/while-true-do/ansible-testing/inventory as it did not pass its verify_file() method Parsed /var/home/dschier/Projects/while-true-do/ansible-testing/inventory inventory source with ini plugin Loading callback plugin minimal of type stdout, v2.0 from /var/home/dschier/.venv-python3/lib64/python3.7/site-packages/ansible/plugins/callback/minimal.py META: ran handlers <instance> RUN [b'podman', b'mount', b'instance'] Failed to mount container instance: b'Error: cannot mount using driver overlay in rootless mode' <instance> RUN [b'podman', b'exec', b'instance', b'/bin/sh', b'-c', b'echo ~ && sleep 0'] <instance> RUN [b'podman', b'exec', b'instance', b'/bin/sh', b'-c', b'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1578473717.9823112-75096948351551 `" && echo ansible-tmp-1578473717.9823112-75096948351551="` echo /root/.ansible/tmp/ansible-tmp-1578473717.9823112-75096948351551 `" ) && sleep 0'] <instance> Attempting python interpreter discovery <instance> RUN [b'podman', b'exec', b'instance', b'/bin/sh', b'-c', b"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"] <instance> RUN [b'podman', b'exec', b'instance', b'/bin/sh', b'-c', b'/usr/bin/python3.7 && sleep 0'] [WARNING]: Unhandled error in Python interpreter discovery for host instance: Expecting value: line 1 column 1 (char 0) Using module file /var/home/dschier/.venv-python3/lib64/python3.7/site-packages/ansible/modules/system/setup.py <instance> PUT /var/home/dschier/.ansible/tmp/ansible-local-232076i4n4mlw/tmpmbdk1qd0 TO /root/.ansible/tmp/ansible-tmp-1578473717.9823112-75096948351551/AnsiballZ_setup.py <instance> RUN [b'podman', b'cp', b'/var/home/dschier/.ansible/tmp/ansible-local-232076i4n4mlw/tmpmbdk1qd0', b'instance:/root/.ansible/tmp/ansible-tmp-1578473717.9823112-75096948351551/AnsiballZ_setup.py'] instance | FAILED! => { "msg": "Failed to copy file from /var/home/dschier/.ansible/tmp/ansible-local-232076i4n4mlw/tmpmbdk1qd0 to /root/.ansible/tmp/ansible-tmp-1578473717.9823112-75096948351551/AnsiballZ_setup.py in container instance\nb'Error: cannot copy into running rootless container with pause set - pass --pause=false to force copying\\n'" } ```
https://github.com/ansible/ansible/issues/66263
https://github.com/ansible/ansible/pull/66583
7ae53312187ad036971faeea1fd08d77a89aa67f
077a8b489852ceb7fc3ca6b00d52d369f46256a7
2020-01-08T08:55:30Z
python
2020-01-17T21:41:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,242
["lib/ansible/modules/monitoring/uptimerobot.py"]
uptimerobot: fails with stacktrace
##### SUMMARY The uptimerobot module fails with stacktrace on decoding the upstream response. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME The uptimerobot module. ##### ANSIBLE VERSION ``` ansible 2.8.1 config file = /var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg configured module search path = ['/var/lib/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.5.2 (default, Oct 8 2019, 13:06:37) [GCC 5.4.0 20160609] ``` ##### CONFIGURATION ``` ANSIBLE_NOCOWS(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = True ANSIBLE_PIPELINING(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = True CONDITIONAL_BARE_VARS(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = False DEFAULT_FORKS(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = 10 DEFAULT_HOST_LIST(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = ['/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/<redacted>/inventory.ini'] DEFAULT_ROLES_PATH(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = ['/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/roles'] DEFAULT_VAULT_PASSWORD_FILE(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = /var/lib/jenkins/.vault MAX_FILE_SIZE_FOR_DIFF(/var/lib/jenkins/workspace/Subtask_Openstack_Playbook/ansible.cfg) = 10485760 ``` ##### OS / ENVIRONMENT Not relevant. ##### STEPS TO REPRODUCE Run something like the following task. ```yaml - name: Monitor - {{ desired_state }} uptimerobot: monitorid: "{{ monitor_id | string }}" apikey: "{{ uptimerobot_api_key }}" state: "{{ desired_state }}" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS The playbook runs without stacktraces and changes the uptimerobot state to `{{ desired_state }}`. ##### ACTUAL RESULTS ``` FAILED - RETRYING: Monitor - paused (291 retries left).Result was: { "attempts": 10, "changed": true, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 114, in <module>\n File \"<stdin>\", line 106, in _ansiballz_main\n File \"<stdin>\", line 49, in invoke_module\n File \"/usr/lib/python3.5/imp.py\", line 234, in load_module\n return load_sourc e(name, filename, file)\n File \"/usr/lib/python3.5/imp.py\", line 170, in load_source\n module = _exec(spec, sys.modules[name])\n File \"<frozen importlib._bootstrap>\", line 626, in _exec\n File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n File \"< frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n File \"/tmp/ansible_uptimerobot_payload_gp2xmpdx/__main__.py\", line 151, in <module>\n File \"/tmp/ansible_uptimerobot_payload_gp2xmpdx/__main__.py\", line 131, in main\n File \"/tmp/ansible_uptimerobot_pay load_gp2xmpdx/__main__.py\", line 83, in checkID\n File \"/usr/lib/python3.5/json/__init__.py\", line 312, in loads\n s.__class__.__name__))\nTypeError: the JSON object must be str, not 'bytes'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1, "retries": 301 } ```
https://github.com/ansible/ansible/issues/66242
https://github.com/ansible/ansible/pull/66244
11483921f24bdabe6c3d898a7a7b689cfc7006bc
eaf879a7a7e7022939906cbeff5818638985cdf3
2020-01-07T15:36:57Z
python
2020-02-15T16:10:23Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,225
["changelogs/fragments/66382-docker_container-port-range.yml", "docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/modules/cloud/docker/docker_container.py", "test/integration/targets/docker_container/tasks/tests/ports.yml"]
docker_container does not allow host port ranges binded to a single container port
<!--- 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 --> When using docker_container module, attempting to publish a port, using a range of ports from the host, does not work as expected. Instead, Ansible will attempt to use the port number in the range. Example: Trying to get a similar docker command as the following running in Ansible. ``` docker run -p 80-85:80 -d linuxserver/nginx ``` As of now, this will cause an error stating `Bind for 0.0.0.0:80 failed: port is already allocated"` This is a supported command argument in Docker. Ref: https://docs.docker.com/network/links/ > Instead, you may specify a range of host ports to bind a container port to that is different than the default ephemeral port range: > > `$ docker run -d -p 8000-9000:5000 training/webapp python app.py` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> docker_container ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below (venv) ➜ cloudbox git:(develop) ✗ ansible --version ansible 2.10.0.dev0 config file = /srv/git/cloudbox/ansible.cfg configured module search path = [u'/home/seed/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /opt/ansible/lib/ansible executable location = /opt/ansible/bin/ansible python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0] ``` ``` cloudbox git:(develop) ✗ ansible --version ansible 2.9.2 config file = /srv/git/cloudbox/ansible.cfg configured module search path = [u'/home/seed/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_CALLBACK_WHITELIST(/srv/git/cloudbox/ansible.cfg) = [u'profile_tasks'] DEFAULT_FACT_PATH(/srv/git/cloudbox/ansible.cfg) = /srv/git/cloudbox/ansible_facts.d DEFAULT_HASH_BEHAVIOUR(/srv/git/cloudbox/ansible.cfg) = merge DEFAULT_HOST_LIST(/srv/git/cloudbox/ansible.cfg) = [u'/srv/git/cloudbox/inventories/local'] DEFAULT_LOG_PATH(/srv/git/cloudbox/ansible.cfg) = /srv/git/cloudbox/cloudbox.log DEFAULT_ROLES_PATH(/srv/git/cloudbox/ansible.cfg) = [u'/srv/git/cloudbox/roles', u'/srv/git/cloudbox/resources/roles'] DEFAULT_VAULT_PASSWORD_FILE(/srv/git/cloudbox/ansible.cfg) = /etc/ansible/.ansible_vault RETRY_FILES_ENABLED(/srv/git/cloudbox/ansible.cfg) = False ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Ubuntu 18.04 LTS. Bare-metal setup ##### 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: localhost tasks: - name: Create and start container docker_container: name: nginx image: linuxserver/nginx pull: yes published_ports: - "80-85:80" networks: - name: cloudbox aliases: - nginx2 purge_networks: yes restart_policy: unless-stopped state: started - name: Create and start container docker_container: name: nginx2 image: linuxserver/nginx pull: yes published_ports: - "80-85:80" networks: - name: cloudbox aliases: - nginx3 purge_networks: yes restart_policy: unless-stopped state: started ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Containers nginx2 and nginx3 to be created and binded to whatever host port was available between 80 and 85. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> https://pastebin.com/MxMrGaHm Both containers are being binded to port 80 on the host.
https://github.com/ansible/ansible/issues/66225
https://github.com/ansible/ansible/pull/66382
21ae66db2ecea3fef21b9b73b5e890809d58631e
23b2bb4f4dc68ffa385e74b5d5c304f461887965
2020-01-06T21:26:54Z
python
2020-02-03T22:27:40Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,213
["changelogs/fragments/66599-docker-healthcheck.yml", "lib/ansible/modules/cloud/docker/docker_container.py", "lib/ansible/modules/cloud/docker/docker_swarm_service.py"]
docker_container does not override image defined healthcheck when test: ["NONE"]
As per the docs the following should override the image defined health check. But it fails to override the image defined health check. This is important where the image defined health check is not applicable. One such example is using the creating a MySQL cluster in that the default health check is against mysqld which is not appropriate because either ndbd or ndb_mgmd is appropriate. This leaves the container marked as unhealthy. Using; healthcheck: test: ["NONE"] If you use the above to launch MySQL the default health check is used, inspect output following. "Healthcheck": { "Test": [ "CMD-SHELL", "/healthcheck.sh" ] }, Resulting in; 21b30279e77d mysql/mysql-cluster:8.0.18 "/entrypoint.sh mysq…" 3 minutes ago Up 2 minutes (healthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql 0fb50981bba5 mysql/mysql-cluster:8.0.18 "/entrypoint.sh ndbd" 3 minutes ago Up 3 minutes (unhealthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql-ndbd-2 8746135e3f8e mysql/mysql-cluster:8.0.18 "/entrypoint.sh ndbd" 3 minutes ago Up 3 minutes (unhealthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql-ndbd-1 420fb8249df8 mysql/mysql-cluster:8.0.18 "/entrypoint.sh ndb_…" 3 minutes ago Up 3 minutes (healthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql-mgmd The work around is to call a stub shell which simply calls exit 0. healthcheck: test: ["CMD-SHELL", "{{ mysql_config_directory }}/healthcheck.sh"] Resulting in; "Healthcheck": { "Test": [ "CMD-SHELL", "/etc/cell/dev/mysql/healthcheck.sh" ] }, And; aaf28f87abf0 mysql/mysql-cluster:8.0.18 "/entrypoint.sh mysq…" 3 minutes ago Up 3 minutes (healthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql 2df7948c37fc mysql/mysql-cluster:8.0.18 "/entrypoint.sh ndbd" 3 minutes ago Up 3 minutes (healthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql-ndbd-2 1a3cd97cfc80 mysql/mysql-cluster:8.0.18 "/entrypoint.sh ndbd" 3 minutes ago Up 3 minutes (healthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql-ndbd-1 5fea532ef20f mysql/mysql-cluster:8.0.18 "/entrypoint.sh ndb_…" 3 minutes ago Up 3 minutes (healthy) 1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp dev-mysql-mgmd
https://github.com/ansible/ansible/issues/66213
https://github.com/ansible/ansible/pull/66599
d6f2b4e788ed13756ba4e4a05b8b7a879900dbc3
5c1a3a3ac2086119bd16316dde379047d90cd86c
2020-01-06T15:46:24Z
python
2020-02-03T18:13:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,189
["changelogs/fragments/66189-hostname-osmc.yml", "lib/ansible/modules/system/hostname.py"]
Error using hostname module on OSCM-distribution
##### SUMMARY Applying the module HOSTNAME against a box running OSMC (https://osmc.tv/) the following error appears: `fatal: [raspitest.thucke.de]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Osmc)"} ` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME Module: hostname ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = /home/ansible/ansible/ansible.cfg configured module search path = ['/home/ansible/ansible/ansible_modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible python version = 3.7.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION ``` DEFAULT_HOST_LIST(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/inventory.yml'] DEFAULT_MODULE_PATH(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/ansible_modules'] DEFAULT_ROLES_PATH(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/roles', '/home/ansible/ansible/roles'] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Target OS: OSMC on Rasperry Pi 2B+ (http://download.osmc.tv/installers/diskimages/OSMC_TGT_rbp2_20191118.img.gz) ##### STEPS TO REPRODUCE Just apply a playbook with the module against such a machine. ``` - name: HOSTNAME | Setting real hostname hostname: name: "{{ inetHostname.stdout }}" ``` ##### EXPECTED RESULTS Module end without errors ##### ACTUAL RESULTS `fatal: [raspitest.thucke.de]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Osmc)"} `
https://github.com/ansible/ansible/issues/66189
https://github.com/ansible/ansible/pull/66190
193879d462013433c5a60e7b16ef724723457f3c
d56d0f97e30d728b6ea54149001364afb39c5386
2020-01-04T17:02:40Z
python
2020-01-05T07:07:39Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,185
["test/integration/targets/vyos_config/tests/cli/simple.yaml"]
vyos_config: Testcase is failing
<!--- 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 vyos_config testcase is failing - https://app.shippable.com/github/ansible/ansible/runs/154844/60/console. This change is recently added via - https://github.com/ansible/ansible/pull/66122 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME test/integration/targets/vyos_config/tests/cli/simple.yaml ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel ``` ##### CONFIGURATION NA ##### 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 --> https://app.shippable.com/github/ansible/ansible/runs/154844/60/console <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Test should pass ##### ACTUAL RESULTS Test is failing
https://github.com/ansible/ansible/issues/66185
https://github.com/ansible/ansible/pull/66188
6b1dff64d0958e80c9b63b1e971dd67d00aa8c1d
8ae5e34127216bf56544ccfd54cc48979741ad48
2020-01-04T07:00:01Z
python
2020-01-06T10:50:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,179
["changelogs/fragments/66267-httpapi-timeout.yaml", "lib/ansible/plugins/connection/httpapi.py", "lib/ansible/plugins/connection/netconf.py", "lib/ansible/plugins/connection/network_cli.py"]
ansible_command|connect_timeout vs httpapi timeout
<!--- 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 --> httpapi timeout is hardcoded with 120 seconds in the DOCUMENTATION area of plugins/connection/httpapi.py and cannot be set dynamically to higher values. Setting ansible_command_timeout and ansible_connect_timeout to values higher than 120 still raise a ansible.module_utils.connection.ConnectionError: timed out error after 120 seconds ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> httpapi.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.1 config file = /rnx/config/ansible/xlab/ansible.cfg configured module search path = ['/root/.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.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below root@localhost:/rnx/config/ansible/xlab# ansible-config dump --only-changed CACHE_PLUGIN(/rnx/config/ansible/xlab/ansible.cfg) = redis CACHE_PLUGIN_CONNECTION(/rnx/config/ansible/xlab/ansible.cfg) = <xxxx>:6379:5 CACHE_PLUGIN_PREFIX(/rnx/config/ansible/xlab/ansible.cfg) = ansible_facts_ PERSISTENT_COMMAND_TIMEOUT(/rnx/config/ansible/xlab/ansible.cfg) = 500 PERSISTENT_CONNECT_TIMEOUT(/rnx/config/ansible/xlab/ansible.cfg) = 600 ansible_connection: httpapi ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Software BIOS: version 05.33 NXOS: version 9.3(1) BIOS compile time: 09/08/2018 NXOS image file is: bootflash:///nxos.9.3.1.bin NXOS compile time: 7/18/2019 15:00:00 [07/19/2019 00:04:48] Hardware cisco Nexus9000 C93180YC-FX Chassis ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> date; ansible-playbook -vvvv -i hosts.yml <example-playbook-below.yml>; date If you use 'sleep 115' it works. <!--- Paste example playbooks or commands between quotes below --> ```yaml - hosts: mynxosdevice check_mode: no gather_facts: no tasks: - nxos_command: commands: - sleep 125 ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ok: [mynxosdevice] => { "changed": false, "invocation": { "module_args": { "auth_pass": null, "authorize": null, "commands": [ "sleep 125" ], "host": null, "interval": 1, "match": "all", "password": null, "port": null, "provider": null, "retries": 10, "ssh_keyfile": null, "timeout": null, "transport": null, "use_ssl": null, "username": null, "validate_certs": null, "wait_for": null } }, "stdout": [ {} ], "stdout_lines": [ {} ] } ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Playbook runs in timeout. <!--- Paste verbatim command output between quotes --> ```paste below TASK [nxos_command] ************************************************************************************************************ task path: /rnx/config/ansible/xlab/issues/pb_httpapi_timeout.yml:8 <192.168.0.222> attempting to start connection <192.168.0.222> using connection plugin httpapi <192.168.0.222> found existing local domain socket, using it! <192.168.0.222> updating play_context for connection <192.168.0.222> <192.168.0.222> local domain socket path is /root/.ansible/pc/c88162470b <192.168.0.222> PERSISTENT_COMMAND_TIMEOUT is 500 <192.168.0.222> PERSISTENT_CONNECT_TIMEOUT is 600 <192.168.0.222> ESTABLISH LOCAL CONNECTION FOR USER: root <192.168.0.222> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461 `" && echo ansible-tmp-1578073462.6235766-170009103658461="` echo /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461 `" ) && sleep 0' Using module file /usr/local/lib/python3.6/dist-packages/ansible/modules/network/nxos/nxos_command.py <192.168.0.222> PUT /root/.ansible/tmp/ansible-local-26623ludka1vp/tmpbfo43_rp TO /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py <192.168.0.222> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/ /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py && sleep 0' <192.168.0.222> EXEC /bin/sh -c 'python3 /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py && sleep 0' <192.168.0.222> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/ > /dev/null 2>&1 && sleep 0' The full traceback is: Traceback (most recent call last): File "/root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py", line 102, in <module> _ansiballz_main() File "/root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py", line 94, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py", line 40, in invoke_module runpy.run_module(mod_name='ansible.modules.network.nxos.nxos_command', init_globals=None, run_name='__main__', alter_sys=True) File "/usr/lib/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/modules/network/nxos/nxos_command.py", line 223, in <module> File "/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/modules/network/nxos/nxos_command.py", line 191, in main File "/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/module_utils/network/nxos/nxos.py", line 1223, in run_commands File "/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/module_utils/network/nxos/nxos.py", line 565, in run_commands File "/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__ ansible.module_utils.connection.ConnectionError: timed out fatal: [mynxosdevice]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py\", line 102, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-local-26623ludka1vp/ansible-tmp-1578073462.6235766-170009103658461/AnsiballZ_nxos_command.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.nxos.nxos_command', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/modules/network/nxos/nxos_command.py\", line 223, in <module>\n File \"/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/modules/network/nxos/nxos_command.py\", line 191, in main\n File \"/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/module_utils/network/nxos/nxos.py\", line 1223, in run_commands\n File \"/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/module_utils/network/nxos/nxos.py\", line 565, in run_commands\n File \"/tmp/ansible_nxos_command_payload_opkv6o7_/ansible_nxos_command_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: timed out\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } ```
https://github.com/ansible/ansible/issues/66179
https://github.com/ansible/ansible/pull/66267
f695f401333a4875277aa85f8ebeeb2edb28cd1d
0a3a81bd12a1840caa7d1f3f7e1e77fdf03b4bcc
2020-01-03T18:00:54Z
python
2020-01-11T04:09:21Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,174
["changelogs/fragments/66777-zabbix_host_tags_macros_support.yml", "lib/ansible/modules/monitoring/zabbix/zabbix_host.py"]
zabbix_host: support usermacros
##### SUMMARY [`zabbix_host`](https://docs.ansible.com/ansible/latest/modules/zabbix_host_module.html) module currently does not support specifying usermacros. While usermacros can be added separately with [`zabbix_hostmacro`](https://docs.ansible.com/ansible/latest/modules/zabbix_hostmacro_module.html) module, that splits up the configuration and makes it very hard to maintain. It would be great to specify macros in the host definition of `zabbix_host`. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME zabbix_host
https://github.com/ansible/ansible/issues/66174
https://github.com/ansible/ansible/pull/66777
5fdc9a61f0ea41cb22c28e7e63a30603579db88c
e3190adcbb2ff41ddf627eb98becbb7bc5838e62
2020-01-03T12:49:45Z
python
2020-01-30T13:32:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,171
["changelogs/fragments/file-return-state-when-file-does-not-exist.yaml", "lib/ansible/modules/file.py", "test/integration/targets/file/tasks/main.yml"]
file module no longer returning state=absent for missing files
<!--- 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 --> `file` is "stableinterface" and stopped setting state=absent in its return value. This broke real-world ansible roles. It works with ansible-2.7, broken in 2.8. There was no deprecation warning in 2.7 about the impending breakage. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> file ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.8.6 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 = /usr/lib/python2.7/site-packages/ansible executable location = /usr/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 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```bash ansible localhost -m file -a owner=root\ group=root\ path=/root/nosuchdir ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ```paste below [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' localhost | FAILED! => { "changed": false, "msg": "file (/root/nosuchdir) is absent, cannot continue", "path": "/root/nosuchdir", "state": "absent" } ``` (as on ansible 2.7): ``` ansible 2.7.10 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 = /usr/lib/python2.7/site-packages/ansible executable location = /usr/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)] ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ``` localhost | FAILED! => { "changed": false, "msg": "file (/root/nosuchdir) is absent, cannot continue", "path": "/root/nosuchdir" } ```
https://github.com/ansible/ansible/issues/66171
https://github.com/ansible/ansible/pull/66503
e0f25a2b1f9e6c21f751ba0ed2dc2eee2152983e
cd8920af998e297a549a4f05cf4a4b3656d7d67e
2020-01-03T07:07:34Z
python
2020-05-21T20:35:45Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,149
["docs/docsite/rst/scenario_guides/guide_azure.rst"]
How to distribute Azure VMs in Availability Zones
<!--- 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 The current 'Microsoft Azure Guide' content is not enough for us to place Azure VMs in the **availability zones**. So I suggest adding some notes to this guide. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME Microsoft Azure Guide(docs/docsite/rst/scenario_guides/guide_azure.rst) ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ``` ##### CONFIGURATION ```paste below $ ansible --version ansible 2.9.2 config file = None configured module search path = ['/Users/mitsuru/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/mitsuru/.local/share/virtualenvs/hive-builder-bq6LUPdg/lib/python3.7/site-packages/ansible executable location = /Users/mitsuru/.local/share/virtualenvs/hive-builder-bq6LUPdg/bin/ansible python version = 3.7.3 (default, Jun 7 2019, 11:23:14) [Clang 10.0.1 (clang-1001.0.46.4)] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. OS version, browser, etc. --> Mac OS catalina 10.15.2 ##### ADDITIONAL INFORMATION When I tried to place VMs in the availability zones, I struggled with the following: - OS disk and data disk must be a 'Managed Disk', not 'Unmanaged Disk', to place VM in the availability zones. - When creating a VM with the azure_rm_virtualmachine, you need to specify explicitly managed_disk_type to change OS disk to 'Managed Disk'. Otherwise, 'os disk' becomes 'Unmanaged disk'. - When creating a data disk with azure_rm_manageddisk, you need to specify explicitly storage_account_type to make it a 'Managed Disk'. Otherwise, the data disk will be 'Unmanaged disk'. - 'Managed Disk' does not require 'Storage Account' or 'Storage Container' unlike 'Unmanaged Disk'. In particular, note that once a VM is created on an 'Unmanaged disk', an unnecessary 'Storage container' named "vhds" is automatically created. - When creating an IP address with azure_rm_publicipaddress, it is necessary to specify 'standard' in the 'sku' property. Otherwise, the IP address cannot be used in the availability zones.
https://github.com/ansible/ansible/issues/66149
https://github.com/ansible/ansible/pull/66200
0a8f5aba747b8da5ff6afd3f886371452eba646b
c55ba658c68b0fd6a2cbc26920b66278514818ec
2020-01-01T02:37:15Z
python
2020-02-05T17:04:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,147
["changelogs/fragments/66147_rhev_vdsm_vdsmd.yml", "lib/ansible/module_utils/facts/virtual/linux.py"]
setup fails to detect RHEV
<!--- 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 --> The setup module tries to detect is RHEV is running and set `virtualization_type` to "RHEV" if so, but it checks for a process running named "vdsm". The process is actually named "vdsmd", at least in newer versions of RHEV. (I don't recall if it used to be named differently.) This is a clear failing of `lib/ansible/module_utils/facts/virtual/linux.py` where it only checks for processes named "vdsm" instead of "vdsmd". This problem continues to exist in the devel branch. Here's useful information from my running RHEV system: ``` # grep vdsm /proc/*/comm /proc/4772/comm:supervdsmd /proc/5519/comm:vdsmd ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> setup ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.8.3 config file = None configured module search path = ['/Users/wfaulk/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.8.3/libexec/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.4 (default, Jul 9 2019, 18:15:00) [Clang 10.0.0 (clang-1000.11.45.5)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ``` (no output) ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Red Hat Virtualization Host 4.3.6 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run following command against an RHVH host. <!--- Paste example playbooks or commands between quotes below --> ``` ansible all -m setup -a "filter=ansible_virt*" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> ``` host | SUCCESS => { "ansible_facts": { "ansible_virtualization_role": "host", "ansible_virtualization_type": "RHEV", "discovered_interpreter_python": "/usr/bin/python" }, "changed": false } ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> ``` host | SUCCESS => { "ansible_facts": { "ansible_virtualization_role": "host", "ansible_virtualization_type": "kvm", "discovered_interpreter_python": "/usr/bin/python" }, "changed": false } ```
https://github.com/ansible/ansible/issues/66147
https://github.com/ansible/ansible/pull/70901
7d32129efb0cad14710e35a9e3f2251a2957fbb2
c19a10e13a299a97cde7e7dfba28d5b8b8301f01
2019-12-31T17:41:39Z
python
2020-07-28T15:35:34Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,146
["changelogs/fragments/66151-docker_swarm_service-healthcheck-start-period.yml", "lib/ansible/modules/cloud/docker/docker_swarm_service.py", "test/integration/targets/docker_swarm_service/tasks/tests/options.yml"]
docker_swarm_service healthcheck always changed
<!--- 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 `healthcheck` in `docker_swarm_service`, it is always reported as having changed. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME docker_swarm_service ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.8.6 config file = /mnt/f/Users/bozho/.ansible.cfg configured module search path = ['/mnt/f/Users/bozho/.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.7.5 (default, Oct 27 2019, 15:43:29) [GCC 9.2.1 20191022] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_SSH_CONTROL_PATH_DIR(/mnt/f/Users/bozho/.ansible.cfg) = /tmp/ansible/cp ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Debian Bullseye on WSL: ``` Linux bozho-host 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 GNU/Linux ``` ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> I've added `healthcheck` option to an existing `docker_swarm_service` entry that was behaving as expected starting a service from a custom nginx image in global mode <!--- Paste example playbooks or commands between quotes below --> ```yaml docker_swarm_service: name: "custom-nginx" image: "{{ nginx_image_name }}" labels: tag: "my-tag" configs: - config_id: "{{ nginx_conf_config.config_id }}" config_name: "{{ docker_nginx_conf_config_name }}" filename: "/etc/nginx/nginx.conf" mode: 0644 - config_id: "{{ default_conf_config.config_id }}" config_name: "{{ docker_default_conf_config_name }}" filename: "/etc/nginx/sites-enabled/default.conf" mode: 0644 secrets: "{{ nginx_secrets_list | default([]) }}" mode: global update_config: delay: 1s failure_action: rollback order: stop-first healthcheck: test: [ "CMD", "curl", "--fail", "-k", "https://myhost.example.com" ] interval: 1m30s timeout: 5s retries: 3 start_period: 20s logging: driver: local options: "max-size": 10k "max-file": "3" publish: - published_port: 80 target_port: 80 protocol: tcp mode: host - published_port: 443 target_port: 443 protocol: tcp mode: host networks: - my_network run_once: true ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Re-running the playbook should have no changes ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below { "changed": true, "changes": [ "healthcheck" ], "msg": "Service updated", "rebuilt": false, "swarm_service": { "args": null, "command": null, "configs": [ ... ], ... } ```
https://github.com/ansible/ansible/issues/66146
https://github.com/ansible/ansible/pull/66151
f7d412144616f538f2b82a40f2698934d374f7c1
f31b8e08b24f1c19c156caf5137ca18159f32df0
2019-12-31T16:01:14Z
python
2020-01-02T14:23:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,135
["changelogs/fragments/67461-gitlab-project-variable-masked-protected.yml", "lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py", "test/integration/targets/gitlab_project_variable/tasks/main.yml"]
gitlab_project_variable: support hidden/protected variables
##### SUMMARY gitlab_project_variable: support hidden/protected variables ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME gitlab_project_variable
https://github.com/ansible/ansible/issues/66135
https://github.com/ansible/ansible/pull/67461
7a42354021272dccf9037352c7ce645a9f082c4f
8ab304af4450c883700b144bcc03c395f205860f
2019-12-30T15:57:13Z
python
2020-02-28T22:17:03Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,127
["changelogs/fragments/66128-fix-callback-set-options.yml", "lib/ansible/executor/task_queue_manager.py"]
set_options method not called for collections callback
<!--- 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 --> It seems that the `set_options` method is not called when a callback is from a collection. In `task_queue_manager.py` in `load_callbacks`, the loop handling collection callback is not calling `callback_obj.set_options()` while it is performed for the other callback source. ##### 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_queue_manager.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = /Users/remirey/dev/ansible_collections/community/grafana/tmp/ansible.cfg configured module search path = [u'/Users/remirey/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Users/remirey/.venv/grafana/lib/python2.7/site-packages/ansible executable location = /Users/remirey/.venv/grafana/bin/ansible python version = 2.7.13 (default, Apr 4 2017, 08:47:57) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below DEFAULT_CALLBACK_WHITELIST(/Users/remirey/dev/ansible_collections/community/grafana/tmp/ansible.cfg) = [u'community.grafana.grafana_annotations'] ``` ##### 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 --> See https://github.com/ansible-collections/grafana/issues/30 <!--- 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/warning when executing the `grafana_annotations callback from a collection. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below [ERROR]: Could not submit message to Grafana: 'CallbackModule' object has no attribute 'grafana_url' PLAY [localhost] ******************************************************************************************************************************************************************** TASK [Gathering Facts] ************************************************************************************************************************************************************** ok: [localhost] TASK [debug] ************************************************************************************************************************************************************************ ok: [localhost] => { "msg": "nothing to do" } PLAY RECAP ************************************************************************************************************************************************************************** localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [WARNING]: Failure using method (v2_playbook_on_stats) in callback plugin (<ansible_collections.community.grafana.plugins.callback.grafana_annotations.CallbackModule object at 0x108d6ef90>): 'CallbackModule' object has no attribute 'dashboard_id' ```
https://github.com/ansible/ansible/issues/66127
https://github.com/ansible/ansible/pull/66128
80dff8743afe478f443ecbd69ed0bee512aaf04c
7888eafb820e22672df3a0051e2a1b48af8adf6d
2019-12-30T11:25:54Z
python
2020-01-06T16:32:36Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,110
["lib/ansible/modules/network/vyos/vyos_config.py", "test/integration/targets/vyos_config/tests/cli/config.cfg", "test/integration/targets/vyos_config/tests/cli/simple.yaml", "test/units/modules/network/vyos/fixtures/vyos_config_src.cfg"]
vyos_config: set paramter hardcoded
<!--- 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 It looks like the `vyos_config` hardcodes the `set` parameter. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME vyos_config ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = None configured module search path = ['/home/itev.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/itev/.local/lib/python3.7/site-packages/ansible executable location = /home/itev/.local/bin/ansible python version = 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.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 VyOS instance runs VyOS 1.2 (codename "Crux") ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> task file: ```yaml --- - name: Ensuring interface configuration is up-to-date vyos_config: save: yes src: "interface.j2" when: vyos_interfaces is defined ``` interface.j2: ```jinja2 {% for interface in vyos_interfaces %} set interfaces ethernet {{ interface.name }} address {{ interface.address }} set interfaces ethernet {{ interface.name }} description '{{ interface.description | default('Interface configured by Ansible.') }}' set interfaces ethernet {{ interface.name }} speed {{ interface.speed }} set interfaces ethernet {{ interface.name }} duplex {{ interface.duplex }} {% if interface.disabled is defined and interface.disabled == "yes" %} set interface ethernet {{ interface.name }} disable {% endif %} {% endfor %} ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS Ansible executes the commands in the jinja2 template, without adding a parameter. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Ansible adds a extra "set" parameter: <!--- Paste verbatim command output between quotes --> ```paste belowfatal: [vyos01]: FAILED! => { "changed": false, "invocation": { "module_args": { "backup": false, "backup_options": null, "comment": "configured by vyos_config", "config": null, "host": null, "lines": null, "match": "line", "password": null, "port": null, "provider": null, "save": true, "src": " set interfaces ethernet eth0 address dhcp\n set interfaces ethernet eth0 description 'WAN Interface'\n set interfaces ethernet eth0 speed 1000\n set interfaces ethernet eth0 duplex full\n set interfaces ethernet eth1 address 172.16.1.1/24\n set interfaces ethernet eth1 description 'LAN Interface'\n set interfaces ethernet eth1 speed 1000\n set interfaces ethernet eth1 duplex full\n \n", "ssh_keyfile": null, "timeout": null, "username": null } }, "msg": "set set interfaces ethernet eth0 address dhcp\r\n\r\n Configuration path: [set] is not valid\r\n Set failed\r\n\r\n[edit]\r\r\nvyos@vyos# " } ```
https://github.com/ansible/ansible/issues/66110
https://github.com/ansible/ansible/pull/66122
5493ea590cc7cd6b090732bde1df5da1c99aa59e
2f996fc6e222eeaf6c3391ad437dadf8ad642b36
2019-12-29T16:07:32Z
python
2020-01-03T12:05:37Z
closed
ansible/ansible
https://github.com/ansible/ansible
66,031
["lib/ansible/modules/cloud/azure/azure_rm_virtualnetworkpeering.py"]
Azure VNet Peering disconnected state
##### SUMMARY The playbook will create virtual network peering between local and remote virtual network utilizing two Azure profiles for authentication passed into each module during playbook execution. This works as intended however an unintended behavior when 1 of the peerings is deleted leaving the other peering in a disconnected state. Either the playbook will execute and state ok even when the peering is in a disconnected state and then error out due to peering being in a disconnected state. If we re-order the module execution the playbook will error out for the reason mentioned above. The enhancement would be to enforce peerings where if either the remote or local vnet is disconnected to delete and recreate. ##### ISSUE TYPE Addittional functionality ##### COMPONENT NAME Azure Module: azure_rm_virtualnetworkpeering ##### ADDITIONAL INFORMATION <!--- Paste example playbooks or commands between quotes below --> ```yaml --- - hosts: all serial: 1 connection: local gather_facts: false tasks: - name: Create virtual network peering azure_rm_virtualnetworkpeering: auth_source: credential_file profile: sub2 state: present resource_group: rg1 virtual_network: 'vnet1id' name: peer1 remote_virtual_network: 'vnet2id' allow_virtual_network_access: true allow_forwarded_traffic: false - name: Create virtual network peering azure_rm_virtualnetworkpeering: profile: 'sub1' auth_source: credential_file state: present resource_group: rg2 virtual_network: 'vnet2id' name: peer2 remote_virtual_network: 'vnet1id' allow_virtual_network_access: true allow_forwarded_traffic: false ```
https://github.com/ansible/ansible/issues/66031
https://github.com/ansible/ansible/pull/66230
a1f6c611b7330d0505669638f9c7a19a33dfddc9
f1ec48429a6c64510fb4f74c52fbf92b0cc48df5
2019-12-23T06:37:57Z
python
2020-01-25T06:01:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,993
["changelogs/fragments/65993-restart-docker_container-on-restart-policy-updates.yaml", "lib/ansible/modules/cloud/docker/docker_container.py"]
docker_container: Always recreates the container when restart_policy is changed
<!--- 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 --> The [docker_container](https://docs.ansible.com/ansible/latest/modules/docker_container_module.html) module recreates a container when the `restart_policy` is changed. This can be changed using the `docker update` command. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME [docker_container](https://docs.ansible.com/ansible/latest/modules/docker_container_module.html) ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```shell $ ansible --version ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/ingmar/.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.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below $ ansible-config dump --only-changed <empty> ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> ```shell $ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora release 30 (Thirty) Release: 30 Codename: Thirty ``` ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> 1. Run the following playbook: ```sh $ ansible-playbook docker-container-update.yml ``` <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Container update restart_policy hosts: localhost tasks: - name: Container with restart_policy docker_container: name: restart_policy_example image: alpine state: present restart_policy: unless-stopped entrypoint: top ``` 2. Change the `restart_policy` to `always` and run it again. ```sh $ ansible-playbook docker-container-update.yml ``` <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: Container update restart_policy hosts: localhost tasks: - name: Container with restart_policy docker_container: name: restart_policy_example image: alpine state: present restart_policy: unless-stopped entrypoint: top ``` 3. Notice by using the `docker ps` command that the container is recreated instead of updated. ##### EXPECTED RESULTS I expect the container to be update with the new `restart_policy` by using the docker update command: ```sh $ docker update --restart=<new policy> ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The container is recreated instead of updated. I currently run a `command` task before the container which updates the command. ```yml # Update docker restart policy - name: Update docker container restart policy command: "docker update --restart={{ (restart_policy == false) | ternary('no', restart_policy) }} {{ container }}" ignore_errors: true ```
https://github.com/ansible/ansible/issues/65993
https://github.com/ansible/ansible/pull/66192
ec34235e2ec30e74d6ee2967ea5ac8330bbb7d97
02c126f5ee451a7dc1b442d15a883bc3f86505d1
2019-12-20T10:11:48Z
python
2020-01-06T19:49:48Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,983
["changelogs/fragments/66060-redfish-new-resource-id-option.yaml", "docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/module_utils/redfish_utils.py"]
Fixes for Redfish resource_id option
<!--- 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 --> PR #62921 added a new `resource_id` option for the redfish_command and redfish_config modules. In that PR, the old, limited behavior of selecting the first System, Manager or Chassis in a collection is deprecated in favor of using the new option to explicitly specify the target resource. The version specified in the call to AnsibleModule.deprecate() was '2.13'. But since #62921 did not get merged in time for the 2.9 release, it should have used version '2.14' ('2.10' + 4). https://github.com/ansible/ansible/blob/32a8b620f399fdc9698bd31ea1e619b2eb72b666/lib/ansible/module_utils/redfish_utils.py#L246-L247 In addition, the PR should have included: - a changelog fragment with minor_changes and deprecated_features sections - an update to the porting guide with instruction on how to update playbooks to avoid the deprecated behavior ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> redfish_utils.py redfish_config.py redfish_command.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.10.0.dev0 config file = /Users/bdodd/.ansible.cfg configured module search path = ['/Users/bdodd/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/bdodd/Development/git/ansible/lib/ansible executable location = /Users/bdodd/Development/git/ansible/bin/ansible python version = 3.6.5 (default, Apr 25 2018, 14:26:36) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] ``` ##### 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. --> Environments using Redfish services ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ``` --- - hosts: myhosts connection: local name: Manage System Power - Reboot gather_facts: False tasks: - name: Reboot system power redfish_command: category: Systems command: PowerReboot baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ``` Use the playbook above on a Redfish service that has multiple Systems. <!--- 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 deprecation message should specify version '2.14'. The changelog fragment and porting guide addition should be present. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The deprecation message specifies version '2.13'. Also, note that the changelog fragment and porting guide addition described above are missing.
https://github.com/ansible/ansible/issues/65983
https://github.com/ansible/ansible/pull/66060
1a0724fdd41f77412a40d66ffddf231e733082b5
5f966ef6641cd931cd2be187950371ebdb2ac0c8
2019-12-19T20:01:38Z
python
2020-01-10T22:37:53Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,955
["changelogs/fragments/ansible-galaxy-cli-add-token-alias.yaml", "lib/ansible/cli/galaxy.py"]
Change --api-key to --token in ansible-galaxy collection commands
##### SUMMARY In #65933, I had some confusion over how to set my Galaxy token for CLI usage when running `ansible-galaxy collection publish`, so I could avoid setting `--api-key` on the command line. Some of that confusion could be avoided by using the same terminology when referring to the Galaxy 'token' everywhere. Currently the docs pages for Galaxy and Collections both mention 'token' multiple times, and only mention the term 'api-key' once, in reference to the Galaxy CLI. Complicating matters, if I log into galaxy.ansible.com and go to my Preferences, I am shown an "API Key" section. So... it is even less clear whether I should be using a token or API key in various places. I think, in the end, they are the same thing. But it would be more clear if we just call it one thing everywhere. Therefore, I propose we deprecate the `--api-key` parameter in the `ansible-galaxy` CLI, and use `--token`. (And we should also change the UI in Galaxy to read 'Token' instead of 'API Key', maybe?) Alternatively, if 'API Key' is the chosen nomenclature, let's use that everywhere, and ditch the use of 'token'...? ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME galaxy ##### ADDITIONAL INFORMATION See related: #65933
https://github.com/ansible/ansible/issues/65955
https://github.com/ansible/ansible/pull/66376
0ab0e1556b7380e0b432d0b9ce21849539befc8f
1f340721a7f651992e1cdb277c27d7da3bd09ced
2019-12-18T19:11:18Z
python
2020-01-16T20:51:21Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,952
["lib/ansible/modules/clustering/k8s/k8s.py"]
k8s module documentation confusing in examples of reading from files
##### SUMMARY When reading the `k8s` module documentation (https://docs.ansible.com/ansible/latest/modules/k8s_module.html#examples), the given examples were a little confusing when it came to creating objects from files. There is one example near the top "Create a Service object by reading the definition from a file", which one might assume would mean "read the definition from a file on the controller filesystem" (as that's not very clear and could be confusing based on the rest of the examples). Then a couple examples later, after a comment about "Passing the object definition from a file", there's a more clear task name "Create a Deployment by reading the definition from a local file" (contrast to the next example of "Read definition file from the Ansible controller file system."). ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME k8s ##### ANSIBLE VERSION N/A ##### CONFIGURATION N/A ##### OS / ENVIRONMENT N/A ##### ADDITIONAL INFORMATION I propose we remove the first 'create service from file' example, since it only serves to confuse the reader. It would tighten up the list of examples, and all the file-related examples would then be under the "Passing the object definition from a file" comment, which makes more sense. I'll file a PR for this change shortly.
https://github.com/ansible/ansible/issues/65952
https://github.com/ansible/ansible/pull/65953
5c69e02a35fbbb52c1c914b36f490a09c1a92bf6
81465455cd1f290b6de9259198030256bb617f47
2019-12-18T17:11:35Z
python
2019-12-23T15:18:15Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,943
["lib/ansible/module_utils/redfish_utils.py"]
Redfish_command "IndicatorLed*" command execute failed on Lenovo blade server.
<!--- 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 --> -When execute "IndicatorLed*" command on blade servers, it will show error message "Key IndicatorLED not found". That is because blade servers have two chassis. /redfish/v1/chassis/1 is for the node itself , and it has the key IndicatorLED. /redfish/v1/chassis/2 is for the chassis the node located in and it doesn't have key IndicatorLED. Ansible will execute set IndicatorLed command on every chassis it found but only return the results of the last chassis, which cause this fail. ##### 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/modules/remote_management/redfish/redfish_command.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.10.0.dev0 config file = None configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /root/.local/lib/python2.7/site-packages/ansible executable location = /opt/python/python27/bin/ansible python version = 2.7.6 (default, Feb 8 2015, 07:53:59) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below /opt/python/python27/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a release (2.7.7+) that supports hmac.compare_digest as soon as possible. utils.PersistentlyDeprecated2018, ``` ##### 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 /opt/python/python27/bin/ansible localhost -m redfish_command -a "category=Chassis command= IndicatorLedOn baseuri=10.245.23.209 username=USERID password= " ``` The remote server is Lenovo blade server SN550, and it located in chassis. Execute IndicatorLedOn command and it failed, which is because the server has two chassis members. chassis/1 is for the node and chassis/2 is for the chassis. The chassis/2 don't have the property IndicatorLed but Ansible will execute IndicatorLedOn command on all memebers it found, <!--- 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 return message that on chassis/1 the command execute successfully. And chassis/2 doesn't have IndicatorLED properties. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> It returns false message: "Key IndicatorLED not found". <!--- Paste verbatim command output between quotes --> ```paste below "Key IndicatorLED not found". ```
https://github.com/ansible/ansible/issues/65943
https://github.com/ansible/ansible/pull/66044
936bd83614d3db3ee36c92e8a8d2168269ec3bc8
fe2a8cb1450edd568f238d9fe71c49e067e84395
2019-12-18T10:04:05Z
python
2020-02-15T12:49:18Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,936
["changelogs/fragments/66863-ec2_asg-max_instance_lifetime-and-honor-wait-on-replace.yaml", "lib/ansible/modules/cloud/amazon/ec2_asg.py", "test/integration/targets/ec2_asg/tasks/main.yml"]
AWS ec2_asg with replace_all_instances:yes will wait for instances to start/terminate even when wait_for_instances:no
##### SUMMARY When using the `ec2_asg` module with `replace_all_instances: yes`, then `wait_for_instances` is effectively ignored. I would expect that if `wait_for_instances: no` then it would not wait for instances to complete starting/termination. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ec2_asg ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ``` ansible 2.9.2 config file = None configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/user/.local/lib/python3.7/site-packages/ansible executable location = /home/user/.local/bin/ansible python version = 3.7.5 (default, Nov 20 2019, 09:21:52) [GCC 9.2.1 20191008] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ``` (empty) ``` ##### OS / ENVIRONMENT OS: Ubuntu 19.10 Ansible installed via pip3 ##### STEPS TO REPRODUCE ``` - name: Update ASG ec2_asg: name: "my-asg" launch_config_name: "my-launchconfig" min_size: 1 max_size: 1 replace_batch_size: 1 replace_all_instances: yes wait_for_instances: no ``` This will not return successfully until new instance(s) have started, and any existing instance(s) have completed termination. If your timeout is not set long enough, then you'll get a 'Waited too long for old instances to terminate' response. ##### EXPECTED RESULTS I would expect that it would issue commands to terminate old instances and start new instances, without waiting. For those who have to replace in smaller batches than the current `desired_capacity`, then they would need to set `wait_for_instances: yes`. Perhaps a warning might be in order if `replace_batch_size` is less than `desired_capacity` ##### ACTUAL RESULTS Playbook output when it takes too long to execute: ``` TASK [test : Update ASG] *********************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Waited too long for old instances to terminate. Wed Dec 18 12:51:55 2019"} ```
https://github.com/ansible/ansible/issues/65936
https://github.com/ansible/ansible/pull/66863
d2f4d305ee4175cc0315a705824b168b3096e06a
f98874e4f98837e4b9868780b19cf6614b00282a
2019-12-18T02:30:02Z
python
2020-02-15T12:56:39Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,933
["docs/docsite/rst/dev_guide/developing_collections.rst", "docs/docsite/rst/shared_snippets/galaxy_server_list.txt", "docs/docsite/rst/shared_snippets/installing_collections.txt"]
Unclear how to avoid entering --api-key on CLI when publishing Ansible Galaxy Collections
##### SUMMARY As I begin publishing multiple collections, I'm finding it annoying to have to specify `--api-key` on the command line every time I run: ansible-galaxy collection publish ./geerlingguy-collection-1.2.3.tar.gz --api-key=[key goes here] This not only requires me looking up the key in my password manager or on Galaxy, it also requires the key to be entered in plain text in a command that is then stored in my `history` file, unless I wipe it out. Therefore, I'd like to specify the token via environment variable, or some other file that can be included. Ideally an environment variable, so I don't have to set up a configuration file for Ansible Galaxy (which is already the default server). ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME galaxy ##### ANSIBLE VERSION ```paste below ansible 2.9.1 config file = /etc/ansible/ansible.cfg configured module search path = ['/Users/jgeerling/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.5 (default, Nov 3 2019, 23:06:46) [Clang 11.0.0 (clang-1100.0.33.12)] ``` ##### CONFIGURATION ```paste below ANSIBLE_NOCOWS(/etc/ansible/ansible.cfg) = True ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True ANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = /tmp/ansible-ssh-%%h-%%p-%%r DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 20 DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts'] DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = ['/Users/jgeerling/Dropbox/VMs/roles'] DEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = yaml INTERPRETER_PYTHON(env: ANSIBLE_PYTHON_INTERPRETER) = /usr/local/bin/python3 RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False ``` ##### OS / ENVIRONMENT N/A ##### ADDITIONAL INFORMATION There are two relevant documentation pages: - [Galaxy Developer Guide](https://docs.ansible.com/ansible/latest/galaxy/dev_guide.html) - [Using Collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#configuring-the-ansible-galaxy-client) It seems that both refer to a `token` with regard to Galaxy / Automation Hub, but only the collections guide mentions `--api-key`, and only relating to CLI usage. It seems that the `--api-key` is the same as the `token`, so the verbiage can be quite confusing (maybe the CLI needs to be updated to allow `--token` if they are indeed the same thing? It also looks like, according to the documentation, I might be able to set: ANSIBLE_GALAXY_SERVER_RELEASE_GALAXY_TOKEN=[my token / api key] But it also looks like that might be a magic variable that is only used if I add an entry for a galaxy server like `[galaxy_server.release_galaxy]` in my `ansible.cfg` file.
https://github.com/ansible/ansible/issues/65933
https://github.com/ansible/ansible/pull/65961
e19b94f43b62c011a07ba65db276ed54fb3f1082
0ca79a4234fa6cd21dc52a833d7978c0e32cf4ed
2019-12-17T23:53:44Z
python
2020-01-07T19:57:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,907
["changelogs/fragments/ansible-test-coverage-constraint.yml", "test/lib/ansible_test/_data/requirements/constraints.txt"]
ansible-test codecoverage vs Collections: ERROR: 'CoverageData' object has no attribute 'read_file'
##### SUMMARY ``` ansible-test units --docker -v --color --python 3.6 --coverage ansible-test coverage xml -v --requirements --group-by command --group-by version ${stub:+"$stub"} ``` fails with ``` ERROR: 'CoverageData' object has no attribute 'read_file' ``` I can see that `ansible-test coverage` is finding the files, such as: `ansible_collections/gundalow_collection/grafana/tests/output/coverage/integration=grafana_datasource=local-3.7=python-3.7=coverage.jobarker.remote.csb.18264.626864` This maybe an issue in my setup, or ansible-test. Steps to reproduce https://github.com/ansible-collections/grafana/pull/20 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-test ##### ANSIBLE VERSION ```paste below 2.9 ``` ##### 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 ``` ##### EXPECTED RESULTS ##### ACTUAL RESULTS ```paste below ERROR: 'CoverageData' object has no attribute 'read_file' ```
https://github.com/ansible/ansible/issues/65907
https://github.com/ansible/ansible/pull/65999
2b6d94c4c85a4fffeb592f058dcdd37bb05893cc
9ea5b539b60cb7035f08ac17688976a8e6dfb126
2019-12-17T11:25:07Z
python
2019-12-20T19:55:54Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,871
["test/integration/targets/azure_rm_storageaccount/tasks/main.yml"]
Azure CI errors
##### SUMMARY Currently the CI integration tests fail for `azure_rm_storageaccount`. The test `Assert CNAME failure` in `test/integration/targets/azure_rm_storageaccount/tasks/main.yml` fails because the result message from the previous step doesn't match the expected string, though the tested action does fail as expected. At first glance it seems that some upstream project improved their error messages. It expects to find: "custom domain name could not be verified" In the error message: "Failed to update custom domain: Azure Error: StorageCustomDomainNameNotValid\nMessage: Storage custom domain name ansible.com is not valid." ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME azure_rm_storageaccount ##### ANSIBLE VERSION Current `ansible/devel` branch ##### CONFIGURATION N/A ##### OS / ENVIRONMENT Shippable CI tests ##### STEPS TO REPRODUCE Start a CI run for `ansible/devel` branch and make sure the Azure tests actually run. ##### EXPECTED RESULTS CI succeeds ##### ACTUAL RESULTS Some Azure CI tests consistently fail: - T=azure/2.7/2 - T=azure/3.6/2 From https://app.shippable.com/github/ansible/ansible/runs/153739/123/console ``` 34:40 TASK [azure_rm_storageaccount : Change account type and add custom domain] ***** 34:40 task path: /root/ansible/test/results/.tmp/integration/azure_rm_storageaccount-1_wlZF-ÅÑŚÌβŁÈ/test/integration/targets/azure_rm_storageaccount/tasks/main.yml:102 34:40 <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root 34:40 <testhost> EXEC /bin/sh -c 'echo ~root && sleep 0' 34:40 <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736 `" && echo ansible-tmp-1576496300.53-21371603272736="` echo /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736 `" ) && sleep 0' 34:40 Using module file /root/ansible/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py 34:40 <testhost> PUT /root/.ansible/tmp/ansible-local-5062uBzF81/tmpuHCv56 TO /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736/AnsiballZ_azure_rm_storageaccount.py 34:40 <testhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736/ /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736/AnsiballZ_azure_rm_storageaccount.py && sleep 0' 34:40 <testhost> EXEC /bin/sh -c 'RESOURCE_GROUP_SECONDARY=ansible-core-ci-prod-aa236c49-9ebf-4e43-95fe-bfa57d70012c-2 RESOURCE_GROUP=ansible-core-ci-prod-aa236c49-9ebf-4e43-95fe-bfa57d70012c-1 AZURE_CLIENT_ID=d856067d-31a2-499b-9cdc-8570fafbcb28 AZURE_TENANT=51cfe857-2f92-4581-b504-ee3eba3db075 AZURE_SECRET=b0c8-N2o4-v0M4-u1K6 AZURE_SUBSCRIPTION_ID=6d22db98-3e5f-4ab9-bdf9-2f911a2775f7 /tmp/python-g20dyI-ansible/python /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736/AnsiballZ_azure_rm_storageaccount.py && sleep 0' 34:42 <testhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1576496300.53-21371603272736/ > /dev/null 2>&1 && sleep 0' 34:42 The full traceback is: 34:42 WARNING: The below traceback may *not* be related to the actual failure. 34:42 File "/tmp/ansible_azure_rm_storageaccount_payload_ILdxb7/ansible_azure_rm_storageaccount_payload.zip/ansible/modules/cloud/azure/azure_rm_storageaccount.py", line 556, in update_account 34:42 File "/usr/local/lib/python2.7/dist-packages/azure/mgmt/storage/v2018_07_01/operations/storage_accounts_operations.py", line 415, in update 34:42 raise exp 34:42 34:42 fatal: [testhost]: FAILED! => { 34:42 "changed": false, 34:42 "invocation": { 34:42 "module_args": { 34:42 "access_tier": null, 34:42 "account_type": "Standard_GRS", 34:42 "ad_user": null, 34:42 "adfs_authority_url": null, 34:42 "api_profile": "latest", 34:42 "append_tags": true, 34:42 "auth_source": null, 34:42 "blob_cors": null, 34:42 "cert_validation_mode": null, 34:42 "client_id": null, 34:42 "cloud_environment": "AzureCloud", 34:42 "custom_domain": { 34:42 "name": "ansible.com", 34:42 "use_sub_domain": false 34:42 }, 34:42 "force_delete_nonempty": false, 34:42 "https_only": false, 34:42 "kind": "Storage", 34:42 "location": null, 34:42 "name": "6841cc3648a2c983b82d177c", 34:42 "password": null, 34:42 "profile": null, 34:42 "resource_group": "ansible-core-ci-prod-aa236c49-9ebf-4e43-95fe-bfa57d70012c-1", 34:42 "secret": null, 34:42 "state": "present", 34:42 "subscription_id": null, 34:42 "tags": null, 34:42 "tenant": null 34:42 } 34:42 }, 34:42 "msg": "Failed to update custom domain: Azure Error: StorageCustomDomainNameNotValid\nMessage: Storage custom domain name ansible.com is not valid." 34:42 } 34:42 ...ignoring 34:42 34:42 TASK [azure_rm_storageaccount : Assert CNAME failure] ************************** 34:42 task path: /root/ansible/test/results/.tmp/integration/azure_rm_storageaccount-1_wlZF-ÅÑŚÌβŁÈ/test/integration/targets/azure_rm_storageaccount/tasks/main.yml:111 34:42 fatal: [testhost]: FAILED! => { 34:42 "assertion": "'custom domain name could not be verified' in change_account['msg']", 34:42 "changed": false, 34:42 "evaluated_to": false, 34:42 "msg": "Assertion failed" 34:42 } 34:42 34:42 PLAY RECAP ********************************************************************* 34:42 testhost : ok=14 changed=2 unreachable=0 failed=1 skipped=0 rescued=0 ignored=3 ```
https://github.com/ansible/ansible/issues/65871
https://github.com/ansible/ansible/pull/65875
bd989052b17d571e1395c3bac5128551403ce396
14ebceec2535ba7ff51d75cc926198a69d356711
2019-12-16T12:04:33Z
python
2019-12-19T17:12:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,819
["lib/ansible/plugins/terminal/routeros.py"]
routeros_command fails if username contains period char
##### SUMMARY When using the RouterOS module and using a username with period in it ".", the command fails. Changing the username fixes the Problem. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME routeros_command ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/lucas/.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.0 (default, Oct 23 2019, 18:51:26) [GCC 9.2.0] ``` ##### CONFIGURATION default unchanged configuration ##### OS / ENVIRONMENT Manjaro Linux (Arch Linux) Kernel 4.19.88-1-MANJARO ##### STEPS TO REPRODUCE site.yml ```yaml - hosts: all roles: - { role: routeros-common, tags: 'routeros-common' } ``` inventory: ``` [routeros] sw05 ``` Role: ```yaml - name: "configure common Mikrotik settings" routeros_command: commands: - /system routerboard print - /system identity print ``` Working group_vars/routeros.yml: ```yaml ansible_connection: network_cli ansible_network_os: routeros ansible_user: lucas ``` not working group_vars/routeros.yml: ```yaml ansible_connection: network_cli ansible_network_os: routeros ansible_user: lucas.pless ``` I tried adding +cet512w to the username, and using the "-u" flag with the ansible-playbook command, but it makes no difference. ##### EXPECTED RESULTS I expect this result to be printed: ``` ansible-playbook -i inventory site.yml --limit "sw05" PLAY [all] ************************************************************************************************************************************************************ TASK [Gathering Facts] ************************************************************************************************************************************************ ok: [sw05] TASK [routeros-common : configure common Mikrotik settings] *********************************************************************************************************** ok: [sw05] TASK [routeros-common : Display resource statistics (routeros)] ******************************************************************************************************* ok: [sw05] PLAY RECAP ************************************************************************************************************************************************************ sw05 : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` ##### ACTUAL RESULTS Instead i get this error message: ``` ansible-playbook -i inventory site.yml --limit "sw05" PLAY [all] ************************************************************************************************************************************************************ TASK [Gathering Facts] ************************************************************************************************************************************************ ok: [sw05] TASK [routeros-common : configure common Mikrotik settings] *********************************************************************************************************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: timeout value 30 seconds reached while trying to send command: b'/system resource print' fatal: [sw05]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/lucas/.ansible/tmp/ansible-local-231793hztvso5/ansible-tmp-1576263789.508171-260022264015288/AnsiballZ_routeros_command.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/lucas/.ansible/tmp/ansible-local-231793hztvso5/ansible-tmp-1576263789.508171-260022264015288/AnsiballZ_routeros_command.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/lucas/.ansible/tmp/ansible-local-231793hztvso5/ansible-tmp-1576263789.508171-260022264015288/AnsiballZ_routeros_command.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.routeros.routeros_command', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib/python3.8/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.8/runpy.py\", line 95, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.8/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_routeros_command_payload_djxtu67b/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/routeros_command.py\", line 187, in <module>\n File \"/tmp/ansible_routeros_command_payload_djxtu67b/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/routeros_command.py\", line 157, in main\n File \"/tmp/ansible_routeros_command_payload_djxtu67b/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py\", line 125, in run_commands\n File \"/tmp/ansible_routeros_command_payload_djxtu67b/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py\", line 55, in get_connection\n File \"/tmp/ansible_routeros_command_payload_djxtu67b/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py\", line 69, in get_capabilities\n File \"/tmp/ansible_routeros_command_payload_djxtu67b/ansible_routeros_command_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: timeout value 30 seconds reached while trying to send command: b'/system resource print'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} PLAY RECAP ************************************************************************************************************************************************************ sw05 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` Of cause the ssh login with both user names is working with public key method.
https://github.com/ansible/ansible/issues/65819
https://github.com/ansible/ansible/pull/65905
b05529c5a30a196f89bef3837523efaa24cb3d9e
fff613dd3eaec2fcf1eb09e66feb358476bbb4cd
2019-12-13T19:07:55Z
python
2020-01-09T04:04:47Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,816
["changelogs/fragments/ansible-test-sanity-pylint-config-fix.yml", "test/lib/ansible_test/_data/sanity/pylint/config/ansible-test.cfg", "test/lib/ansible_test/_data/sanity/pylint/config/collection.cfg", "test/lib/ansible_test/_data/sanity/pylint/config/default.cfg", "test/lib/ansible_test/_data/sanity/pylint/config/sanity.cfg"]
ansible-test duplicate-code with import future lines
<!--- 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 `ansible-test` is reported duplicated lines in my collections while running pylon test. The duplicated lines are the `from __future__ import ...` that are mandatory according to other pylint tests. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-test ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = None 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, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] ``` ##### OS / ENVIRONMENT `ansible-test` command is executed from gitlab-ci using a centos:7 image. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml ansible-test sanity --docker ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS No error just like a local run with `--docker` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below Running sanity test 'pslint' Running sanity test 'pylint' with Python 3.6 ERROR: Found 1 pylint issue(s) which need to be resolved: ERROR: plugins/modules/harbor_user.py:1:0: duplicate-code: Similar lines in 2 files ==harbor_project:6 ==harbor_user:6 from __future__ import (absolute_import, division, print_function) ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1' } DOCUMENTATION = ''' --- See documentation for help: https://docs.ansible.com/ansible/2.9/dev_guide/testing/sanity/pylint.html Running sanity test 'replace-urlopen' with Python 3.6 Running sanity test 'rstcheck' with Python 3.6 Running sanity test 'shebang' with Python 3.6 Running sanity test 'shellcheck' ```
https://github.com/ansible/ansible/issues/65816
https://github.com/ansible/ansible/pull/70118
0133757d44fb5e5cc8d7e288bac8ee2b6502782a
8152d8bc1a0981230d43b0e3e54085912193eb9b
2019-12-13T18:12:02Z
python
2020-06-17T17:10:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,815
["changelogs/fragments/65839-docker_network-idempotence.yml", "lib/ansible/modules/cloud/docker/docker_network.py", "test/integration/targets/docker_network/tasks/tests/ipam.yml", "test/units/modules/cloud/docker/test_docker_network.py"]
docker_network with multiple subnets always changes
<!--- 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 --> When using `docker_network` to create a network with multiple subnets, the task will delete/create the network even if it already exists with the correct subnets. Ansible fails to judge if the existing subnets are correct, probably because of the way the arrays of subnets are compared in python. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> docker_network ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/gunix/.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.0 (default, Oct 23 2019, 18:51:26) [GCC 9.2.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible/ansible.log HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = True INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3 ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Both systems are running ArchLinux. ##### 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: "deploy network namespace that can hold all IPs" docker_network: name: "macvlan1" driver: "macvlan" internal: false driver_options: parent: "{{ ansible_default_ipv4.alias }}" ipam_config: "{{ macvlan_subnets }}" ``` also vars: ``` macvlan_subnets: - gateway: 10.162.208.1 subnet: 10.162.208.0/24 - gateway: 10.162.223.1 subnet: 10.162.223.0/24 - gateway: 10.162.210.1 subnet: 10.162.210.0/24 ``` <!--- 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 was expecting to run the play 10 times and get Changed only on the first run and OK on the other 9 runs. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> The docker network ALWAYS changes, even if the subnets are correct on the server, causing all docker containers on the network to disconnect. This will cause downtime for all the services that run on the node. <!--- Paste verbatim command output between quotes --> ```paste below TASK [gen4 : deploy network namespace that can hold all IPs] **************************************************************** --- before +++ after @@ -1,19 +1,19 @@ { - "connected.10.162.208.129": false, - "connected.10.162.210.161": false, - "connected.10.162.210.169": false, - "connected.10.162.210.170": false, - "connected.10.162.210.171": false, - "connected.10.162.210.172": false, - "connected.10.162.210.173": false, - "connected.10.162.223.72": false, - "connected.10.162.223.73": false, - "connected.10.162.223.74": false, - "connected.10.162.223.75": false, - "connected.10.162.223.76": false, + "connected.10.162.208.129": true, + "connected.10.162.210.161": true, + "connected.10.162.210.169": true, + "connected.10.162.210.170": true, + "connected.10.162.210.171": true, + "connected.10.162.210.172": true, + "connected.10.162.210.173": true, + "connected.10.162.223.72": true, + "connected.10.162.223.73": true, + "connected.10.162.223.74": true, + "connected.10.162.223.75": true, + "connected.10.162.223.76": true, "exists": true, - "ipam_config[0].gateway": "10.162.210.1", - "ipam_config[0].subnet": "10.162.210.0/24", - "ipam_config[1].gateway": "10.162.210.1", - "ipam_config[1].subnet": "10.162.210.0/24" + "ipam_config[0].gateway": "10.162.208.1", + "ipam_config[0].subnet": "10.162.208.0/24", + "ipam_config[1].gateway": "10.162.223.1", + "ipam_config[1].subnet": "10.162.223.0/24" } changed: [server1337.gun1x] ```
https://github.com/ansible/ansible/issues/65815
https://github.com/ansible/ansible/pull/65839
30cfa92e90b3778b4edb6a8828f0b5f0e1b6356f
17ef253ad15fa6a02e1e22f5847aba85b60e151f
2019-12-13T17:51:58Z
python
2019-12-29T22:16:17Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,814
["test/integration/targets/azure_rm_storageaccount/tasks/main.yml"]
azure_rm_storageaccount integration tests failing due to error message change
<!--- 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 `azure_rm_storageaccount` tests are failing because I think the error message has changed. https://app.shippable.com/github/ansible/ansible/runs/153582/72/console This is the failure message: ``` "msg": "Failed to update custom domain: Azure Error: StorageCustomDomainNameNotValid\nMessage: Storage custom domain name ansible.com is not valid." ``` Which doesn't match the `assert` check: ``` "assertion": "'custom domain name could not be verified' in change_account['msg']", ``` I don't know enough about what this is doing to tell if it's failing for some other reason, but my guess is that the error message changed and we just need to update the `assert` test. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `test/integration/targets/azure_rm_storageaccount/` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below N/A ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Shippable ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run `azure_rm_storageaccount` integration test <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Tests pass ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Tests fail <!--- Paste verbatim command output between quotes --> ```paste below 13:58 TASK [azure_rm_storageaccount : Assert CNAME failure] ************************** 13:58 task path: /root/ansible/test/integration/targets/azure_rm_storageaccount/tasks/main.yml:69 13:58 fatal: [testhost]: FAILED! => { 13:58 "assertion": "'custom domain name could not be verified' in change_account['msg']", 13:58 "changed": false, 13:58 "evaluated_to": false, 13:58 "msg": "Assertion failed" 13:58 } ```
https://github.com/ansible/ansible/issues/65814
https://github.com/ansible/ansible/pull/65875
bd989052b17d571e1395c3bac5128551403ce396
14ebceec2535ba7ff51d75cc926198a69d356711
2019-12-13T17:26:05Z
python
2019-12-19T17:12:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,811
["changelogs/fragments/65854-docker_container-wait-for-removal.yml", "lib/ansible/module_utils/docker/common.py", "lib/ansible/modules/cloud/docker/docker_container.py"]
docker_container with auto_remove:yes fails
##### SUMMARY `docker_container` module often fails because removal of `auto_remove: yes` takes some time. I had the same problem before with shell scripts since `docker stop` returns immediately but container removal takes some time to finish. Until removal is finished, no new container with the same name can be created. The error message is: Error creating container: 409 Client Error: Conflict ("Conflict. The container name "/MYCONTAINER" is already in use by container "HASH". You have to remove (or rename) that container to be able to reuse that name.") ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME docker_container ##### ANSIBLE VERSION ``` ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/USER/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.17rc1 (default, Oct 10 2019, 10:26:01) [GCC 9.2.1 20191008] ``` ##### CONFIGURATION _no changes_ ##### OS / ENVIRONMENT Ubuntu 19.10 ##### STEPS TO REPRODUCE 0. Run playbook to create container 0. Apply many changes to the file system 0. Run playbook again ```yaml docker_container: name: SOMETHING image: SOMETHING state: started detach: yes recreate: yes autoremove: yes ``` ##### EXPECTED RESULTS Wait for removal before trying to create a new container. ##### ACTUAL RESULTS Command fails. ``` Error creating container: 409 Client Error: Conflict ("Conflict. The container name "/MYCONTAINER" is already in use by container "HASH". You have to remove (or rename) that container to be able to reuse that name.") ```
https://github.com/ansible/ansible/issues/65811
https://github.com/ansible/ansible/pull/65854
17ef253ad15fa6a02e1e22f5847aba85b60e151f
4df5bdb11eaed6e9d23d1de0ff7f420409cc1324
2019-12-13T16:07:13Z
python
2019-12-29T22:16:32Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,770
["lib/ansible/modules/net_tools/nmcli.py"]
nmcli not working on Ubuntu: `No package matching 'libnm-glib-dev' is available`
##### SUMMARY The [docu](https://docs.ansible.com/ansible/latest/modules/nmcli_module.html) lists some requirements to be installed: - network-manager - python3-dbus - libnm-glib-dev however there is no package`libnm-glib-dev` available in Ubuntu and it is not clear how to install the required libraries. ```bash fatal: [node001]: FAILED! => {"changed": false, "msg": "No package matching 'libnm-glib-dev' is available"} ``` Removing installation of `libnm-glib-dev` will lead to a subsequent error ```bash An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Namespace NMClient not available fatal: [node001]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (NetworkManager glib API) on node001's Python /usr/biNo package matching 'libnm-glib-dev' is availablen/python3. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"} ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME component nmcli ##### ANSIBLE VERSION ``` ansible 2.9.0 config file = /home/aedu/ansible.cfg configured module search path = ['/home/aedu/.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.4 (default, Oct 4 2019, 06:57:26) [GCC 9.2.0] ``` ##### CONFIGURATION ``` DEFAULT_HOST_LIST(/home/aedu/ansible.cfg) = ['/home/aedu/inventory.yml'] DEFAULT_REMOTE_USER(/home/aedu/ansible.cfg) = ansible DEFAULT_ROLES_PATH(/home/aedu/ansible.cfg) = ['/home/aedu/roles'] DEFAULT_TIMEOUT(/home/aedu/ansible.cfg) = 10 DEFAULT_VAULT_PASSWORD_FILE(/home/aedu/ansible.cfg) = /home/aedu/.ssh/wyssmann RETRY_FILES_SAVE_PATH(/home/aedu/ansible.cfg) = /home/aedu/.ansible-retry ``` ##### OS / ENVIRONMENT ```bash # uname -a Linux node001 5.3.0-19-generic #20-Ubuntu SMP Fri Oct 18 09:04:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/os-release NAME="Ubuntu" VERSION="19.10 (Eoan Ermine)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 19.10" VERSION_ID="19.10" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=eoan UBUNTU_CODENAME=eoan ``` ##### STEPS TO REPRODUCE As using python3 the packages are slighty different I've updated these ```yaml - name: install needed network manager libs package: name: - network-manager - python3-dbus - libnm-glib-dev state: present - name: Configure {{ iface.name }} nmcli: conn_name: '{{ iface.name }}' ifname: '{{ iface.name }}' type: ethernet ip4: '{{ ipv4.address }}' gw4: '{{ ipv4.gateway }}' ip6: '{{ ipv6.address }}' gw6: '{{ ipv6.gateway }}' state: present ``` ##### EXPECTED RESULTS nmcli works fine ##### ACTUAL RESULTS ```bash fatal: [node001]: FAILED! => {"changed": false, "msg": "No package matching 'libnm-glib-dev' is available"} ```
https://github.com/ansible/ansible/issues/65770
https://github.com/ansible/ansible/pull/65726
7ee3103a86f0179faead92d2481ff175d9a69747
663171e21820f1696b93c3f182626b0fd006b61b
2019-12-12T16:43:52Z
python
2019-12-21T05:58:58Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,765
["changelogs/fragments/65765-vmware_tag_manager.yml", "lib/ansible/modules/cloud/vmware/vmware_tag_manager.py", "test/integration/targets/vmware_tag_manager/aliases", "test/integration/targets/vmware_tag_manager/tasks/main.yml", "test/integration/targets/vmware_tag_manager/tasks/tag_manager_dict.yml"]
VMware: Colon support within VMWare Tags vmware_tag_manager
<!--- Verify first that your feature was not already discussed on GitHub --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY VMWare supports using colons in VMWare tags, however the vmware_tag_manager module does not since colons are used to delineate categories. It would be nice if there was some way to support using colons in tag names. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME vmware_tag_manager ##### ADDITIONAL INFORMATION There should be some way to escape a colon in a tag_name so that we can continue to support categories but intentionally override that functionality when we intend to use a tag with a colon within. Two tag examples below. One with category, one escaping for instance. Feel free to use whatever escape sequence is most supportable. ``` - name: Add tags to a virtual machine vmware_tag_manager: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' validate_certs: no tag_names: - 'Category:Tag' - 'TagWith\:Colon' object_name: 'VMGuest' object_type: VirtualMachine state: add delegate_to: localhost ``` Including the authors: @Akasurde @GBrawl
https://github.com/ansible/ansible/issues/65765
https://github.com/ansible/ansible/pull/66150
33d5c68887a063340355bf1a5c24ac2d66e6992b
7000c51c0691e176815cd0558c0b79f1f36d8c60
2019-12-12T12:38:32Z
python
2020-02-14T21:07:10Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,761
["changelogs/fragments/65903-postgresql_privs_sort_lists_with_none_elements.yml", "lib/ansible/modules/database/postgresql/postgresql_privs.py"]
postgresql_privs fail after it's updated to 2.9.2
<!--- 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 regardin the comment from https://github.com/ansible/ansible/pull/65098 ``` {"attempts": 3, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1057, in <module>\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1038, in main\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 752, in manipulate_privs\nTypeError: '<' not supported between instances of 'NoneType' and 'NoneType'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} ``` related changes where backported by https://github.com/ansible/ansible/pull/65098 Seems that we need to add conditions to *.sort() if they are no empty/None, etc ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ```postgresql_privs``` ```lib/ansible/modules/database/postgresql/postgresql_privs.py``` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.9.2 ``` in 2.9.1 it was ok ##### CONFIGURATION Doesn't matter ##### OS / ENVIRONMENT Doesn't matter ##### STEPS TO REPRODUCE ```yaml - name: Create permissions for {{ client }} postgresql_privs: db: '{{ client }}' roles: '{{ client }}' privs: ALL objs: ALL_IN_SCHEMA register: result retries: 3 delay: 10 until: result is not failed become: true become_user: postgres ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS ``` ``` ##### ACTUAL RESULTS ``` {"attempts": 3, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1057, in <module>\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1038, in main\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 752, in manipulate_privs\nTypeError: '<' not supported between instances of 'NoneType' and 'NoneType'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} ```
https://github.com/ansible/ansible/issues/65761
https://github.com/ansible/ansible/pull/65903
ec0885cf05027e0b220abf1feee96a9f7770cafa
9b85a51c64a687f8db4a9bfe3fea0f62f5f65af2
2019-12-12T10:48:40Z
python
2019-12-17T13:53:51Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,757
["lib/ansible/plugins/shell/__init__.py"]
Fix simple typo: workind -> working
# Issue Type [x] Bug (Typo) # Steps to Replicate 1. Examine lib/ansible/plugins/shell/__init__.py. 2. Search for `workind`. # Expected Behaviour 1. Should read `working`.
https://github.com/ansible/ansible/issues/65757
https://github.com/ansible/ansible/pull/65758
570c82f068d58b1e6ad9d2611bf647c3c82e6db0
cbc513e74893e1f224b553bd9c68505e7f7bd883
2019-12-12T09:16:14Z
python
2019-12-12T10:07:14Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,746
["changelogs/fragments/65894-redfish-bios-attributes.yaml", "docs/docsite/rst/porting_guides/porting_guide_2.10.rst", "lib/ansible/modules/remote_management/redfish/redfish_config.py"]
redfish_config contains deprecated call to be removed in 2.10
##### SUMMARY redfish_config contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal ``` lib/ansible/modules/remote_management/redfish/redfish_config.py:277:8: ansible-deprecated-version: Deprecated version ('2.10') found in call to Display.deprecated or AnsibleModule.deprecate ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ``` lib/ansible/modules/remote_management/redfish/redfish_config.py ``` ##### ANSIBLE VERSION ``` 2.10 ```
https://github.com/ansible/ansible/issues/65746
https://github.com/ansible/ansible/pull/65894
d3b6db37549517b5d8234e04b247f01e2f9b49f0
973e36c6b69db9e473e72502c7a4a9ad2d9193e7
2019-12-11T20:46:48Z
python
2019-12-19T06:09:28Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,727
["changelogs/fragments/65755-mysql_info_doesnt_list_empty_dbs.yml", "lib/ansible/modules/database/mysql/mysql_info.py", "test/integration/targets/mysql_info/tasks/main.yml"]
mysql_info doesn't list empty DBs
##### SUMMARY `mysql_info` module doesn't show empty DBs. It uses following query in the code: ``` MariaDB [(none)]> SELECT table_schema AS 'name', SUM(data_length + index_length) AS "size" FROM information_schema.TABLES GROUP BY table_schema; +--------------------+-----------+ | name | size | +--------------------+-----------+ | d106953_tm | 470728704 | | information_schema | 212992 | | mysql | 6038300 | | performance_schema | 0 | +--------------------+-----------+ 4 rows in set (0,005 sec) ``` But `show databases` show something else; ``` MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | d106953_tm | | information_schema | | innodb | | mysql | | performance_schema | | testovic | | tm_web | | ttttt | +--------------------+ 8 rows in set (0,001 sec) ``` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `mysql_info` modules ##### ANSIBLE VERSION ``` ansible 2.9.1 config file = /home/jiri/.ansible.cfg configured module search path = ['/home/jiri/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/jiri/stow/ansible/venv/lib/python3.6/site-packages/ansible executable location = /home/jiri/stow/ansible/venv/bin/ansible python version = 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] ``` ##### OS / ENVIRONMENT Amazon Linux 2 rh-mariadb103-3.3-5.el7.x86_64 ##### STEPS TO REPRODUCE * create empty via eg. via `mysql_db module` * query via `mysql_info` what databases where found ##### EXPECTED RESULTS should list even empty DBs ##### ACTUAL RESULTS it seems only populated DBs are listed
https://github.com/ansible/ansible/issues/65727
https://github.com/ansible/ansible/pull/65755
80333f9c4b4f79ffe0af995be4aaffaa36524f4e
0079b8eaa205dc72df84efbc069670aaaeeb5143
2019-12-11T12:21:31Z
python
2019-12-12T13:10:52Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,722
["changelogs/fragments/65722-unsafe-tuples.yml", "lib/ansible/executor/task_executor.py", "lib/ansible/template/__init__.py", "lib/ansible/utils/unsafe_proxy.py", "test/units/utils/test_unsafe_proxy.py"]
Difference in how we handle templating vault variable keys in v2.8 and v2.9
<!--- 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 can see difference in how we handle templating in 2.9 and 2.8. You could see when we run the same playbook on 2.9.2 it is not showing us value of "testvar" in following result which we can see in 2.8.4 ``` ok: [localhost] => { "big_test_list1": [ { "key": "test2_{{ testvar }}_password", "value": "test" } ] } ``` ##### 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.8.x **Ansible** : 2.9.x ``` ##### 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 8 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ```yaml --- Playbook.yml on 2.9.2 - name: TEST gather_facts: False hosts: localhost vars: testvar: "vars" # vault password is: test testdict2: "test2_{{ testvar }}_password": !vault | $ANSIBLE_VAULT;1.2;AES256;test 38636163353333363936333133633334646465393136613037626530663664326665613835326466 6130633637383730613462353037613139323232373762630a616237356230333163666632303262 32313232616539333664633364636562626539393439333539316236623161386163386533613063 6466396661323462620a396565646637616264316338636333343738653831383137643463653830 6433 tasks: - debug: var: testdict2 - set_fact: big_test_list1: "{{ big_test_list1 | default([]) + item }}" loop: - "{{ testdict2 | dict2items }}" - debug: var: big_test_list1 ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Playbook should show results as follows ``` **On 2.8.4** Vault password: PLAY [TEST] ******************************************************************************************************************************************************************************************************* TASK [debug] ****************************************************************************************************************************************************************************************************** ok: [localhost] => { "testdict2": { "test2_{{ testvar }}_password": "test" } } TASK [set_fact] *************************************************************************************************************************************************************************************************** ok: [localhost] => (item=[{'key': 'test2_vars_password', 'value': 'test'}]) TASK [debug] ****************************************************************************************************************************************************************************************************** ok: [localhost] => { "big_test_list1": [ { "key": "test2_vars_password", "value": "test" } ] } ``` ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below **On 2.9.2** Vault password: PLAY [TEST] ******************************************************************************************************************************************************************************************************* TASK [debug] ****************************************************************************************************************************************************************************************************** ok: [localhost] => { "testdict2": { "test2_{{ testvar }}_password": "test" } } TASK [set_fact] *************************************************************************************************************************************************************************************************** ok: [localhost] => (item=[{'key': u'test2_{{ testvar }}_password', 'value': u'test'}]) TASK [debug] ****************************************************************************************************************************************************************************************************** ok: [localhost] => { "big_test_list1": [ { "key": "test2_{{ testvar }}_password", "value": "test" } ] } ```
https://github.com/ansible/ansible/issues/65722
https://github.com/ansible/ansible/pull/65918
f9e315671a61d3fae93ef816c9d5793c9fc2267c
f8654de851a841d33d2d2e76942c68a758535e56
2019-12-11T10:36:53Z
python
2020-01-07T14:41:37Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,721
["lib/ansible/modules/cloud/ovirt/ovirt_snapshot.py"]
Support specify disks in ovirt_snapshot 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 --> Currently it's not possible to specify disks to be included in the snapshot, always all disks are used. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> ovirt_snapshot ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> <!--- Paste example playbooks or commands between quotes below --> Could look like: ```yaml ovirt_snapshot: description: My snap vm_name: myvm disks: - id: 123 - id: 456 ``` or ```yaml ovirt_snapshot: description: My snap vm_name: myvm disks: - name: myvm_disk_db - name: myvm_disk_store ``` <!--- HINT: You can also paste gist.github.com links for larger files -->
https://github.com/ansible/ansible/issues/65721
https://github.com/ansible/ansible/pull/65729
a168e73713f896b75487ce22306490de9ed2b3ce
9f6c210eac83b1f40e5a8a3d352e51e5d4bd8066
2019-12-11T10:32:15Z
python
2019-12-19T07:52:11Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,711
["changelogs/fragments/user-alpine-on-changed-fix.yaml", "lib/ansible/modules/system/user.py", "test/integration/targets/user/tasks/main.yml"]
user.py PR45507 broke update_password="on_create"
##### SUMMARY The merge of #45507 broke `update_password="on_create"` on Alpine Linux with the shadow package installed. This does not work anymore ```yml - name: add users user: name: "{{ item.name }}" comment: "{ item.comment }}" shell: "/bin/zsh" password: '*' update_password: on_create with_items: .... ``` After the PR, all users that have a password that is not '*' will get their password changed. Reverting bf3e397ea7922e8bd8b8ffbc05d1aede0317d119, makes 'update_password: on_create' work as expected again. ##### 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/modules/system/user.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below 2.8.7 ``` ##### 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. --> Alpine 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 - name: add users user: name: "{{ item.name }}" comment: "{ item.comment }}" shell: "/bin/zsh" password: '*' update_password: on_create ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Users that are not created does not get their password changed. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below Password "hash" changed to '*' ```
https://github.com/ansible/ansible/issues/65711
https://github.com/ansible/ansible/pull/65977
d50fac9905b8143420ba8486d536553693dddfe6
18130e1419423b6ae892899d08509665b21611b2
2019-12-10T20:57:03Z
python
2019-12-20T18:09:22Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,710
["changelogs/fragments/65710-find-include-parent.yml", "lib/ansible/plugins/strategy/free.py", "lib/ansible/plugins/strategy/linear.py", "test/integration/targets/include_import/apply/include_apply_65710.yml", "test/integration/targets/include_import/runme.sh"]
Unexpected Exception ... 'Block' object has no attribute 'get_search_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 --> I get an `ERROR! Unexpected Exception, this is probably a bug: 'Block' object has no attribute 'get_search_path'`. It seems to require both an 'apply' on include_tasks and the `playbook_vars_root` configuration option set to trigger the exception. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> Core ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.2 config file = ./ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible executable location = /usr/local/virtualenv/py3/ansible_stable/bin/ansible python version = 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] ``` ##### CONFIGURATION PLAYBOOK_VARS_ROOT(./ansible.cfg) = all ##### OS / ENVIRONMENT Debian 10 ansible latest version of ansible installed via pip into venv. ##### STEPS TO REPRODUCE ansible-playbook example.yml -vvv 2>&1 ansible-playbook 2.9.2 config file = ./ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible executable location = /usr/local/virtualenv/py3/ansible_stable/bin/ansible-playbook python version = 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] Using ./ansible.cfg as config file host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Parsed /etc/ansible/hosts inventory source with ini plugin [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAYBOOK: example.yml ************************************************************************************************* 1 plays in example.yml PLAY [localhost] ****************************************************************************************************** META: ran handlers TASK [ssh_client : No exception] ************************************************************************************** task path: ./roles/ssh_client/tasks/main.yml:2 included: ./roles/ssh_client/tasks/clean_known_hosts.yml for localhost TASK [ssh_client : Read /etc/ssh/ssh_known_hosts] ********************************************************************* task path: ./roles/ssh_client/tasks/clean_known_hosts.yml:2 <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root <127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288 `" && echo ansible-tmp-1576004604.8780084-124655683624288="` echo /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288 `" ) && sleep 0' Using module file /usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible/modules/net_tools/basics/slurp.py <127.0.0.1> PUT /root/.ansible/tmp/ansible-local-24449ljfccz75/tmpdopvwfyq TO /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288/AnsiballZ_slurp.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288/ /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288/AnsiballZ_slurp.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c '/usr/local/virtualenv/py3/ansible_stable/bin/python3 /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288/AnsiballZ_slurp.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1576004604.8780084-124655683624288/ > /dev/null 2>&1 && sleep 0' fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "src": "/etc/ssh/ssh_known_hosts" } }, "msg": "file not found: /etc/ssh/ssh_known_hosts" } ...ignoring TASK [ssh_client : debug] ********************************************************************************************* task path: ./roles/ssh_client/tasks/clean_known_hosts.yml:10 skipping: [localhost] => {} TASK [ssh_client : Unexpected Exception] ****************************************************************************** task path: ./roles/ssh_client/tasks/main.yml:8 included: ./roles/ssh_client/tasks/clean_known_hosts.yml for localhost ERROR! Unexpected Exception, this is probably a bug: 'Block' object has no attribute 'get_search_path' the full traceback was: Traceback (most recent call last): File "/usr/local/virtualenv/py3/ansible_stable/bin/ansible-playbook", line 123, in <module> exit_code = cli.run() File "/usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible/cli/playbook.py", line 127, in run results = pbex.run() File "/usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible/executor/playbook_executor.py", line 169, in run result = self._tqm.run(play=play) File "/usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible/executor/task_queue_manager.py", line 240, in run play_return = strategy.run(iterator, play_context) File "/usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible/plugins/strategy/linear.py", line 367, in run _hosts_all=self._hosts_cache_all, File "/usr/local/virtualenv/py3/ansible_stable/lib/python3.7/site-packages/ansible/vars/manager.py", line 195, in get_vars basedirs = task.get_search_path() AttributeError: 'Block' object has no attribute 'get_search_path' ./ansible.cfg [defaults] playbook_vars_root = all ./example.yml --- - hosts: localhost gather_facts: no roles: - ssh_client ./roles/ssh_client/tasks/main.yml --- - name: No exception include_tasks: file: clean_known_hosts.yml vars: known_hosts_file: /etc/ssh/ssh_known_hosts - name: Unexpected Exception include_tasks: file: clean_known_hosts.yml apply: become: yes vars: known_hosts_file: /etc/ssh/ssh_known_hosts ./roles/ssh_client/tasks/clean_known_hosts.yml --- - name: Read {{ known_hosts_file }} slurp: src: "{{ known_hosts_file }}" register: current_known_hosts ignore_errors: yes - when: current_known_hosts is not failed block: - debug: ##### EXPECTED RESULTS No `ERROR! Unexpected Exception`
https://github.com/ansible/ansible/issues/65710
https://github.com/ansible/ansible/pull/72378
a51a6f4a259b45593c3f803737c6d5d847258a83
e73a0b2460b41c27fd22d286dd2f4407f69f12ed
2019-12-10T19:14:28Z
python
2020-10-29T19:15:18Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,689
["lib/ansible/modules/system/sefcontext.py"]
sefcontext: fatal failure for socket file type
<!--- 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 --> The sefcotext module encounters an error when trying to run with parameter `ftype` set to `"s"` when the fcontext is already present. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> sefcontext module lib/ansible/modules/system/sefcontext.py ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.1 ... python version = 3.7.5 (default, Oct 17 2019, 12:16:48) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Fedora 31 WS. Also broken for CentOS 8. ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> Run the given reproducer two or more times on the same target. <!--- Paste example playbooks or commands between quotes below --> ```yaml - name: "reproducer" sefcontext: ftype: "s" path: "/foo/bar" setype: "var_t" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS - if no fcontext record exists, create record - if fcontext record exists, ensure the type and context are set correctly - first run: adds record (`changed: ...`) - second run: fails (`ok: ...`) ``` TASK [reproducer : reproducer] ********************************************************************************* changed: [localhost] ... TASK [reproducer : reproducer] ********************************************************************************* ok: [localhost] ``` ##### ACTUAL RESULTS - if no fcontext rule exists, create rule (this works fine) - a existing rule does not get recognised and the module tries to create - first run: adds record (`changed: ...`) - second run: fails (`fatal: ...`) ``` TASK [reproducer : reproducer] ********************************************************************************* changed: [localhost] ... TASK [reproducer : reproducer] ********************************************************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "ValueError: File context for /foo/bar already defined\n"} ``` ## Proposed fix When running `semanage fcontext -l` one can see the socket file type is called `socket` and not `socket file`. Also if you look in records at [this position](https://github.com/ansible/ansible/blob/ddd786eedfb416ee3fc0dbec3a2b65d58440d026/lib/ansible/modules/system/sefcontext.py#L163) some tuples with `(something, "socket")` show up but none with `(something, "socket file")`. The following patch seems to fix the mentioned issue. ```diff diff --git a/lib/ansible/modules/system/sefcontext.py b/lib/ansible/modules/system/sefcontext.py index dfe846e7f2..33e3fd2e40 100644 --- a/lib/ansible/modules/system/sefcontext.py +++ b/lib/ansible/modules/system/sefcontext.py @@ -148,7 +148,7 @@ option_to_file_type_str = dict( f='regular file', l='symbolic link', p='named pipe', - s='socket file', + s='socket', ) ``` --- CC: @dagwieers
https://github.com/ansible/ansible/issues/65689
https://github.com/ansible/ansible/pull/65690
9541377a20e61e293f0ea87a09de4ff32b470919
fe6848baddaf5a5e872e91b428cdec3f9b1bc1cb
2019-12-10T13:13:56Z
python
2020-02-15T14:51:06Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,674
["test/integration/targets/yum/aliases"]
yum integration test failing on Fedora 31
<!--- 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 --> `yum` tests on Fedora 31 are failing ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `test/integration/targets/yum/` ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below N/A ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Fedora 31 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> I am unable to reproduce this outside of Shippable. The test command is `ansible-test integration --docker fedora31 yum -vvv` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> Tests pass ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> Tests fail when trying to remove packages that are already removed with error `"lohit-*-fonts - No match for argument: lohit-*-fonts"`. <!--- Paste verbatim command output between quotes --> ```paste below TASK [yum : Install lohit-*-fonts] ********************************************* task path: /root/ansible/test/results/.tmp/integration/yum-gmgubc6r-ÅÑŚÌβŁÈ/test/integration/targets/yum/tasks/yum.yml:697 Running dnf as the backend for the yum action plugin <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root <testhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417 `" && echo ansible-tmp-1575866355.2913747-83952290883417="` echo /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417 `" ) && sleep 0' Using module file /root/ansible/lib/ansible/modules/packaging/os/dnf.py <testhost> PUT /root/.ansible/tmp/ansible-local-21431wvciwh04/tmpcdjoe_t2 TO /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417/AnsiballZ_dnf.py <testhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417/ /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417/AnsiballZ_dnf.py && sleep 0' <testhost> EXEC /bin/sh -c '/tmp/python-ecn_n5k0-ansible/python /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417/AnsiballZ_dnf.py && sleep 0' <testhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1575866355.2913747-83952290883417/ > /dev/null 2>&1 && sleep 0' changed: [testhost] => { "changed": true, "invocation": { "module_args": { "allow_downgrade": false, "autoremove": false, "bugfix": false, "conf_file": null, "disable_excludes": null, "disable_gpg_check": false, "disable_plugin": [], "disablerepo": [], "download_dir": null, "download_only": false, "enable_plugin": [], "enablerepo": [], "exclude": [], "install_repoquery": true, "install_weak_deps": true, "installroot": "/", "list": null, "lock_timeout": 30, "name": [ "lohit-*-fonts" ], "releasever": null, "security": false, "skip_broken": false, "state": "present", "update_cache": false, "update_only": false, "validate_certs": true } }, "msg": "", "rc": 0, "results": [ "Installed: lohit-*-fonts", "Installed: lohit-assamese-fonts-2.91.5-8.fc31.noarch", "Installed: lohit-bengali-fonts-2.91.5-8.fc31.noarch", "Installed: lohit-devanagari-fonts-2.95.4-9.fc31.noarch", "Installed: lohit-gujarati-fonts-2.92.4-8.fc31.noarch", "Installed: lohit-gurmukhi-fonts-2.91.2-9.fc31.noarch", "Installed: lohit-kannada-fonts-2.5.4-7.fc31.noarch", "Installed: lohit-malayalam-fonts-2.92.2-8.fc31.noarch", "Installed: lohit-marathi-fonts-2.94.2-9.fc31.noarch", "Installed: lohit-nepali-fonts-2.94.2-8.fc31.noarch", "Installed: lohit-odia-fonts-2.91.2-8.fc31.noarch", "Installed: lohit-tamil-classical-fonts-2.5.3-12.fc31.noarch", "Installed: lohit-tamil-fonts-2.91.3-8.fc31.noarch", "Installed: lohit-telugu-fonts-2.5.5-7.fc31.noarch" ] } TASK [yum : Remove lohit-*-fonts (1st time)] *********************************** task path: /root/ansible/test/results/.tmp/integration/yum-gmgubc6r-ÅÑŚÌβŁÈ/test/integration/targets/yum/tasks/yum.yml:702 Running dnf as the backend for the yum action plugin <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root <testhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201 `" && echo ansible-tmp-1575866359.546942-200187246790201="` echo /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201 `" ) && sleep 0' Using module file /root/ansible/lib/ansible/modules/packaging/os/dnf.py <testhost> PUT /root/.ansible/tmp/ansible-local-21431wvciwh04/tmp8bjabsgt TO /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201/AnsiballZ_dnf.py <testhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201/ /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201/AnsiballZ_dnf.py && sleep 0' <testhost> EXEC /bin/sh -c '/tmp/python-ecn_n5k0-ansible/python /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201/AnsiballZ_dnf.py && sleep 0' <testhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1575866359.546942-200187246790201/ > /dev/null 2>&1 && sleep 0' changed: [testhost] => { "changed": true, "invocation": { "module_args": { "allow_downgrade": false, "autoremove": false, "bugfix": false, "conf_file": null, "disable_excludes": null, "disable_gpg_check": false, "disable_plugin": [], "disablerepo": [], "download_dir": null, "download_only": false, "enable_plugin": [], "enablerepo": [], "exclude": [], "install_repoquery": true, "install_weak_deps": true, "installroot": "/", "list": null, "lock_timeout": 30, "name": [ "lohit-*-fonts" ], "releasever": null, "security": false, "skip_broken": false, "state": "absent", "update_cache": false, "update_only": false, "validate_certs": true } }, "msg": "", "rc": 0, "results": [ "Removed: lohit-gurmukhi-fonts-2.91.2-9.fc31.noarch", "Removed: lohit-kannada-fonts-2.5.4-7.fc31.noarch", "Removed: lohit-malayalam-fonts-2.92.2-8.fc31.noarch", "Removed: lohit-marathi-fonts-2.94.2-9.fc31.noarch", "Removed: lohit-nepali-fonts-2.94.2-8.fc31.noarch", "Removed: lohit-odia-fonts-2.91.2-8.fc31.noarch", "Removed: lohit-tamil-classical-fonts-2.5.3-12.fc31.noarch", "Removed: lohit-tamil-fonts-2.91.3-8.fc31.noarch", "Removed: lohit-telugu-fonts-2.5.5-7.fc31.noarch", "Removed: lohit-assamese-fonts-2.91.5-8.fc31.noarch", "Removed: lohit-bengali-fonts-2.91.5-8.fc31.noarch", "Removed: lohit-devanagari-fonts-2.95.4-9.fc31.noarch", "Removed: lohit-gujarati-fonts-2.92.4-8.fc31.noarch" ] } TASK [yum : Verify lohit-*-fonts (1st time)] *********************************** task path: /root/ansible/test/results/.tmp/integration/yum-gmgubc6r-ÅÑŚÌβŁÈ/test/integration/targets/yum/tasks/yum.yml:708 ok: [testhost] => { "changed": false, "msg": "All assertions passed" } TASK [yum : Remove lohit-*-fonts (2nd time)] *********************************** task path: /root/ansible/test/results/.tmp/integration/yum-gmgubc6r-ÅÑŚÌβŁÈ/test/integration/targets/yum/tasks/yum.yml:715 Running dnf as the backend for the yum action plugin <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root <testhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225 `" && echo ansible-tmp-1575866363.8594182-120915247525225="` echo /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225 `" ) && sleep 0' Using module file /root/ansible/lib/ansible/modules/packaging/os/dnf.py <testhost> PUT /root/.ansible/tmp/ansible-local-21431wvciwh04/tmppe580h5r TO /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225/AnsiballZ_dnf.py <testhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225/ /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225/AnsiballZ_dnf.py && sleep 0' <testhost> EXEC /bin/sh -c '/tmp/python-ecn_n5k0-ansible/python /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225/AnsiballZ_dnf.py && sleep 0' <testhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1575866363.8594182-120915247525225/ > /dev/null 2>&1 && sleep 0' fatal: [testhost]: FAILED! => { "changed": false, "failures": [ "lohit-*-fonts - No match for argument: lohit-*-fonts" ], "invocation": { "module_args": { "allow_downgrade": false, "autoremove": false, "bugfix": false, "conf_file": null, "disable_excludes": null, "disable_gpg_check": false, "disable_plugin": [], "disablerepo": [], "download_dir": null, "download_only": false, "enable_plugin": [], "enablerepo": [], "exclude": [], "install_repoquery": true, "install_weak_deps": true, "installroot": "/", "list": null, "lock_timeout": 30, "name": [ "lohit-*-fonts" ], "releasever": null, "security": false, "skip_broken": false, "state": "absent", "update_cache": false, "update_only": false, "validate_certs": true } }, "msg": "Failed to install some of the specified packages", "rc": 1, "results": [] } ```
https://github.com/ansible/ansible/issues/65674
https://github.com/ansible/ansible/pull/66218
02c126f5ee451a7dc1b442d15a883bc3f86505d1
22855f73fb5da10c9403cb5af4212a423973657f
2019-12-09T19:53:07Z
python
2020-01-06T21:35:09Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,673
["changelogs/fragments/ansible-galaxy-install.yaml", "docs/docsite/rst/shared_snippets/installing_multiple_collections.txt", "lib/ansible/cli/galaxy.py", "test/integration/targets/ansible-galaxy-collection/tasks/download.yml", "test/integration/targets/ansible-galaxy-collection/tasks/install.yml", "test/units/cli/test_galaxy.py", "test/units/galaxy/test_collection.py"]
ansible-galaxy install user experience is disastrous if you use roles and collections
##### SUMMARY If I create one `requirements.yml` file which lists all my Ansible dependencies for a given project, including roles and collections from Galaxy, and try to install the dependencies using `ansible-galaxy`, it results in an unexpected and unintuitive behavior. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME ansible-galaxy ##### ANSIBLE VERSION ``` ansible 2.9.5 config file = /Users/jgeerling/Downloads/blend-test/ansible.cfg configured module search path = ['/Users/jgeerling/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.6 (default, Feb 9 2020, 13:28:08) [Clang 11.0.0 (clang-1100.0.33.17)] ``` ##### CONFIGURATION ``` ANSIBLE_NOCOWS(/Users/jgeerling/Downloads/blend-test/ansible.cfg) = True COLLECTIONS_PATHS(/Users/jgeerling/Downloads/blend-test/ansible.cfg) = ['/Users/jgeerling/Downloads/blend-test'] DEFAULT_ROLES_PATH(/Users/jgeerling/Downloads/blend-test/ansible.cfg) = ['/Users/jgeerling/Downloads/blend-test/roles'] ``` ##### OS / ENVIRONMENT - macOS Catalina and Ubuntu ##### STEPS TO REPRODUCE Create a new playbook project directory (e.g. 'example'). Inside the directory, create a `requirements.yml` file with the contents: ```yaml --- roles: # Install a role from Ansible Galaxy. - name: geerlingguy.java version: 1.9.7 collections: # Install a collection from Ansible Galaxy. - name: geerlingguy.php_roles version: 0.9.5 source: https://galaxy.ansible.com ``` Run: ansible-galaxy install -r requirements.yml ##### EXPECTED RESULTS All my project dependencies are installed as listed in the `requirements.yml` file. ##### ACTUAL RESULTS ``` $ ansible-galaxy install -r requirements.yml - downloading role 'java', owned by geerlingguy - downloading role from https://github.com/geerlingguy/ansible-role-java/archive/1.9.7.tar.gz - extracting geerlingguy.java to /Users/jgeerling/.ansible/roles/geerlingguy.java - geerlingguy.java (1.9.7) was installed successfully $ echo $? 0 ``` This command works, and results in only the defined _role_ to install. So after being confused as to why the _collection_ doesn't get installed, I read through the Collections documentation and find that, if I want collections installed, I have to run a separate command. To illustrate: ``` # This will only install roles (and give no warning that collections were detected but not installed). $ ansible-galaxy install -r requirements.yml # This results in the same behavior as above. $ ansible-galaxy role install -r requirements.yml # This will only install collections (and give no warning that roles were detected but not installed). $ ansible-galaxy collection install -r requirements.yml ``` Because most of my projects will either require roles or roles and collections in the `requirements.yml` file in the coming months/years (and will likely remain that way for the next few years as many roles on Galaxy that I depend on are not making the jump to Collections (especially simpler ones that are minimally maintained), this UX is kind of difficult to stomach, as now I'll need to make sure to have users do _two_ things every time they use or update one of my playbook projects (and CI will also need to run two commands). It would make more sense to me to have the following behavior: ``` # Installs everything in requirements.yml (collections and roles). $ ansible-galaxy install -r requirements.yml # Only installs roles in requirements.yml (displays warning that there are also collections present in the file, if there are any). $ ansible-galaxy role install -r requirements.yml # Only installs collections in requirements.yml (displays warning that there are also roles present in the file, if there are any). $ ansible-galaxy collection install -r requirements.yml ```
https://github.com/ansible/ansible/issues/65673
https://github.com/ansible/ansible/pull/67843
01e7915b0a9778a934a0f0e9e9d110dbef7e31ec
ecea15c508f0e081525be036cf76bbb56dbcdd9d
2019-12-09T19:48:23Z
python
2020-05-18T19:09:42Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,636
["lib/ansible/modules/net_tools/basics/get_url.py"]
[get_url] argument sha256sum declared deprecated without target version
### SUMMARY ``` sha256sum: description: - If a SHA-256 checksum is passed to this parameter, the digest of the destination file will be calculated after it is downloaded to ensure its integrity and verify that the transfer completed successfully. This option is deprecated. Use C(checksum) instead. ``` There is no `module.deprecate` either for `sha256sum`. the argument has been declared deprecated in commit b3b11fbce26 (2017) ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME get_url * ansible version: 2.10
https://github.com/ansible/ansible/issues/65636
https://github.com/ansible/ansible/pull/65637
fec883dfffcd8685d5d57a07463e402c2cd36931
4351a756e100da91a56fb7bc9bb83dc0c194f615
2019-12-08T14:16:31Z
python
2019-12-19T19:47:27Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,599
["lib/ansible/module_utils/redfish_utils.py", "lib/ansible/modules/remote_management/redfish/redfish_command.py"]
redfish_command - Manager - ClearSessions
<!--- 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 --> This feature would implement a ClearSessions command for the Sessions category of redfish_command, to clear all active sessions. ##### ISSUE TYPE - Feature Idea ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> redfish_command.py redfish_utils.py ##### ADDITIONAL INFORMATION <!--- Describe how the feature would be used, why it is needed and what it would solve --> This command would help user to clear all active sessions. <!--- 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/65599
https://github.com/ansible/ansible/pull/65600
f21ee7f685e8f58e58de2400b134ba5c7a2536b1
435bd91d2e406a227b20ce5f42c858253e0a97c3
2019-12-06T08:43:45Z
python
2020-02-15T13:00:55Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,598
["docs/docsite/rst/network/user_guide/index.rst", "docs/docsite/rst/network/user_guide/network_resource_modules.rst"]
Document Network Resource Module States
<!--- 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 - We need a consolidated document that describes how the newly introduced `states` in the Network Resource Modules work. - Since the behaviour of these states is consistent across all resource modules for all the supported platforms, we can have one single document and add a link to this document in all the individual RMs. - States that need to be documented: (a) merged (b) replaced (c) overridden (d) deleted (e) gathered (f) rendered (g) parsed - We also need to document the consequences of running `{{ network_os }}_l3_interfaces` with state `overridden` on management interfaces of the devices. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME lib/modules/network/ios/* lib/modules/network/iosxr/* lib/modules/network/nxos/* lib/modules/network/vyos/* lib/modules/network/eos/* lib/modules/network/junos/* ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below devel ```
https://github.com/ansible/ansible/issues/65598
https://github.com/ansible/ansible/pull/66226
ce66743b10af52634664d5a10bd83dad2573cd46
2ad6055efd732a7e31e539033352d2eb9d1f2cf8
2019-12-06T08:18:45Z
python
2020-01-10T20:12:26Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,590
["docs/docsite/rst/user_guide/windows_winrm.rst"]
Add pywinrm version detail on message encryption over HTTP
<!--- 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 We did not mention about the pywinrm version regarding message encryption over HTTP In the following document. https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/user_guide/windows_winrm.rst#winrm-encryption So I suggest explaining that HTTP encryption needs pywinrm 0.3.0 or higher version. https://github.com/diyan/pywinrm/blob/master/CHANGELOG.md#version-030 ##### ISSUE TYPE - Documentation Report
https://github.com/ansible/ansible/issues/65590
https://github.com/ansible/ansible/pull/65591
eab385e0061072f13e8ee1a5e2c90c7d292d8dbd
3bcb664497615bf2fca3e7f15187eebc8fd7abb6
2019-12-06T03:46:59Z
python
2020-01-15T22:22:38Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,556
["changelogs/fragments/win_get_url-redirection.yaml", "lib/ansible/module_utils/powershell/Ansible.ModuleUtils.WebRequest.psm1", "test/integration/targets/win_get_url/tasks/tests_url.yml", "test/integration/targets/win_uri/tasks/main.yml"]
win_get_url doesn't follow redirects
<!--- 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 --> When using win_get_url on Ansible 2.9.x to download files, it stops on the first 301 redirect and creates a 372 bytes file containing the HTTP response of the web server instead of the file that sits behind the redirect. This happens on any Windows version that I tested: 2012 R2, 2016, 2019 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> win_get_url ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.1 config file = /Users/[REDACTED]/ansible.cfg configured module search path = ['/Users/[REDACTED]/library', '/Users/[REDACTED]/ara/plugins/modules'] ansible python module location = /Users/[REDACTED]/lib/python3.7/site-packages/ansible executable location = /Users/[REDACTED]/bin/ansible python version = 3.7.5 (default, Nov 1 2019, 02:16:32) [Clang 11.0.0 (clang-1100.0.33.8)] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below ANSIBLE_NOCOWS(/Users/[REDACTED]/ansible.cfg) = True ANSIBLE_PIPELINING(/Users/[REDACTED]/ansible.cfg) = True ANSIBLE_SSH_ARGS(/Users/[REDACTED]/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=600s -o StrictHostKeyChecking=no ANSIBLE_SSH_RETRIES(/Users/[REDACTED]/ansible.cfg) = 3 CACHE_PLUGIN(/Users/[REDACTED]/ansible.cfg) = jsonfile CACHE_PLUGIN_CONNECTION(/Users/[REDACTED]/ansible.cfg) = ~/.ansible/facts.cachedir CACHE_PLUGIN_TIMEOUT(/Users/[REDACTED]/ansible.cfg) = 300 DEFAULT_ACTION_PLUGIN_PATH(/Users/[REDACTED]/ansible.cfg) = ['/Users/[REDACTED]/ara/plugins/actions'] DEFAULT_CALLBACK_PLUGIN_PATH(/Users/[REDACTED]/ansible.cfg) = ['/Users/[REDACTED]/ara/plugins/callbacks'] DEFAULT_CALLBACK_WHITELIST(/Users/[REDACTED]/ansible.cfg) = ['profile_roles', 'profile_tasks', 'timer', 'junit'] DEFAULT_FORKS(/Users/[REDACTED]/ansible.cfg) = 100 DEFAULT_GATHERING(/Users/[REDACTED]/ansible.cfg) = smart DEFAULT_HOST_LIST(/Users/[REDACTED]/ansible.cfg) = ['/Users/[REDACTED]/inventory.sh'] DEFAULT_LOG_PATH(/Users/[REDACTED]/ansible.cfg) = /Users/res/.ansible/SLAnsible.log DEFAULT_LOOKUP_PLUGIN_PATH(/Users/[REDACTED]/ansible.cfg) = ['/Users/[REDACTED]/plugins/lookup'] DEFAULT_MODULE_PATH(/Users/[REDACTED]/ansible.cfg) = ['/Users/[REDACTED]/library', '/Users/[REDACTED]/ara/plugins/modules'] DEFAULT_REMOTE_USER(/Users/[REDACTED]/ansible.cfg) = stylelabs DEFAULT_ROLES_PATH(/Users/[REDACTED]/ansible.cfg) = ['/Users/[REDACTED]/roles_galaxy', '/Users/[REDACTED]/roles_mansible'] DEFAULT_STDOUT_CALLBACK(/Users/[REDACTED]/ansible.cfg) = yaml DEFAULT_TIMEOUT(/Users/[REDACTED]/ansible.cfg) = 20 HOST_KEY_CHECKING(/Users/[REDACTED]/ansible.cfg) = False RETRY_FILES_ENABLED(/Users/[REDACTED]/ansible.cfg) = False TRANSFORM_INVALID_GROUP_CHARS(/Users/[REDACTED]/ansible.cfg) = ignore ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Target OS: Windows 2012 R2, Windows 2016, Windows 2019 ##### 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 vars: zabbix_win_download_link: "https://www.zabbix.com/downloads/4.0.0/zabbix_agents-4.0.0-win-amd64-openssl.zip" zabbix_win_install_dir: "c:\\windows\\temp" zabbix_win_package: "zabbix.zip" tasks: - name: "Windows | Download Zabbix Agent Zip file" win_get_url: url: "{{ zabbix_win_download_link }}" dest: '{{ zabbix_win_install_dir }}\{{ zabbix_win_package }}' force: False follow_redirects: safe ``` <!--- 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'm expecting the file behind the redirect to be downloaded locally, not the Redirect HTTP response. This was working in Ansible 2.8 and 2.7. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below TASK [Windows | Download Zabbix Agent Zip file] ******************************************************************************************************************************************************************************************************* task path: /Users/[REDACTED]/win-get-url.yml:9 Thursday 05 December 2019 13:23:19 +0100 (0:00:04.039) 0:00:04.201 ***** Thursday 05 December 2019 13:23:19 +0100 (0:00:04.039) 0:00:04.199 ***** Using module file /Users/[REDACTED]/lib/python3.7/site-packages/ansible/modules/windows/win_get_url.ps1 Pipelining is enabled. <[REDACTED]> ESTABLISH WINRM CONNECTION FOR USER: stylelabs on PORT 5986 TO [REDACTED] EXEC (via pipeline wrapper) changed: [[REDACTED]] => changed=true checksum_dest: 5ab849c3b74d71be4d7d520de6c374e64fa6553c checksum_src: 5ab849c3b74d71be4d7d520de6c374e64fa6553c dest: c:\windows\temp\zabbix.zip elapsed: 0.325719 invocation: module_args: checksum: null checksum_algorithm: sha1 checksum_url: null client_cert: null client_cert_password: null dest: c:\windows\temp\zabbix.zip follow_redirects: safe force: false force_basic_auth: false headers: null http_agent: ansible-httpget maximum_redirection: 50 method: null proxy_password: null proxy_url: null proxy_use_default_credential: false proxy_username: null timeout: 30 url: https://www.zabbix.com/downloads/4.0.0/zabbix_agents-4.0.0-win-amd64-openssl.zip url_password: null url_username: null use_default_credential: false use_proxy: true validate_certs: true msg: Moved Permanently size: 372 status_code: 301 url: https://www.zabbix.com/downloads/4.0.0/zabbix_agents-4.0.0-win-amd64-openssl.zip META: ran handlers META: ran handlers ``` File content ``` <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="https://assets.zabbix.com/downloads/4.0.0/zabbix_agents-4.0.0-win-amd64-openssl.zip">here</a>.</p> <hr> <address>Apache/2.4.10 (Debian) Server at www.zabbix.com Port 443</address> </body></html> ``` The following, should be enough (it's even the default as per the documentation), but it's not: ```yaml follow_redirects: safe ```
https://github.com/ansible/ansible/issues/65556
https://github.com/ansible/ansible/pull/65584
eaba5572cd1f206ae850c6730d50f32c58cc3131
9a81f5c3b7a723cc878a404dcf20037ea11bfeb7
2019-12-05T12:26:12Z
python
2019-12-06T01:47:35Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,550
["lib/ansible/modules/cloud/ovirt/ovirt_network.py"]
ovirt_network fails creating network when external_provider is set.
overit_network fails when trying to create a network that uses an external provider. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME module ovirt_network ##### ANSIBLE VERSION ``` ansible 2.9.1 config file = /Users/krist/Work/INFRA/Bern/PlopslandRHEV/ansible.cfg configured module search path = ['/Users/krist/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.5 (default, Nov 1 2019, 02:16:23) [Clang 11.0.0 (clang-1100.0.33.8)]##### CONFIGURATION ``` ##### OS / ENVIRONMENT MacOSX 10.15 ##### STEPS TO REPRODUCE Consider the following playbook: ``` - name: prepare the RHEV cluster hosts: localhost tasks: - block: - name: Obtain SSO Token ovirt_auth: url: "{{ ovirt_api }}" username: admin@internal ca_file: files/ca.pem password: "{{ ovirt_password }}" - name: Create private networks ovirt_network: auth: "{{ ovirt_auth }}" data_center: Default name: boot vm_network: true external_provider: ovirt-provider-ovn state: present always: - name: Always revoke the SSO token ovirt_auth: state: absent ovirt_auth: "{{ ovirt_auth }}" ``` ##### EXPECTED RESULTS A network "boot" is created, using the external provider ovirt-provider-ovn ##### ACTUAL RESULTS An error is thrown: ``` TASK [Create private networks] ********************************************************************************************************* An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Exception: Entity 'boot' was not found. fatal: [localhost]: FAILED! => {"changed": false, "msg": "Entity 'boot' was not found."} ``` Looking at hte source it appears then when you define a external provider that was is in fact attempted is to import a network form that external provider, not crearte one: ``` if module.params.get('external_provider'): ret = networks_module.import_external_network() else: ret = networks_module.create(search_params=search_params) ``` That is not what you would expect, not according to the docs anyway.
https://github.com/ansible/ansible/issues/65550
https://github.com/ansible/ansible/pull/65701
9f6c210eac83b1f40e5a8a3d352e51e5d4bd8066
6a880b78a2305ea71f211b741f16873b41538c1f
2019-12-05T09:59:19Z
python
2019-12-19T07:52:35Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,505
["changelogs/fragments/dict2items.yml", "docs/docsite/rst/user_guide/playbooks_loops.rst"]
Wrong example in loop over dict
##### SUMMARY It seems that the example given for Iterating over a dictionary in https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#iterating-over-a-dictionary is wrong. "tags" cannot be used as variable name. ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME dict2items filter? ##### ANSIBLE VERSION ``` ansible 2.9.1 config file = None configured module search path = ['/Users/lochou/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.5 (default, Nov 1 2019, 02:16:23) [Clang 11.0.0 (clang-1100.0.33.8)] ``` ##### CONFIGURATION ``` [empty] ``` ##### OS / ENVIRONMENT macOS 10.15.1 ##### ADDITIONAL INFORMATION With the example that is given: ``` - hosts: localhost connection: local tasks: - name: create a tag dictionary of non-empty tags set_fact: tags_dict: "{{ (tags_dict|default({}))|combine({item.key: item.value}) }}" loop: "{{ tags |dict2items }}" vars: tags: Environment: dev Application: payment Another: "{{ doesnotexist|default() }}" when: item.value != "" - debug: var: tags_dict ``` I just get the following error: ``` TASK [create a tag dictionary of non-empty tags] *************************************************************************************************************** fatal: [localhost]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."} ``` But everything runs fine when replacing "tags" by any other variable name such as foo. (Tested also with Ansible 2.8.7.)
https://github.com/ansible/ansible/issues/65505
https://github.com/ansible/ansible/pull/66235
f8654de851a841d33d2d2e76942c68a758535e56
469f104ec27e99ea26d42685ba027fe03571fac9
2019-12-04T12:17:58Z
python
2020-01-07T15:32:46Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,490
["docs/docsite/_static/ansible.css"]
Documentation: heading styles look too similar
##### SUMMARY The different heading styles are hard to distinguish visually, especially h3 and h4. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME documentation ##### ANSIBLE VERSION ```paste below 2.9 ```
https://github.com/ansible/ansible/issues/65490
https://github.com/ansible/ansible/pull/66253
2ad6055efd732a7e31e539033352d2eb9d1f2cf8
ffc1f33f2ade86597ad62696efc2c130d2aa24c0
2019-12-04T06:06:04Z
python
2020-01-10T20:13:48Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,471
["changelogs/fragments/remove-2.9-deprecations.yml", "lib/ansible/module_utils/azure_rm_common.py", "lib/ansible/module_utils/basic.py", "lib/ansible/module_utils/utm_utils.py", "test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py", "test/sanity/ignore.txt"]
lib/ansible/module_utils/basic.py contains deprecation which was supposed to be removed for 2.9
##### SUMMARY See https://github.com/ansible/ansible/blob/88d8cf8197c53edd3bcdcd21429eb4c2bfbf0f6a/lib/ansible/module_utils/basic.py#L699-L706 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/module_utils/basic.py ##### ANSIBLE VERSION ```paste below 2.9 devel ```
https://github.com/ansible/ansible/issues/65471
https://github.com/ansible/ansible/pull/65745
0b503f6057b5e60d84a3ee7fe11914eeacc05656
c58d8ed1f5f7f47f2a1d8069e04452353c052824
2019-12-03T18:53:41Z
python
2020-01-21T21:58:26Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,450
["changelogs/fragments/70465-assemble-fix-decrypt-argument.yaml", "lib/ansible/plugins/action/assemble.py", "test/integration/targets/assemble/tasks/main.yml"]
`assemble` documentation is wrong/outdated about `decrypt` parameters
<!--- 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 would like to assemble files into one with `assemble` module. Documentation said it can decrypt files. After a few tests with `Ansible 2.9` I discover that parameter not implemented. That argument should be available since `Ansible 2.4`. Which is wrong, documentation or the module? ##### ISSUE TYPE - Bug Report - Documentation ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure --> `assemble`, core module. ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.0 config file = None configured module search path = ['/home/antonin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /bin/ansible python version = 3.6.9 (default, Nov 26 2019, 16:36:51) [GCC 9.2.0] ``` ##### CONFIGURATION <!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes --> ```paste below n/a — Empty ``` ##### OS / ENVIRONMENT <!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. --> Local task on Voidlinux with `linux 5.3.14_1`. ##### 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: Tinker certificate delegate_to: localhost assemble: decrypt: true src: 'certificates/' dest: 'generated/foo.pem' ``` With encrypted files in `certificates/` directory. <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> A file should be created from other files assemble, like `cat file1 file2 file3 > new_file` but uncrypted. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes --> ```paste below "msg": "Unsupported parameters for (assemble) module: decrypt Supported parameters include: attributes, backup, content, delimiter, dest, directory_mode, follow, force, group, ignore_hidden, mode, owner, regexp, remote_src, selevel, serole, setype, seuser, src, unsafe_writes, validate" ```
https://github.com/ansible/ansible/issues/65450
https://github.com/ansible/ansible/pull/70465
28fda23284e0cc8be5b43a9ac870cb678cfa1f08
71c378e139681f09e1c7727e11c5c4d5c7bcba8d
2019-12-03T09:33:47Z
python
2020-07-09T19:24:12Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,448
["changelogs/fragments/73700-let-file-module-not-change-link-to-absolute-on-touch.yml", "lib/ansible/modules/file.py", "test/integration/targets/file/tasks/link_rewrite.yml", "test/integration/targets/file/tasks/state_link.yml"]
The module `file` changes the relative `path` of a symlink to absolute
### SUMMARY The `file` module changes the `path` of a relative symlink to absolute path. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME file ##### ANSIBLE VERSION ``` ansible 2.9.1 config file = /Users/robertguy/.ansible.cfg configured module search path = [u'/Users/robertguy/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Library/Python/2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.10 (default, Feb 22 2019, 21:55:15) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] ``` ##### CONFIGURATION ``` # (empty) ``` ##### OS / ENVIRONMENT controller: mac target: centos:8 ##### STEPS TO REPRODUCE Prepare a container: ``` # Start a container: docker run -ti centos:8 /bin/bash # Verify /sbin: ls -ld /sbin lrwxrwxrwx 1 root root 8 May 11 2019 /sbin -> usr/sbin ``` Run ansible on the container: ``` ansible -i $(docker ps -ql), -c docker all -m file -a "path=/sbin mode=o-w" -vvv ... "changed": true, "dest": "/sbin", "diff": { "after": { "path": "/sbin", "src": "/usr/sbin" }, "before": { "path": "/sbin", "src": "usr/sbin" } }, ... # Verify /sbin again: ls -ld /sbin lrwxrwxrwx 1 root root 9 Dec 3 08:13 /sbin -> /usr/sbin ``` ##### EXPECTED RESULTS I was hoping that `file` would follow the symlink '/sbin' and change the target only. In the example above you can see that the link itself is modified. ##### ACTUAL RESULTS ``` ansible -i $(docker ps -ql), -c docker all -m file -a "path=/sbin mode=o-w follow=yes" -vvv ansible 2.9.1 config file = /Users/robertguy/.ansible.cfg configured module search path = [u'/Users/robertguy/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Library/Python/2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.10 (default, Feb 22 2019, 21:55:15) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] Using /Users/robertguy/.ansible.cfg as config file Parsed de83dc6fa5ee, inventory source with host_list plugin META: ran handlers <de83dc6fa5ee> ESTABLISH DOCKER CONNECTION FOR USER: root <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u"/bin/sh -c 'echo ~ && sleep 0'"] <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u'/bin/sh -c \'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252 `" && echo ansible-tmp-1575362596.14-246033153918252="` echo /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252 `" ) && sleep 0\''] <de83dc6fa5ee> Attempting python interpreter discovery <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u'/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\''] <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u"/bin/sh -c '/usr/libexec/platform-python && sleep 0'"] Using module file /Library/Python/2.7/site-packages/ansible/modules/files/file.py <de83dc6fa5ee> PUT /Users/robertguy/.ansible/tmp/ansible-local-18934l8TrvG/tmp_uA5WD TO /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252/AnsiballZ_file.py <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u"/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252/ /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252/AnsiballZ_file.py && sleep 0'"] <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u"/bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252/AnsiballZ_file.py && sleep 0'"] <de83dc6fa5ee> EXEC ['/usr/local/bin/docker', 'exec', '-i', u'de83dc6fa5ee', u'/bin/sh', '-c', u"/bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1575362596.14-246033153918252/ > /dev/null 2>&1 && sleep 0'"] de83dc6fa5ee | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": true, "dest": "/sbin", "diff": { "after": { "path": "/sbin", "src": "/usr/sbin" }, "before": { "path": "/sbin", "src": "usr/sbin" } }, "gid": 0, "group": "root", "invocation": { "module_args": { "_diff_peek": null, "_original_basename": null, "access_time": null, "access_time_format": "%Y%m%d%H%M.%S", "attributes": null, "backup": null, "content": null, "delimiter": null, "directory_mode": null, "follow": true, "force": false, "group": null, "mode": "o-w", "modification_time": null, "modification_time_format": "%Y%m%d%H%M.%S", "owner": null, "path": "/sbin", "recurse": false, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "link", "unsafe_writes": null } }, "mode": "0777", "owner": "root", "size": 9, "src": "/usr/sbin", "state": "link", "uid": 0 } META: ran handlers META: ran handlers ```
https://github.com/ansible/ansible/issues/65448
https://github.com/ansible/ansible/pull/73700
176beddb3f8d4c4774da1286c712936a0e859e10
e804fccf1c3fc94f35fac42ec8980eea0b431aa6
2019-12-03T08:46:59Z
python
2021-03-01T14:14:03Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,418
["docs/docsite/rst/dev_guide/testing_units_modules.rst"]
unit test documentation contains incorrect import references
##### SUMMARY After this MR https://github.com/ansible/ansible/pull/46996 ansible unittests where moved out of the ansible scope. The documentation page for `Unit Testing Ansible Modules` https://docs.ansible.com/ansible/latest/dev_guide/testing_units_modules.html#how-to-unit-test-ansible-modules is not updated accordingly and I'm trying to find a package in pypi which contains these ansible unittesting libs that were removed from the main ansible package. So as the documentation seems to be outdated after the new unittesting tools structure was implemented and how do I test my module? ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME https://docs.ansible.com/ansible/latest/dev_guide/testing_units_modules.html#how-to-unit-test-ansible-modules ##### ANSIBLE VERSION ansible 2.9.1
https://github.com/ansible/ansible/issues/65418
https://github.com/ansible/ansible/pull/65775
6f76a48f59e4d1936f3f3bd1711b3999e1f3869b
40fb46f1e80df19b4843340d9d0983bcf1bd74b5
2019-12-02T10:49:52Z
python
2019-12-16T17:07:26Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,367
["changelogs/fragments/66331-postgresql_query_fix_unable_to_handle_non_ascii_chars_when_python3.yml", "lib/ansible/modules/database/postgresql/postgresql_query.py", "test/integration/targets/postgresql_query/tasks/postgresql_query_initial.yml"]
postgresql_query doesn't support non-ASCII characters in SQL files with Python3
<!--- 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 --> ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Write the short name of the module, plugin, task or feature below, use your best guess if postgresql_user ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes --> ```paste below ansible 2.9.1 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/roman/.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.5 (default, Oct 17 2019, 12:16:48) [GCC 9.2.1 20190827 (Red Hat 9.2.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. --> Local: ``` NAME=Fedora VERSION="31 (Workstation Edition)" ``` Remote: ``` NAME="Red Hat Enterprise Linux" VERSION="8.1 (Ootpa)" ``` All managed hosts are RHEL 8 (Python3 only): hosts.yml: ``` all: vars: ansible_python_interpreter: /usr/libexec/platform-python ``` ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> main.yml: ```yaml - name: "Copy files with scheme" copy: src: "scheme.sql" dest: "/tmp/scheme.sql" mode: '0600' - name: "Create scheme" postgresql_query: login_user: "{{ postgresql_user }}" login_password: "{{ postgresql_password }}" login_host: "{{ postgresql_host }}" db: "{{ postgresql_database }}" path_to_script: "/tmp/scheme.sql" ``` scheme.sql: ``` INSERT INTO test(id, name) VALUES(1, 'Данные'); -- use non-ASCII ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- Describe what you expected to happen when running the steps above --> scheme.sql applied. ##### ACTUAL RESULTS <!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> ```paste below "msg": "Cannot read file '/tmp/scheme.sql' : 'ascii ' codec can't decode byte 0xd0 in position 4342: ordinal not in range(128)"} ```
https://github.com/ansible/ansible/issues/65367
https://github.com/ansible/ansible/pull/66331
f8fb391548144ba84d28afac5f3701b40f2ab283
515c4a7e2c50319112a3257fb1f0db74683a8853
2019-11-29T14:56:52Z
python
2020-01-11T14:19:55Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,366
["changelogs/fragments/66786-fix-duplicate-yaml-key-error.yaml", "lib/ansible/parsing/yaml/constructor.py"]
ANSIBLE_DUPLICATE_YAML_DICT_KEY=error crashes with a bug report
##### SUMMARY This is a follow-up to #16903. Setting the new env var `ANSIBLE_DUPLICATE_YAML_DICT_KEY` implemented in #56933 to `error` outputs a cryptic `ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'line'` instead of the message defined [here](https://github.com/ansible/ansible/blob/d335d7a62c022d702a29a0ff55cd0c526ec2c5ad/lib/ansible/parsing/yaml/constructor.py#L74). I think this will confuse people, since it's not obvious what causes the problem in a larger project. (cc @bcoca) Setting `ANSIBLE_DUPLICATE_YAML_DICT_KEY=ignore` or `ANSIBLE_DUPLICATE_YAML_DICT_KEY=warn` works as expected. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME YAML parsing? ##### ANSIBLE VERSION ``` ansible 2.9.1 config file = None configured module search path = ['/Users/mtodor/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.5 (default, Nov 1 2019, 02:16:32) [Clang 11.0.0 (clang-1100.0.33.8)] ``` ##### CONFIGURATION ``` N/A ``` ##### OS / ENVIRONMENT ``` OSX / Mojave ``` ##### STEPS TO REPRODUCE `vars.yaml`: ```yaml --- x-default: &default-customer ID: foo Customers: - <<: *default-customer ID: bar ``` `playbook.yaml`: ```yaml --- - hosts: localhost gather_facts: no vars_files: - vars.yml tasks: - meta: end_play ``` ##### EXPECTED RESULTS Setting `ANSIBLE_DUPLICATE_YAML_DICT_KEY=error` should output something like `ERROR! Syntax Error while loading YAML.` ##### ACTUAL RESULTS A cryptic error about an Ansible bug gets emitted: ``` > ANSIBLE_DUPLICATE_YAML_DICT_KEY=error AWS_PROFILE=build ansible-playbook -i local, playbook.yml ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'line' to see the full traceback, use -vvv ``` Verbose output: ``` > ANSIBLE_DUPLICATE_YAML_DICT_KEY=error AWS_PROFILE=build ansible-playbook -vvv -i local, playbook.yml ansible-playbook 2.9.1 config file = None configured module search path = ['/Users/mtodor/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible-playbook python version = 3.7.5 (default, Nov 1 2019, 02:16:32) [Clang 11.0.0 (clang-1100.0.33.8)] No config file found; using defaults Parsed local, inventory source with host_list plugin PLAYBOOK: playbook.yml ***************************************************************************************************************************************************************************************************************************************************** 1 plays in playbook.yml ERROR! Unexpected Exception, this is probably a bug: 'NoneType' object has no attribute 'line' the full traceback was: Traceback (most recent call last): File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/utils/yaml.py", line 70, in from_yaml new_data = json.loads(data, cls=AnsibleJSONDecoder) File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 361, in loads return cls(**kw).decode(s) File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/utils/yaml.py", line 74, in from_yaml new_data = _safe_load(data, file_name=file_name, vault_secrets=vault_secrets) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/utils/yaml.py", line 49, in _safe_load return loader.get_single_data() File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/yaml/constructor.py", line 43, in get_single_data return self.construct_document(node) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/yaml/constructor.py", line 52, in construct_document for dummy in generator: File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/yaml/constructor.py", line 47, in construct_yaml_map value = self.construct_mapping(node) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/yaml/constructor.py", line 79, in construct_mapping raise ConstructorError(to_native(msg)) yaml.constructor.ConstructorError: While constructing a mapping from /Users/mtodor/vars.yml, line 7, column 5, found a duplicate dict key (ID). Using last defined value only. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/ansible-playbook", line 123, in <module> exit_code = cli.run() File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/cli/playbook.py", line 127, in run results = pbex.run() File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/executor/playbook_executor.py", line 116, in run all_vars = self._variable_manager.get_vars(play=play) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/vars/manager.py", line 349, in get_vars data = preprocess_vars(self._loader.load_from_file(vars_file, unsafe=True)) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/dataloader.py", line 89, in load_from_file parsed_data = self.load(data=file_data, file_name=file_name, show_content=show_content) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/dataloader.py", line 72, in load return from_yaml(data, file_name, show_content, self._vault.secrets) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/utils/yaml.py", line 76, in from_yaml _handle_error(yaml_exc, file_name, show_content) File "/usr/local/Cellar/ansible/2.9.1/libexec/lib/python3.7/site-packages/ansible/parsing/utils/yaml.py", line 37, in _handle_error err_obj.ansible_pos = (file_name, yaml_exc.problem_mark.line + 1, yaml_exc.problem_mark.column + 1) AttributeError: 'NoneType' object has no attribute 'line' ```
https://github.com/ansible/ansible/issues/65366
https://github.com/ansible/ansible/pull/66786
3b32f95fb39a0faf810bf3aa6024d704d99c7156
994a6b0c5a7929051e5e2101004ef536ec47c0b3
2019-11-29T14:42:57Z
python
2020-02-04T18:53:13Z
closed
ansible/ansible
https://github.com/ansible/ansible
65,365
["changelogs/fragments/65365-fix-tb-printing-hostvars.yml", "lib/ansible/vars/hostvars.py", "lib/ansible/vars/manager.py", "test/integration/targets/jinja2_native_types/inventory.jinja2_native_types", "test/integration/targets/jinja2_native_types/runme.sh", "test/integration/targets/jinja2_native_types/test_hostvars.yml"]
Traceback with "debug var=vars" when jinja2_native is true
<!--- 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 Traceback with `debug var=vars` when `ANSIBLE_JINJA2_NATIVE` is `true` ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME lib/ansible/vars/manager.py ##### ANSIBLE VERSION ``` ansible 2.9.1 config file = None configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/vagrant/venv-main/lib/python3.7/site-packages/ansible executable location = /home/vagrant/venv-main/bin/ansible python version = 3.7.3 (default, Apr 3 2019, 19:16:38) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] ``` ##### CONFIGURATION No config changes. ``` $ ansible-config dump --only-changed $ ``` ##### OS / ENVIRONMENT Ubuntu 18.04.2 LTS - running playbook on localhost ##### STEPS TO REPRODUCE Command: ``` ANSIBLE_JINJA2_NATIVE=true ansible-playbook -i localhost, -c local bug-playbook.yml -vvv ```` Playbook `bug-playbook.yml`: ```yaml - hosts: all gather_facts: no tasks: - name: show vars debug: var=vars - name: show hostvars debug: var=hostvars ``` ##### EXPECTED RESULTS `debug` task shows vars output normally like this: ``` TASK [show vars] *************************************************************************************************************************************************************************************************************************** task path: /home/vagrant/devel/IT_Cloud/Projects/iac/tryout/bug-vars/bug-playbook.yml:5 ok: [localhost] => { "vars": { "ansible_check_mode": false, ... ``` ##### ACTUAL RESULTS Traceback from `debug var` on `vars` and `hostvars`: ``` $ ANSIBLE_JINJA2_NATIVE=true ansible-playbook -i localhost, -c local bug-playbook.yml -vvvv ansible-playbook 2.9.1 config file = None configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/vagrant/venv-main/lib/python3.7/site-packages/ansible executable location = /home/vagrant/venv-main/bin/ansible-playbook python version = 3.7.3 (default, Apr 3 2019, 19:16:38) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] No config file found; using defaults setting up inventory plugins Set default localhost to localhost Parsed localhost, inventory source with host_list plugin Loading callback plugin default of type stdout, v2.0 from /home/vagrant/venv-main/lib/python3.7/site-packages/ansible/plugins/callback/default.py PLAYBOOK: bug-playbook.yml ***************************************************************************************************************************************************************************************************************** Positional arguments: bug-playbook.yml verbosity: 4 connection: local timeout: 10 become_method: sudo tags: ('all',) inventory: ('localhost,',) forks: 5 1 plays in bug-playbook.yml PLAY [all] ********************************************************************************************************************************************************************************************************************************* META: ran handlers TASK [show vars] *************************************************************************************************************************************************************************************************************************** task path: /home/vagrant/devel/IT_Cloud/Projects/iac/tryout/bug-vars/bug-playbook.yml:5 [WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (<ansible.plugins.callback.default.CallbackModule object at 0x7f88cf423cf8>): 'VariableManager' object has no attribute '_loader' Callback Exception: File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/executor/task_queue_manager.py", line 323, in send_callback method(*new_args, **kwargs) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/plugins/callback/default.py", line 156, in v2_runner_on_ok msg += " => %s" % (self._dump_results(result._result),) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/plugins/callback/__init__.py", line 126, in _dump_results jsonified_results = json.dumps(abridged_result, cls=AnsibleJSONEncoder, indent=indent, ensure_ascii=False, sort_keys=sort_keys) File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps **kw).encode(obj) File "/usr/lib/python3.7/json/encoder.py", line 201, in encode chunks = list(chunks) File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 438, in _iterencode o = _default(o) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/module_utils/common/json.py", line 53, in default value = dict(o) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/hostvars.py", line 83, in __getitem__ data = self.raw_get(host_name) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/hostvars.py", line 80, in raw_get return self._variable_manager.get_vars(host=host, include_hostvars=False) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/manager.py", line 178, in get_vars _hosts_all=_hosts_all, File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/manager.py", line 443, in _get_magic_variables variables['playbook_dir'] = os.path.abspath(self._loader.get_basedir()) TASK [show hostvars] *********************************************************************************************************************************************************************************************************************** task path: /home/vagrant/devel/IT_Cloud/Projects/iac/tryout/bug-vars/bug-playbook.yml:8 Callback Exception: File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/executor/task_queue_manager.py", line 323, in send_callback method(*new_args, **kwargs) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/plugins/callback/default.py", line 156, in v2_runner_on_ok msg += " => %s" % (self._dump_results(result._result),) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/plugins/callback/__init__.py", line 126, in _dump_results jsonified_results = json.dumps(abridged_result, cls=AnsibleJSONEncoder, indent=indent, ensure_ascii=False, sort_keys=sort_keys) File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps **kw).encode(obj) File "/usr/lib/python3.7/json/encoder.py", line 201, in encode chunks = list(chunks) File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/lib/python3.7/json/encoder.py", line 438, in _iterencode o = _default(o) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/module_utils/common/json.py", line 53, in default value = dict(o) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/hostvars.py", line 83, in __getitem__ data = self.raw_get(host_name) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/hostvars.py", line 80, in raw_get return self._variable_manager.get_vars(host=host, include_hostvars=False) File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/manager.py", line 178, in get_vars _hosts_all=_hosts_all, File "/home/vagrant/venv-main/lib/python3.7/site-packages/ansible/vars/manager.py", line 443, in _get_magic_variables variables['playbook_dir'] = os.path.abspath(self._loader.get_basedir()) META: ran handlers META: ran handlers PLAY RECAP ********************************************************************************************************************************************************************************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ``` Running without the jinja2_native=true option does not have this problem (Normal output omitted). ``` $ ANSIBLE_JINJA2_NATIVE=false ansible-playbook -i localhost, -c local bug-playbook.yml -vvv ``` Workarounds: - best option: set jinja2_native to false - if you don't need jinja2_native for some playbooks, downgrade jinja2 to 2.9.6 Have tested this with 2.10.0 to 2.10.3, which all show this issue. Related --- #64745 looks similar but isn't the same, as the repro is different, and PR from @mkrizek with fix is included in 2.9.1. - includes [this comment](https://github.com/ansible/ansible/issues/64745#issuecomment-553169757) with some related issues.
https://github.com/ansible/ansible/issues/65365
https://github.com/ansible/ansible/pull/65508
0c4f167b82e8c898dd8e6d5b00fcd76aa483d875
ec371eb2277891bd9c5b463059730f3012c8ad06
2019-11-29T13:59:00Z
python
2020-01-22T10:57:09Z