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 | 59,232 | ["changelogs/fragments/62621-docker_login-fix-60381.yaml", "lib/ansible/modules/cloud/docker/docker_login.py"] | Docker logout reports no change even though it did something | <!--- 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
`docker_login` reports no change even though it logged out.
##### 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_login`
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/raphael/.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.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.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. -->
Client: Ubuntu 18.04 LTS 4.18.0-24-generic, ansible 2.8.1
Server: RHE7 3.10.0-957.21.3.el7.x86_64
##### 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: Pull some Docker images
block:
- name: Log into Harbor (Docker registry)
docker_login:
registry: "{{docker_registry}}"
username: "{{harbor_user}}"
password: "{{harbor_password}}"
reauthorize: yes
- name: Pull Docker images
loop:
- "some_image"
- "other_image"
docker_image:
name: "{{ item }}"
state: present
source: pull
always:
- name: Docker logout
docker_login:
registry: "{{docker_registry}}"
state: absent
```
##### EXPECTED RESULTS
Task `Docker logout` should report changes.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
TASK [gears : Log into Harbor (Docker registry)]
<snip>
changed: [<snip>] => {
"changed": true,
"invocation": {
"module_args": {
"api_version": "auto",
"ca_cert": null,
"client_cert": null,
"client_key": null,
"config_path": "/home/<snip>/.docker/config.json",
"debug": false,
"docker_host": "unix://var/run/docker.sock",
"email": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"reauthorize": true,
"registry": "<snip>",
"registry_url": "<snip>,
"ssl_version": null,
"state": "present",
"timeout": 60,
"tls": false,
"tls_hostname": "localhost",
"username": "<snip>",
"validate_certs": false
}
},
"login_result": {
"IdentityToken": "",
"Status": "Login Succeeded"
}
}
<snip>
TASK [gears : Pull Docker images]
ok:
<snip>
TASK [gears : Docker logout]
<snip>
ok: [<snip>] => {
"changed": false,
"invocation": {
"module_args": {
"api_version": "auto",
"ca_cert": null,
"client_cert": null,
"client_key": null,
"config_path": "/home/<snip>/.docker/config.json",
"debug": false,
"docker_host": "unix://var/run/docker.sock",
"email": null,
"password": null,
"reauthorize": false,
"registry": "<snip>",
"registry_url": "<snip>",
"ssl_version": null,
"state": "absent",
"timeout": 60,
"tls": false,
"tls_hostname": "localhost",
"username": null,
"validate_certs": false
}
},
"login_result": {}
}
```
But, on that host:
```
$ cat .docker/config.json | grep auth
"auths": {}
```
When I remove the logout task, the login appears in that output. So logout _is_ effective. | https://github.com/ansible/ansible/issues/59232 | https://github.com/ansible/ansible/pull/62621 | a7b239708e961469b2c96451ec3c7df6e7b1a225 | 2e5137078d33db1b83f343edc0bf81fd4258f140 | 2019-07-18T09:00:50Z | python | 2019-09-21T13:13:31Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,228 | ["changelogs/fragments/ansible-galaxy-ignore.yaml", "docs/docsite/_static/ansible.css", "docs/docsite/rst/dev_guide/developing_collections.rst", "docs/templates/collections_galaxy_meta.rst.j2", "lib/ansible/cli/galaxy.py", "lib/ansible/galaxy/collection.py", "lib/ansible/galaxy/data/collections_galaxy_meta.yml", "test/units/galaxy/test_collection.py"] | ansible-galaxy collection build includes unrelated files into the result | <!--- 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 "source" folder of my collection contains several files that are not directly related to the collection itself. E.g. a `.gitignore`, a `.github` folder, a `Makefile` etc.
When using `ansible-galaxy collection build <folder>`, these files are included in the generated tarball. This is especially hurtful when the source folder also contains a Python venv that I use for developing.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
ansible-galaxy
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/egolov/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/egolov/Devel/ansible/ansible/lib/ansible
executable location = /home/egolov/Devel/ansible/ansible/bin/ansible
python version = 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
empty
```
##### OS / ENVIRONMENT
Fedora
##### STEPS TO REPRODUCE
Build a collection :)
##### EXPECTED RESULTS
I'd expect only collection-relevant files/folders (those that are listed in the spec/docs) to be included.
##### ADDITIONAL INFORMATION
Alternatively, a ignore file as suggested by @bcoca in https://github.com/ansible/ansible/pull/59121/files#r304554334 could be a fix for this.
| https://github.com/ansible/ansible/issues/59228 | https://github.com/ansible/ansible/pull/64688 | bf190606835d67998232140541bf848a51510c5c | f8f76628500052ad3521fbec16c073ae7f99d287 | 2019-07-18T07:57:44Z | python | 2019-11-13T19:02:58Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,206 | ["changelogs/fragments/ssh_quote_cp.yml", "lib/ansible/plugins/connection/ssh.py", "test/integration/targets/connection_ssh/runme.sh"] | Ansible generates a bad SSH commandline when there's a space in the 'control_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
When for any reason the .ansible/ directory is inside a path **with whitespaces**, the 'control_path' generated by default is wrong, and thus the SSH commandline.
The addition of quotes surrounding the 'control_path' inside 'ansible/plugins/connection/ssh.py' fixes the bug.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
Connection plugin
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.8.2
config file = /Users/pposca/proyectos/kipeos-devops/ansible.cfg
configured module search path = ['/Users/pposca/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/pposca/.virtualenvs/kipeos-devops/lib/python3.7/site-packages/ansible
executable location = /Users/pposca/.virtualenvs/kipeos-devops/bin/ansible
python version = 3.7.3 (default, Jul 7 2019, 18:15:21) [Clang 10.0.1 (clang-1001.0.46.4)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
DEFAULT_HOST_LIST(/Users/pposca/proyectos/kipeos-devops/ansible.cfg) = ['/Users/pposca/proyectos/kipeos-devops/hosts']
INTERPRETER_PYTHON(/Users/pposca/proyectos/kipeos-devops/ansible.cfg) = auto
```
##### OS / ENVIRONMENT
- MacOS 10.14.5
- Mackup (so .ansible/ is a symlink to a directory with whitespaces in its path)
- Python 3.7.3
##### STEPS TO REPRODUCE
Having .ansible inside a directory with whitespaces in its path:
```
ansible all -m ping
```
##### EXPECTED RESULTS
```
mydomain.com | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}
```
##### ACTUAL RESULTS
```
ansible 2.8.2
config file = /Users/pposca/proyectos/kipeos-devops/ansible.cfg
configured module search path = ['/Users/pposca/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/pposca/.virtualenvs/kipeos-devops/lib/python3.7/site-packages/ansible
executable location = /Users/pposca/.virtualenvs/kipeos-devops/bin/ansible
python version = 3.7.3 (default, Jul 7 2019, 18:15:21) [Clang 10.0.1 (clang-1001.0.46.4)]
Using /Users/pposca/proyectos/kipeos-devops/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /Users/pposca/proyectos/kipeos-devops/hosts as it did not pass it's verify_file() method
script declined parsing /Users/pposca/proyectos/kipeos-devops/hosts as it did not pass it's verify_file() method
auto declined parsing /Users/pposca/proyectos/kipeos-devops/hosts as it did not pass it's verify_file() method
Parsed /Users/pposca/proyectos/kipeos-devops/hosts inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /Users/pposca/.virtualenvs/kipeos-devops/lib/python3.7/site-packages/ansible/plugins/callback/minimal.py
META: ran handlers
<mydomain.com> ESTABLISH SSH CONNECTION FOR USER: None
<mydomain.com> 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 ConnectTimeout=10 -o 'ControlPath=/Volumes/Apple HDD/VDrive/Dropbox/Mackup/.ansible/cp/fc95ded756' mydomain.com '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<mydomain.com> (255, b'', b'command-line line 0: garbage at end of line; "HDD/VDrive/Dropbox/Mackup/.ansible/cp/fc95ded756".\r\n')
mydomain.com | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: command-line line 0: garbage at end of line; \"HDD/VDrive/Dropbox/Mackup/.ansible/cp/fc95ded756\".",
"unreachable": true
}
```
##### VALUE OF THE VARIABLE 'b_args'
Note the whitespace after 'Apple':
```
(b'-o', b'ControlPath=/Volumes/Apple HDD/VDrive/Dropbox/Mackup/.ansible/cp/fc95ded756')
```
##### RELATED ISSUES
#7713 #31916
| https://github.com/ansible/ansible/issues/59206 | https://github.com/ansible/ansible/pull/76424 | 0ef5274a3c6189e8fa6a7d97993c165ab548fe95 | aa022dba2d141cbd3b862767400ba4f714a9edd1 | 2019-07-17T22:03:30Z | python | 2022-01-10T17:29:35Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,202 | ["lib/ansible/cli/galaxy.py", "test/units/cli/test_galaxy.py"] | ansible-galaxy -vvv broken unless passed only after subcommand | <!--- 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 `-v` verbosity flags apply to the `ansible-galaxy` command as a whole, but on `devel` only work if passed after a subcommand like `import`, `role import`, or the new `collection` commands..
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
ansible-galaxy
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/calvin/projects/ansible/lib/ansible
executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible
python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
(empty)
```
##### 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 -->
- Try to run an import with `-vvv` flags passed as the first parameter
<!--- Paste example playbooks or commands between quotes below -->
```
ansible-galaxy -vvv import --server=http://localhost:8000 orionuser1 ansible-log-stash
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
In previous versions of ansible, and in most CLI tools, global flags can be passed to the top-level command. `-v` flags work passed in any position in previous versions.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
The `-v` or `-vvv` is ignored silently if it comes before the subcommand in the invocation. See broken and working examples below:
<!--- Paste verbatim command output between quotes -->
```
(orion) [calvin@localhost ansible]$ ansible-galaxy -vvv --server=http://localhost:8000 import orionuser1 ansible-log-stash
ERROR! Unexpected Exception, this is probably a bug: 'args'
to see the full traceback, use -vvv
(orion) [calvin@localhost ansible]$ ansible-galaxy --server=http://localhost:8000 import -vvv orionuser1 ansible-log-stash
ansible-galaxy 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/calvin/projects/ansible/lib/ansible
executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible-galaxy
python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
Using /etc/ansible/ansible.cfg as config file
Opened /home/calvin/.ansible_galaxy
```
| https://github.com/ansible/ansible/issues/59202 | https://github.com/ansible/ansible/pull/60604 | 25b20adb942c5d0823fe8a24b5d621d260b1f66e | 4ebac7d5b76e352d838d4a4ca6987229a47b2171 | 2019-07-17T21:04:01Z | python | 2019-08-15T01:53:40Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,199 | ["lib/ansible/module_utils/service_now.py", "lib/ansible/modules/notification/snow_record.py", "lib/ansible/modules/notification/snow_record_find.py"] | Call Refactored login from snow modules | ##### SUMMARY
snow modules do not call refactored login function. Login must be called to initialize connection.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
snow_record.py
snow_record_find.py
##### ANSIBLE VERSION
```
ansible 2.9
config file = /home/pknight/dci/ansible/servicenow/ansible.cfg
configured module search path = [u'/home/pknight/.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.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
```
##### CONFIGURATION
```
DEFAULT_VAULT_PASSWORD_FILE(/home/pknight/dci/ansible/servicenow/ansible.cfg) = /home/pknight/.ansiblevault
YAML_FILENAME_EXTENSIONS(/home/pknight/dci/ansible/servicenow/ansible.cfg) = [u'.json', u'.yaml', u'.yml', u'.vault']
```
##### OS / ENVIRONMENT
Linux
##### STEPS TO REPRODUCE
ansible-playbook -i sandbox Test-Run.yml -vvvvv
sandbox/regions:
[sandbox]
yourinstance.service-now.com
Test-Run.yml:
```yaml
yaml
- name: Test Run
hosts: all
connection: local
gather_facts: no
ignore_errors: True
tasks:
- name: Gather facts on automation user
snow_record_find:
username: "[email protected]"
password: "S0m3P@ssw0rd"
client_id: "1234567890abcdef01234567890abcde"
client_secret: "S0m3S3cr3t"
instance: "yourinstance"
max_records: 1
table: sys_user
query:
email: "[email protected]"
return_fields:
- email
- name
- sys_id
```
##### EXPECTED RESULTS
```
ansible-playbook 2.8.2
config file = /home/pknight/dci/ansible/servicenow/ansible.cfg
configured module search path = [u'/home/pknight/.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-playbook
python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
Using /home/pknight/dci/ansible/servicenow/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/pknight/dci/ansible/servicenow/sandbox/regions as it did not pass it's verify_file() method
script declined parsing /home/pknight/dci/ansible/servicenow/sandbox/regions as it did not pass it's verify_file() method
auto declined parsing /home/pknight/dci/ansible/servicenow/sandbox/regions as it did not pass it's verify_file() method
Parsed /home/pknight/dci/ansible/servicenow/sandbox/regions inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/default.pyc
PLAYBOOK: Test-Run.yml ***********************************************************************************************
Positional arguments: Test-Run.yml
become_method: sudo
inventory: (u'/home/pknight/dci/ansible/servicenow/sandbox',)
forks: 5
tags: (u'all',)
verbosity: 4
connection: smart
timeout: 10
1 plays in Test-Run.yml
PLAY [Test SNow] *****************************************************************************************************
META: ran handlers
TASK [Gather facts on automation user] *******************************************************************************
task path: /home/pknight/dci/ansible/servicenow/Test-Run.yml:9
<delawarecalgarytest.service-now.com> ESTABLISH LOCAL CONNECTION FOR USER: pknight
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c 'echo ~pknight && sleep 0'
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655 `" && echo ansible-tmp-1563393628.67-264175846363655="` echo /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655 `" ) && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/notification/snow_record_find.py
<delawarecalgarytest.service-now.com> PUT /home/pknight/.ansible/tmp/ansible-local-12354QW3EpR/tmp5q343Y TO /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655/AnsiballZ_snow_record_find.py
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c 'chmod u+x /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655/ /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655/AnsiballZ_snow_record_find.py && sleep 0'
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c '/home/pknight/dci/ansible/servicenow/venv/bin/python2.7 /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655/AnsiballZ_snow_record_find.py && sleep 0'
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c 'rm -f -r /home/pknight/.ansible/tmp/ansible-tmp-1563393628.67-264175846363655/ > /dev/null 2>&1 && sleep 0'
ok: [yourinstance.service-now.com] => {
"changed": false,
"instance": "yourinstance",
"invocation": {
"module_args": {
"client_id": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"client_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"instance": "yourinstance",
"max_records": 1,
"order_by": "-created_on",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"query": {
"email": "[email protected]"
},
"return_fields": [
"email",
"name",
"sys_id"
],
"table": "sys_user",
"username": "[email protected]"
}
},
"max_records": 1,
"query": {
"email": "[email protected]"
},
"record": [
{
"email": "[email protected]",
"name": "ServiceNow User",
"sys_id": "1234567890abcdef1234567890"
}
],
"return_fields": [
"email",
"name",
"sys_id"
],
"table": "sys_user"
}
META: ran handlers
META: ran handlers
PLAY RECAP ***********************************************************************************************************
yourinstance.service-now.com : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
##### ACTUAL RESULTS
```
ansible-playbook 2.8.2
config file = /home/pknight/dci/ansible/servicenow/ansible.cfg
configured module search path = [u'/home/pknight/.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-playbook
python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
Using /home/pknight/dci/ansible/servicenow/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/pknight/dci/ansible/servicenow/sandbox/regions as it did not pass it's verify_file() method
script declined parsing /home/pknight/dci/ansible/servicenow/sandbox/regions as it did not pass it's verify_file() method
auto declined parsing /home/pknight/dci/ansible/servicenow/sandbox/regions as it did not pass it's verify_file() method
Parsed /home/pknight/dci/ansible/servicenow/sandbox/regions inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/default.pyc
PLAYBOOK: Test-Run.yml ***********************************************************************************************
Positional arguments: Test-Run.yml
become_method: sudo
inventory: (u'/home/pknight/dci/ansible/servicenow/sandbox',)
forks: 5
tags: (u'all',)
verbosity: 4
connection: smart
timeout: 10
1 plays in Test-Run.yml
PLAY [Test SNow] *****************************************************************************************************
META: ran handlers
TASK [Gather facts on automation user] *******************************************************************************
task path: /home/pknight/dci/ansible/servicenow/Test-Run.yml:9
<delawarecalgarytest.service-now.com> ESTABLISH LOCAL CONNECTION FOR USER: pknight
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c 'echo ~pknight && sleep 0'
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979 `" && echo ansible-tmp-1563393553.59-213692823755979="` echo /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979 `" ) && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/notification/snow_record_find.py
<delawarecalgarytest.service-now.com> PUT /home/pknight/.ansible/tmp/ansible-local-12069E5RReh/tmpeVAB5I TO /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979/AnsiballZ_snow_record_find.py
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c 'chmod u+x /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979/ /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979/AnsiballZ_snow_record_find.py && sleep 0'
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c '/home/pknight/dci/ansible/servicenow/venv/bin/python2.7 /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979/AnsiballZ_snow_record_find.py && sleep 0'
<delawarecalgarytest.service-now.com> EXEC /bin/sh -c 'rm -f -r /home/pknight/.ansible/tmp/ansible-tmp-1563393553.59-213692823755979/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
File "/tmp/ansible_snow_record_find_payload_GdXZXi/__main__.py", line 255, in run_module
record = conn.query(table=module.params['table'],
fatal: [yourinstance.service-now.com]: FAILED! => {
"changed": false,
"instance": "yourinstance",
"invocation": {
"module_args": {
"client_id": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"client_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"instance": "yourinstance",
"max_records": 1,
"order_by": "-created_on",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"query": {
"email": "[email protected]"
},
"return_fields": [
"email",
"name",
"sys_id"
],
"table": "sys_user",
"username": "[email protected]"
}
},
"max_records": 1,
"msg": "Failed to find record: 'NoneType' object has no attribute 'query'",
"query": {
"email": "[email protected]"
},
"return_fields": [
"email",
"name",
"sys_id"
],
"table": "sys_user"
}
...ignoring
META: ran handlers
META: ran handlers
PLAY RECAP ***********************************************************************************************************
yourinstance.service-now.com : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1
```
| https://github.com/ansible/ansible/issues/59199 | https://github.com/ansible/ansible/pull/59201 | d0538c0d7a0ac8de612a6946a32fa6c4ad256eb2 | 7e25a614647c7ced41b38f869dfd49e06a29d22c | 2019-07-17T20:02:02Z | python | 2019-07-18T05:23:23Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,195 | ["lib/ansible/cli/galaxy.py"] | ansible-galaxy import broken on master after merge of collection branch | <!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
`ansible-galaxy import` is broken, potentially by the introduction of the `collection` subcommand? Fails early trying to read CLI args...
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
`ansible-galaxy`
##### ANSIBLE VERSION
```
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/calvin/projects/ansible/lib/ansible
executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible
python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
(empty)
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
##### STEPS TO REPRODUCE
Simply invoke the `import` subcommand or any repository:
```ansible-galaxy import -vvv --server=http://127.0.0.1:8000 orionuser1 ansible-testing-content```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
An import to start, to observe the import log, and be given the results.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```
ansible-galaxy 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/calvin/projects/ansible/lib/ansible
executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible-galaxy
python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
Using /etc/ansible/ansible.cfg as config file
Opened /home/calvin/.ansible_galaxy
ERROR! Unexpected Exception, this is probably a bug: 'args'
the full traceback was:
Traceback (most recent call last):
File "/home/calvin/projects/ansible/bin/ansible-galaxy", line 111, in <module>
exit_code = cli.run()
File "/home/calvin/projects/ansible/lib/ansible/cli/galaxy.py", line 268, in run
context.CLIARGS['func']()
File "/home/calvin/projects/ansible/lib/ansible/cli/galaxy.py", line 832, in execute_import
if len(context.CLIARGS['args']) < 2:
File "/home/calvin/projects/ansible/lib/ansible/module_utils/common/collections.py", line 20, in __getitem__
return self._store[key]
KeyError: 'args'
```
| https://github.com/ansible/ansible/issues/59195 | https://github.com/ansible/ansible/pull/59898 | 20b5ff5ab7fdc1fca7c6c402f5447cf4cfdd9c33 | 88e34491895ec0f4241ef2284b5711d06b878499 | 2019-07-17T18:21:14Z | python | 2019-08-01T21:31:28Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,189 | ["lib/ansible/modules/cloud/ovirt/ovirt_vm.py"] | ovirt_vm: Unable to find template shared among multiple clusters in the same datacenter | <!--- 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 -->
Since commit df581eb ovirt_vm is unable to find a template shared among multiple clusters in the same datacenter. Moreover, the document says that `cluster` parameter is a parameter used to define where VMs will be created. Then it should not be used to filter a template search which is not related to VM storage.
##### 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_vm
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.8.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. -->
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
In RHEVM:
1. Create a cluster `cluster_a` and add a template `template_a` in this cluster
2. Create a cluster `cluster_b`
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Provision machine
ovirt_vm:
...
cluster: "cluster_b"
template: "template_a"
...
```
<!--- 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 template should be found (Behaviour before commit df581eb)
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
It raises an error
<!--- Paste verbatim command output between quotes -->
```paste below
Template with name 'template_a' and version 'None' in cluster 'cluster_b' was not found
```
| https://github.com/ansible/ansible/issues/59189 | https://github.com/ansible/ansible/pull/60461 | 6110dcc789c4dfadc43e79bb20227fded9b9c0bd | 5972567ab61d1dc062f1df929bfb570a7c8c962f | 2019-07-17T16:35:44Z | python | 2019-08-13T10:16:25Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,164 | ["changelogs/fragments/proxmox-6-version-detection.yaml", "lib/ansible/modules/cloud/misc/proxmox.py", "lib/ansible/modules/cloud/misc/proxmox_kvm.py"] | Proxmox version detection is broken in proxmox 6 | <!--- 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
An hour ago I upgraded my Proxmox to the new stable version 6. Since then my playbooks fail with this error:
`fatal: [proxmox]: FAILED! => {"changed": false, "msg": "authorization on proxmox cluster failed with exception: could not convert string to float: '6.0-4'"}`
It seems like the proxmox changed the API.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
proxmox (https://github.com/mrdrogdrog/ansible/blob/6430205d396b7c1733de22a898c51823f67d5bf4/lib/ansible/modules/cloud/misc/proxmox.py#L484)
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.8.2
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/tilman/.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.3 (default, Jun 24 2019, 04:54:02) [GCC 9.1.0]
```
##### OS / ENVIRONMENT
Proxmox 6
##### STEPS TO REPRODUCE
- Use the latest ansible version
- Use the latest stable version of proxmox (6)
- Use the proxmox module to do anything. E.g. create a container
- Get the error
##### EXPECTED RESULTS
Normal runthrough
##### ACTUAL RESULTS
Crash with an error
| https://github.com/ansible/ansible/issues/59164 | https://github.com/ansible/ansible/pull/59165 | 0407af936a093c9e3c9feb098bf21e13f69abd7e | 38193f6b60caa2e3725cb987376a80074821a950 | 2019-07-16T21:48:58Z | python | 2019-11-29T17:16:40Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,140 | ["lib/ansible/module_utils/ovirt.py"] | oVirt: when having network with spaces in name, the search fails to find it. | <!--- 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 having network with spaces in name, the search fails to find it.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
ovirt_network
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.8.1
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
<!--- Paste example playbooks or commands between quotes below -->
```yaml
ovirt_network:
name: Storage - VLAN
vm_network: False
vlan_tag: 33
data_center: Default
description: Storage with VLAN Tagging
comment: Storage with VLAN Tagging
clusters:
- name: Default
required: False
migration: 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 -->
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot add Network. The name of the logical network 'Storage - VLAN 33' is already used by an existing logical network in the same data-center.
```
The problem is that in oVirt API searching object with spaces in name, it won't find it. We need to quote the search string. | https://github.com/ansible/ansible/issues/59140 | https://github.com/ansible/ansible/pull/59184 | d4147b55dd6b7087f8b118b901f6860583868336 | b46e661d39041998ea31829e8570ec5aa1ce5f0a | 2019-07-16T14:02:35Z | python | 2019-09-03T19:22:37Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,125 | ["docs/docsite/rst/user_guide/playbooks_tests.rst"] | Documentation for `regex` test is lacking. | ##### SUMMARY
Please document the actual usage of the `regex` test (`… is regex(…)`).
##### ISSUE TYPE
- Documentation Report
##### COMPONENT NAME
`playbooks_test.rst`
##### ANSIBLE VERSION
Latest on website and in github repo
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
N/A
##### ADDITIONAL INFORMATION
Currently, the only documentation about the `regex` test is the following line:
> By default, 'regex' works like search, but regex can be configured to perform other tests as well.
There is NO documentation about how "regex can be configured to perform other tests as well".
Please fully document this test.
_(In general, why do you need your customers to tell you that you need to write documentation?)_ | https://github.com/ansible/ansible/issues/59125 | https://github.com/ansible/ansible/pull/71049 | 0c855dc70bde3b737329689823be03496026d976 | 701c638757949280c875edc0eb364ee0e63db4bb | 2019-07-16T01:08:18Z | python | 2020-08-03T15:19:20Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,114 | ["lib/ansible/galaxy/collection.py", "test/units/galaxy/test_collection.py"] | ansible-galaxy collection build includes previous build artifacts in every new build | <!--- 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
Every build produces a tarball in the current directory, which includes the full unhidden contents of the current directory. This means it also includes all the _previous_ tarball artifacts created by all the builds that happened before it. So, every version will include all the previous versions built, if the user doens't manually clean them up every time.
The builds by `mazer` were placed in a `releases/` directory which was itself excluded from the builds.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
ansible-galaxy
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/calvin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/calvin/.local/share/virtualenvs/orion/lib/python3.6/site-packages/ansible
executable location = /home/calvin/.local/share/virtualenvs/orion/bin/ansible
python version = 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
# (empty)
```
##### OS / ENVIRONMENT
Fedora 28
##### STEPS TO REPRODUCE
- Create a collection
- Build the collection
- Increment the version
- Build it again
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
Each build should be about the same, with the files associated with that version, and should only include that version in the build.
##### ACTUAL RESULTS
```(orion) [calvin@localhost orion]$ ansible-galaxy collection install orionuser1.collection_dep_a_wzrzlxeh --server=http://localhost:8000/
[WARNING]: The specified collections path '/home/calvin/projects/orion' is not part of the configured Ansible collections paths
'/home/calvin/.ansible/collections:/usr/share/ansible/collections'. The installed collection won't be picked up in an Ansible run.
Installing 'orionuser1.collection_dep_a_wzrzlxeh:1.0.9' to '/home/calvin/projects/orion/ansible_collections/orionuser1/collection_dep_a_wzrzlxeh'
(orion) [calvin@localhost orion]$ ls ansible_collections/orionuser1/collection_dep_a_wzrzlxeh/
FILES.json orionuser1-collection_dep_a_wzrzlxeh-0.0.1.tar.gz playbooks README.md roles
MANIFEST.json orionuser1-collection_dep_a_wzrzlxeh-0.0.2.tar.gz plugins releases
```
| https://github.com/ansible/ansible/issues/59114 | https://github.com/ansible/ansible/pull/59121 | 199c97728f4ad7995721c88cb933d4b90b1afdc9 | aa0de421d2948c6552770534381e58d6acae7997 | 2019-07-15T20:16:45Z | python | 2019-07-22T21:52:30Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,109 | ["docs/docsite/rst/reference_appendices/test_strategies.rst"] | Bad advice on "Integrating Testing With Rolling Updates" | <!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
On the "Testing Strategies" page, the section "[Integrating Testing With Rolling Updates](https://github.com/ansible/ansible/blob/1a11cecaefed90dd9a4754b3b69c1b3ff4a06231/docs/docsite/rst/reference_appendices/test_strategies.rst#integrating-testing-with-rolling-updates)" recommends putting tests in a role (called `apply_testing_checks` in the example). This is bad advice because the tests will run before any handlers. That means, for example, that if the `webserver` role installs a faulty web server configuration, tests that query the server will fail to catch it, because they will make their requests while the server is still in its previous configuration.
<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->
##### ISSUE TYPE
- Documentation Report
##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
test_strategies.rst
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.10.2
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. OS version, browser, etc. -->
##### ADDITIONAL INFORMATION
<!--- Describe how this improves the documentation, e.g. before/after situation or screenshots -->
<!--- HINT: You can paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/59109 | https://github.com/ansible/ansible/pull/79542 | 07f1a1b7dc062a15c57b173d0cf60678394d8449 | d8dc76e134fa458690acbd70f0cb9a009dbb5e29 | 2019-07-15T18:49:50Z | python | 2023-02-02T18:19:08Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,102 | ["changelogs/fragments/59848-iam-password-policy-Fix-no-expiration.yml", "lib/ansible/modules/cloud/amazon/iam_password_policy.py"] | IAM Password Policy errors when no password expiration set | ##### SUMMARY
When attempting to set no password expiration policy botocore spits out lovely validation errors:
```
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_iam_password_policy_payload_gn34QS/__main__.py", line 140, in update_password_policy
HardExpiry=pw_expire
File "/usr/lib/python2.7/site-packages/boto3/resources/factory.py", line 520, in do_action
response = action(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(**params)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 312, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 575, in _make_api_call
api_params, operation_model, context=request_context)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 630, in _convert_to_request_dict
api_params, operation_model)
File "/usr/lib/python2.7/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
ParamValidationError: Parameter validation failed:
Invalid range for parameter MaxPasswordAge, value: 0, valid range: 1-inf
fatal: [it-cloud-aws-login -> localhost]: FAILED! => {
"boto3_version": "1.4.6",
"botocore_version": "1.6.0",
"changed": false,
"invocation": {
"module_args": {
"allow_pw_change": true,
"aws_access_key": null,
"aws_secret_key": null,
"debug_botocore_endpoint_logs": false,
"ec2_url": null,
"min_pw_length": 14,
"profile": null,
"pw_expire": false,
"pw_max_age": 0,
"pw_reuse_prevent": 6,
"region": null,
"require_lowercase": true,
"require_numbers": true,
"require_symbols": true,
"require_uppercase": true,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Couldn't update IAM Password Policy: Parameter validation failed:\nInvalid range for parameter MaxPasswordAge, value: 0, valid range: 1-inf"
}
```
I tried
- not passing a value: `Couldn't update IAM Password Policy: Parameter validation failed:\nInvalid type for parameter MaxPasswordAge, value: None, type: <type 'NoneType'>, valid types: <type 'int'>, <type 'long'>`
- Passing '0': `Invalid range for parameter MaxPasswordAge, value: 0, valid range: 1-inf`
- Passing 'inf': `argument pw_max_age is of type <type 'str'> and we were unable to convert to int: <type 'str'> cannot be converted to an int`
It would appear that botocore expects you *not* to pass a value, at which point it sets it automatically to 0...
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
iam_password_policy
##### ANSIBLE VERSION
```
$ ansible --version
ansible 2.8.1
config file = /home/mchappel/.ansible.cfg
configured module search path = [u'/home/mchappel/.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, 12:19:05) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
```
DEFAULT_CALLBACK_WHITELIST(/home/mchappel/.ansible.cfg) = [u'timer', u'profile_tasks']
HOST_KEY_CHECKING(/home/mchappel/.ansible.cfg) = False
RETRY_FILES_ENABLED(/home/mchappel/.ansible.cfg) = False
```
##### OS / ENVIRONMENT
RHEL7
```
python2-botocore-1.6.0-1.el7.noarch
python2-boto-2.45.0-3.el7.noarch
python2-boto3-1.4.6-1.el7.noarch
```
##### STEPS TO REPRODUCE
```
---
- name: 'Password policy for AWS account'
iam_password_policy:
state: present
allow_pw_change: yes
min_pw_length: 14
require_symbols: yes
require_numbers: yes
require_uppercase: yes
require_lowercase: yes
pw_reuse_prevent: 6
pw_expire: false
pw_max_age: 0
```
##### EXPECTED RESULTS
Policy successfully set with no password expiry
##### ACTUAL RESULTS
Errors (see above) | https://github.com/ansible/ansible/issues/59102 | https://github.com/ansible/ansible/pull/59848 | 3eeaf2f9746fd6709bd565d88d0680019f261de3 | 934d25a820c29b885329675453748e4f88750c63 | 2019-07-15T14:36:01Z | python | 2019-07-31T16:03:30Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,101 | ["lib/ansible/plugins/inventory/gcp_compute.py"] | gcp_compute incorrectly prints data to screen, breaking JSON output for ansible-inventory | <!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below -->
`ansible-inventory` is supposed to return JSON...
but it does not when installing anisble@devel, and running a GCE inventory update with this `gcp_compute.yml` to use the gcp inventory plugin:
```
auth_kind: serviceaccount
filters: null
plugin: gcp_compute
projects:
- myproject
service_account_file: creds.json
```
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
gcp inventory plugin
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible-inventory --version
ansible-inventory 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/elijah/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/elijah/venvs/py36towerqa/lib64/python3.6/site-packages/ansible
executable location = /home/elijah/venvs/py36towerqa/bin/ansible-inventory
python version = 3.6.8 (default, Feb 19 2019, 21:10:40) [GCC 9.0.1 20190209 (Red Hat 9.0.1-0.4)]
```
##### 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. -->
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
1) Create gcp_comput.yml and creds.json to access your gcp account
2) Create python36 venv
3) install [email protected]
4) run `ansible-inventory -i gcp_compute.yml --list > ouput.28`
5) Inspect the output, see that it is valid JSON.
6) install ansible@devel
4) run `ansible-inventory -i gcp_compute.yml --list > ouput.devel`
7) Inspect output, see that before the part that starts the JSON that looks like:
```
{
"_meta": {
"hostvars": {
```
there is a bug chunk of key/value pairs in a list:
```
[{'key': 'blahkey', 'value': 'blahvalue}, {'key': 'ssh-keys', 'value': 'somebody's key'} {'key': 'more keys', 'value': 'more values' ...... ]
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
JSON
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
List of key/value pairs then regular json ouput
<!--- Paste verbatim command output between quotes -->
```paste below
```
This is a tower blocker for the next release of ansible.
(private repo) https://github.com/ansible/tower/issues/3605
| https://github.com/ansible/ansible/issues/59101 | https://github.com/ansible/ansible/pull/59104 | 4898b0a4a298448677c2aee2a03157ba5b662759 | a6d32eda84623305755ff46503c37d345a8d2feb | 2019-07-15T14:26:18Z | python | 2019-07-15T17:26:19Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,100 | ["lib/ansible/modules/windows/win_service.py"] | Windows service installed with win_nssm fails to start with win_service | <!--- 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
Starting a Windows service with the `win_service` module and that was installed with the `win_nssm` module fails when a username and password are required. If I enter the password manually into the nssm GUI editor and re-run the playbook then the service successfully starts.
I used the `win_nssm` module to install and `win_service` module to start a Windows service that takes a username and password. [As recommended in the win_nssm documentation](https://docs.ansible.com/ansible/latest/modules/win_nssm_module.html#examples), I use the `win_nssm` module only to install the service. The username and password are passed to the `win_service` module as the `user` and `password` parameters when starting the service.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
- win_nssm
- win_service
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.8.2
config file = /home/kdouglas/src/pt/ansible/ansible.cfg
configured module search path = ['/home/kdouglas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/kdouglas/venvs/ansible/lib/python3.6/site-packages/ansible
executable location = /home/kdouglas/venvs/ansible/bin/ansible
python version = 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
DEFAULT_HOST_LIST(/home/kdouglas/src/pt/ansible/ansible.cfg) = ['/home/kdouglas/src/pt/ansible/hosts']
```
##### OS / ENVIRONMENT
Host machine:
```
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
```
Remote machine:
```
Windows 10 Pro 64-bit
Python: 3.6.8
```
Configuration for WinRM:
```
ansible_connection: winrm
ansible_user: pt
ansible_password: "{{ lookup('aws_ssm', 'xxxxxx') }}"
ansible_winrm_transport: credssp
ansible_winrm_server_cert_validation: ignore
```
##### STEPS TO REPRODUCE
The two relevant tasks in the playbook look like the following and are based on the examples for the `win_nssm` documentation.
```yaml
- name: Install the pt executor service
win_nssm:
name: "{{ pt_service_name }}"
application: '{{ pt_config_dir }}\{{ venv_name }}\Scripts\executor.exe'
app_parameters_free_form: "-c {{ node_name }} {{ pt_server }}"
- name: Start the pt executor service
win_service:
name: "{{ pt_service_name }}"
start_mode: auto
state: started
username: "{{ executor_login }}"
password: "{{ pt_jc_password }}"
```
I run these tasks with the command `ansible-playbook -i hosts pt.yml`. Unfortunately, I get the following error:
```
fatal: [WIN-1]: FAILED! => {"can_pause_and_continue": false, "changed": false, "depended_by": [], "dependencies": [], "description": "", "desktop_interact": false, "display_name": "pt", "exists": true, "msg": "Service 'pt (pt)' cannot be started due to the following error: Cannot start service pt on computer '.'.", "name": "pt", "path": "C:\\ProgramData\\chocolatey\\lib\\NSSM\\tools\\nssm.exe", "start_mode": "auto", "state": "stopped", "username": ".\\pt"}
```
Repeatedly running the playbook still results in the error. However, the playbook will work if I manually run `nssm edit pt` in a PowerShell terminal on the machine and enter the password into the NSSM GUI service editor window that appears.
I observe this behavior across multiple Windows 10 Pro machines and when using both Ansible 2.8.1 and Ansible 2.8.2. I also tested the development version of Ansible (commit 262c9ffdb6c995d67a8dfd3707ec8bb09a4fd77d) and see the same behavior.
In addition, I tried using the deprecated `user` and `password` parameters of the `win_nssm` module but this failed as well.
##### EXPECTED RESULTS
I expect that the playbook successfully starts the pt executor service.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
(Sensitive strings have been replaced by `x`'s)
```
TASK [win_executor : Install the pt executor service] ****************************************************************************************************************************************************
task path: /home/kdouglas/src/pt/ansible/roles/win_executor/tasks/main.yml:37
AWS_ssm name lookup term: ['xxxxxxxxxxxxx']
Using module file /home/kdouglas/venvs/ansible/lib/python3.6/site-packages/ansible/modules/windows/win_nssm.ps1
Pipelining is enabled.
<WIN-1> ESTABLISH WINRM CONNECTION FOR USER: pt on PORT 5986 TO WIN-1
EXEC (via pipeline wrapper)
ok: [WIN-1] => {
"changed": false,
"nssm_app_parameters": "-c WIN1 C:\\Users\\pt\\.pt\\workspace xxxxxxxxxxxx",
"nssm_single_line_app_parameters": "-c WIN-1 C:\\Users\\pt\\.pt\\workspace xxxxxxxx"
}
TASK [win_executor : Start the pt executor service] ******************************************************************************************************************************************************
task path: /home/kdouglas/src/pt/ansible/roles/win_executor/tasks/main.yml:43
AWS_ssm name lookup term: ['xxxxxxx']
Using module file /home/kdouglas/venvs/ansible/lib/python3.6/site-packages/ansible/modules/windows/win_service.ps1
Pipelining is enabled.
<WIN-1> ESTABLISH WINRM CONNECTION FOR USER: pt on PORT 5986 TO WIN-1
EXEC (via pipeline wrapper)
fatal: [WIN-1]: FAILED! => {
"can_pause_and_continue": false,
"changed": false,
"depended_by": [],
"dependencies": [],
"description": "",
"desktop_interact": false,
"display_name": "pt",
"exists": true,
"msg": "Service 'pt (pt)' cannot be started due to the following error: Cannot start service pt on computer '.'.",
"name": "pt",
"path": "C:\\ProgramData\\chocolatey\\lib\\NSSM\\tools\\nssm.exe",
"start_mode": "auto",
"state": "stopped",
"username": ".\\pt"
}
```
| https://github.com/ansible/ansible/issues/59100 | https://github.com/ansible/ansible/pull/59155 | 09aa98bf432a8e361fbfa71de9e45238423140a3 | edfdf30bcb4fb87183b4e6e987e014783743230c | 2019-07-15T13:53:40Z | python | 2019-07-17T07:03:47Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,083 | ["lib/ansible/module_utils/network/ios/providers/cli/config/bgp/process.py", "test/integration/targets/ios_bgp/tests/cli/basic.yaml"] | ios_bgp - Not idempotent when using networks on classful boundaries | <!--- 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 a classful network boundary for a network, the router will not show "mask x.x.x.x" in the configuration. Thus the module will think a configuration change is needed, not fully idempotent.
##### 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_bgp
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /Users/joshv/Github/ansible-using_ios/ansible.cfg
configured module search path = ['/etc/ansible/library']
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.2 (default, Feb 10 2019, 15:44:18) [Clang 10.0.0 (clang-1000.11.45.5)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
DEFAULT_GATHERING(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = ['/Users/joshv/Github/ansible-using_ios/hosts']
DEFAULT_MODULE_PATH(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = ['/etc/ansible/library']
HOST_KEY_CHECKING(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = False
INTERPRETER_PYTHON(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = /usr/local/bin/python3
RETRY_FILES_ENABLED(/Users/joshv/Github/ansible-using_ios/ansible.cfg) = False
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
MacOS -> Cisco IOS
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Advertise networks 198.51.100.0/24
networks:
- prefix: 198.51.100.0
masklen: 24
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: "TASK 1: Setup iBGP Peer"
ios_bgp:
config:
bgp_as: 65500
router_id: 10.0.0.3
log_neighbor_changes: true
neighbors:
- neighbor: 198.51.100.2
remote_as: 65500
activate: true
timers:
keepalive: 15
holdtime: 45
min_neighbor_holdtime: 5
description: R4
networks:
- prefix: 198.51.100.0
masklen: 24
- prefix: 203.0.113.0
masklen: 24
address_family:
- afi: ipv4
safi: unicast
neighbors:
- neighbor: 198.51.100.2
activate: yes
next_hop_self: yes
operation: merge
register: ibgp_peer1
```
<!--- 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'd expect that the second run would be idempotent and not change. I'm getting a changed message instead of OK.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
The module attempted to push
<!--- Paste verbatim command output between quotes -->
```paste below
"commands": [
"router bgp 65500",
"network 198.51.100.0 mask 255.255.255.0",
"address-family ipv4",
"no auto-summary",
"exit-address-family",
"exit"
],
"failed": false
```
I'm thinking of how to take a stab at this in the coming weeks if it isn't already a quick easy fix. Small low priority issue... | https://github.com/ansible/ansible/issues/59083 | https://github.com/ansible/ansible/pull/63055 | 10ed3d0ec8246473e6275aef6532b46c31793042 | 7ac4756bf6a285bfd8585a0e6c6600af8bcb0b1c | 2019-07-15T01:28:11Z | python | 2019-10-04T14:56:08Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,078 | ["lib/ansible/modules/cloud/amazon/iam_user.py"] | iam_user module fails to remove an AWS user | <!--- 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 -->
`iam_user` module fails to remove am AWS user if it has: a group membership, console password (login profile), access keys, MFA device, etc..
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
iam_user
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.2
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/agustin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = .../venv/lib/python3.5/site-packages/ansible
executable location =.../venv/bin/ansible
python version = 3.5.7 (default, Mar 30 2019, 01:05:18) [GCC 7.3.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 -->
Create an AWS user `test` with password or access keys
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- hosts: localhost
tasks:
- iam_user:
name: test
state: absent
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
User's state = absent
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
TASK [iam_user] **************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.errorfactory.DeleteConflictException: An error occurred (DeleteConflict) when calling the DeleteUser operation: Cannot delete entity, must delete login profile first.
fatal: [localhost]: FAILED! => {"changed": false, "error": {"code": "DeleteConflict", "message": "Cannot delete entity, must delete login profile first.", "type": "Sender"}, "msg": "Unable to delete user test: An error occurred (DeleteConflict) when calling the DeleteUser operation: Cannot delete entity, must delete login profile first.", "response_metadata": {"http_headers": {"content-length": "300", "content-type": "text/xml", "date": "Sun, 14 Jul 2019 18:34:25 GMT", "x-amzn-requestid": "01da0109-a666-11e9-adeb-83c56b62b76d"}, "http_status_code": 409, "request_id": "01da0109-a666-11e9-adeb-83c56b62b76d", "retry_attempts": 0}}
```
| https://github.com/ansible/ansible/issues/59078 | https://github.com/ansible/ansible/pull/59079 | 6046386dba6ed3ce5328cda56bc27ca168b29d4b | f0cadb9843dc2103e7f223052812eed993257653 | 2019-07-14T18:39:05Z | python | 2019-10-21T15:06:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,064 | ["changelogs/fragments/60384-docker_container-mount-endpoint-collision.yml", "lib/ansible/modules/cloud/docker/docker_container.py", "test/integration/targets/docker_container/tasks/tests/mounts-volumes.yml"] | docker_container: prevent mounting endpoint collisions before trying to (re-)create container | ##### SUMMARY
`docker_container` should so some sanity checks that not two volumes / mount points use the same target inside the container, so that especially when recreating containers, they won't be destroyed first before recreating fails.
This becomes more important once #49808 is merged.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
docker_container
##### ANSIBLE VERSION
```
2.8.0
```
| https://github.com/ansible/ansible/issues/59064 | https://github.com/ansible/ansible/pull/60384 | 523e40e993c06a6c15234c9a3c951b5398e44184 | 48541910bffb8e178000b1f3dd32171792f0922f | 2019-07-13T21:25:21Z | python | 2019-08-16T13:23:03Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,063 | ["lib/ansible/plugins/connection/chroot.py"] | chroot connection plugin crashes with AttributeError: 'Connection' object has no attribute '_load_name' | ##### SUMMARY
The chroot connection plugin crashes with an exception: `AttributeError: 'Connection' object has no attribute '_load_name'`
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
chroot connection plugin
##### ANSIBLE VERSION
```
ansible 2.8.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/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
```
##### OS / ENVIRONMENT
Debian 9 with ansible 2.8.2-1ppa~trusty from the ppa:ansible/ansible
##### STEPS TO REPRODUCE
```
# ansible -m setup -c chroot -i /target, all -vvv
```
##### EXPECTED RESULTS
Ansible should run in a `chroot /target` environment and report the discovered facts.
##### ACTUAL RESULTS
```
ansible 2.8.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/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
Using /etc/ansible/ansible.cfg as config file
Unable to parse address from hostname, leaving unchanged: Not a valid network hostname: /target
Parsed /target, inventory source with host_list plugin
META: ran handlers
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 144, in run
res = self._execute()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 590, in _execute
self._connection = self._get_connection(variables=variables, templar=templar)
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 892, in _get_connection
ansible_playbook_pid=to_text(os.getppid())
File "/usr/lib/python2.7/dist-packages/ansible/plugins/loader.py", line 579, in get
obj = obj(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/chroot.py", line 99, in __init__
if os.path.isabs(self.get_option('chroot_exe')):
File "/usr/lib/python2.7/dist-packages/ansible/plugins/__init__.py", line 58, in get_option
option_value = C.config.get_config_value(option, plugin_type=get_plugin_class(self), plugin_name=self._load_name, variables=hostvars)
AttributeError: 'Connection' object has no attribute '_load_name'
/target | FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
```
| https://github.com/ansible/ansible/issues/59063 | https://github.com/ansible/ansible/pull/59065 | 88c4cf28eac874d7a0b62559b2f931ca1b9572e0 | b16c264dcada92fbd5a539c85ad1c2bbff0551f4 | 2019-07-13T21:12:43Z | python | 2019-07-16T15:31:06Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,021 | ["lib/ansible/module_utils/k8s/scale.py"] | k8s_scale fails on "KeyError: merge_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
It is not possible to use k8s_scale due to missing key merge_type.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
k8s_scale
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.2
config file = /Users/chbr/repos/work/components/helm/ansible.cfg
configured module search path = ['/Users/chbr/.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.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]
```
##### 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. -->
Client is macOS 10.14.4
Cluster is OKD 3.11
##### STEPS TO REPRODUCE
On a newly deployed OKD cluster I fired up a Tiller service successfully. But deleting it via the `k8s` module does not delete the pods because of some issue in Kubernetes API. So my attempted work around is to scale down the deployment before deleting it.
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Scale down Tiller
k8s_scale:
kind: Deployment
name: tiller-deploy
api_version: v1
namespace: myproject
replicas: 0
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
I expect Ansible to succeed and the deployment to be scaled down to 0 replicas.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
/Users/chbr/.ansible/tmp/ansible-tmp-1562923350.045843-76777999244172/AnsiballZ_k8s_scale.py:18: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "/Users/chbr/.ansible/tmp/ansible-tmp-1562923350.045843-76777999244172/AnsiballZ_k8s_scale.py", line 114, in <module>
_ansiballz_main()
File "/Users/chbr/.ansible/tmp/ansible-tmp-1562923350.045843-76777999244172/AnsiballZ_k8s_scale.py", line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/Users/chbr/.ansible/tmp/ansible-tmp-1562923350.045843-76777999244172/AnsiballZ_k8s_scale.py", line 49, in invoke_module
imp.load_module('__main__', mod, module, MOD_DESC)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/imp.py", line 169, in load_source
module = _exec(spec, sys.modules[name])
File "<frozen importlib._bootstrap>", line 630, in _exec
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/folders/d0/bmn8x1693sv_fcgb8kbyv4s40000gn/T/ansible_k8s_scale_payload_q4dt8qvw/__main__.py", line 129, in <module>
File "/var/folders/d0/bmn8x1693sv_fcgb8kbyv4s40000gn/T/ansible_k8s_scale_payload_q4dt8qvw/__main__.py", line 125, in main
File "/var/folders/d0/bmn8x1693sv_fcgb8kbyv4s40000gn/T/ansible_k8s_scale_payload_q4dt8qvw/ansible_k8s_scale_payload.zip/ansible/module_utils/k8s/raw.py", line 115, in __init__
KeyError: 'merge_type'
```
| https://github.com/ansible/ansible/issues/59021 | https://github.com/ansible/ansible/pull/59887 | 01a92f0191de904ca8351cbfd1516e1aee874372 | e60cdc310d5344c00b4f49c9f7dde78d206b25ae | 2019-07-12T09:38:40Z | python | 2019-10-25T19:44:39Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 59,007 | ["lib/ansible/plugins/terminal/asa.py"] | ASA: command is considered complete if it is not authorized | ##### SUMMARY
ASA: command is considered complete if it is not authorized. Initially, the problem was discovered when it turned out that our TACACS server does not include in the white list the command `no terminal pager`, which is executed when a connection is established with the device ([lib/ansible/plugins/terminal/asa.py#L49](https://github.com/ansible/ansible/blob/f09bd91ad078a5a484cac77df39af51586745990/lib/ansible/plugins/terminal/asa.py#L49)). The device responded with the line `Command authorization failed`, paging did not turn off, but no errors were output, but the subsequent execution of commands was incorrect due to the fact that the device performed paging and suggested pressing the spacebar.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
* lib/ansible/plugins/terminal/asa.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.0.dev0
config file = /home/administrator/ansible/playbooks/asa_collect/ansible.cfg
configured module search path = [u'/home/administrator/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/administrator/ansible_dev/ansible/lib/ansible
executable location = /home/administrator/ansible_dev/ansible/bin/ansible
python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
PARAMIKO_HOST_KEY_AUTO_ADD(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = True
PERSISTENT_COMMAND_TIMEOUT(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = 60
RETRY_FILES_ENABLED(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = False
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
* debian 9.5
* ASA 9.6.*
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
* ASA device authorizes commands through TACACS server
* the `no terminal pager` command is not included in the white list of allowed commands on the TACACS server
<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
- hosts: all
gather_facts: no
tasks:
- name: show commands
asa_command:
commands:
- '<not allowed command>'
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
expected error output when executing a command that is not allowed.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
no errors are output, but subsequent commands with a long output may be cut off or not executed at all due to the need to press the spacebar to scroll.
| https://github.com/ansible/ansible/issues/59007 | https://github.com/ansible/ansible/pull/59008 | 8eb46acbb118494b6855f0117df33ba1ec74f020 | df0e7478992b568189623c8b52175b884d23c049 | 2019-07-12T04:47:11Z | python | 2019-10-19T06:06:16Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,992 | ["docs/docsite/rst/dev_guide/collections_tech_preview.rst"] | [Docs] add pointer to content_collector for migrating modules to collections | <!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->
Add a description of https://github.com/ansible/content_collector to the collections techpreview file with appropriate warnings that this tool is still in active development, but is available for experimentation and feedback.
##### ISSUE TYPE
- Documentation Report
##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
docs.ansible.com
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. OS version, browser, etc. -->
##### ADDITIONAL INFORMATION
<!--- Describe how this improves the documentation, e.g. before/after situation or screenshots -->
<!--- HINT: You can paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/58992 | https://github.com/ansible/ansible/pull/59881 | b0ec91e69e4cc578f0238ea7b60aeac91f2eedcd | ed21aba4422e82fe633e2e164ff5810bdb597595 | 2019-07-11T18:52:13Z | python | 2019-08-08T19:17:26Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,981 | ["lib/ansible/modules/monitoring/zabbix/zabbix_host.py"] | zabbix_host module not idempotent with host_groups | ##### SUMMARY
Using Zabbix 4.0 Server, when a list of `host_groups` is provided for the zabbix_host module, it is not idempotent, but the behavior only appears when using Host Groups which are already existent on the Zabbix Server (ex. "Linux Server"). If i create own Host Groups on the Zabbix Server then the Module behaves accordingly and the task does not change on the second run.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
zabbix_host module
##### ANSIBLE VERSION
```
ansible 2.7.8
config file = /home/userx/git/somefolder/ansible-test/ansible.cfg
configured module search path = ['/home/userx/.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.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0]
```
##### OS / ENVIRONMENT
N/A
##### STEPS TO REPRODUCE
Running the Playbook with already existing Host Groups (like "Linux Servers" or "Hypervisors") on Zabbix the task keeps changing all the time.
```yaml
- name: register zabbix host on the server
vars:
zabbix_agent_login_user: "admin"
zabbix_agent_login_password: "1234"
delegate_to: zabbix-server.example.com
zabbix_host:
server_url: "http://{{ zabbix_agent_server }}/"
login_user: "{{ zabbix_agent_login_user }}"
login_password: "{{ zabbix_agent_login_password }}"
host_name: "{{ ansible_fqdn }}"
interfaces:
- type: 1 #agent
main: 1
useip: 1
port: 10050
ip: "{{ ansible_default_ipv4['address'] }}"
dns: "{{ ansible_fqdn }}"
visible_name: "{{ ansible_fqdn }}"
status: enabled
state: present
host_groups:
- Linux Servers
- Hypervisors
link_templates:
- Template OS Linux
- Template App SSH Service
- Template Module ICMP Ping
notify: restart zabbix-agent
```
This resuls in
```
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [zabbix-client.example.com]
TASK [zabbix_agent : register zabbix host on the server] ************************************************************************************************************************************************************
changed: [zabbix-client.example.com -> zabbix-server.example.com]
RUNNING HANDLER [zabbix_agent : restart zabbix-agent] ***************************************************************************************************************************************************************
changed: [zabbix-client.example.com]
PLAY RECAP **********************************************************************************************************************************************************************************************************
zabbix-client.example.com : ok=3 changed=2 unreachable=0 failed=0
```
Whereas when i create my own Host groups (test, test2) on the Zabbix Server the task does not change anything on the second run:
```yaml
- name: register zabbix host on the server
vars:
zabbix_agent_login_user: "admin"
zabbix_agent_login_password: "1234"
delegate_to: zabbix-server.example.com
zabbix_host:
server_url: "http://{{ zabbix_agent_server }}/"
login_user: "{{ zabbix_agent_login_user }}"
login_password: "{{ zabbix_agent_login_password }}"
host_name: "{{ ansible_fqdn }}"
interfaces:
- type: 1 #agent
main: 1
useip: 1
port: 10050
ip: "{{ ansible_default_ipv4['address'] }}"
dns: "{{ ansible_fqdn }}"
visible_name: "{{ ansible_fqdn }}"
status: enabled
state: present
host_groups:
- test
- test2
link_templates:
- Template OS Linux
- Template App SSH Service
- Template Module ICMP Ping
notify: restart zabbix-agent
```
```
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [zabbix-client.example.com]
TASK [zabbix_agent : register zabbix host on the server] ************************************************************************************************************************************************************
ok: [zabbix-client.example.com -> zabbix-server.example.com]
PLAY RECAP **********************************************************************************************************************************************************************************************************
zabbix-client.example.com : ok=2 changed=0 unreachable=0 failed=0
```
##### EXPECTED RESULTS
The Module should be idempotent when adding a Host to already existing (or internal) Host Groups of the Zabbix Server and not keep changing.
##### ACTUAL RESULTS
When already existing (internal) Host Groups like "Linux Servers" or "Hypervisors" are used the Task keeps changing on every run.
| https://github.com/ansible/ansible/issues/58981 | https://github.com/ansible/ansible/pull/63860 | 2fa8f9cfd80daf32c7d222190edf7cfc7234582a | 82c63c0ac3d910a26a3eb1038c15658254d80281 | 2019-07-11T13:34:53Z | python | 2019-12-25T15:30:51Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,980 | ["changelogs/fragments/fix_strategy_inv_up.yml", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/inventory/runme.sh", "test/integration/targets/inventory/strategy.yml"] | force_valid_group_names throws unexpected exception if invalid names used with add_host/group_by | <!--- 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 -->
While using a simple reproducer with either force_valid_group_names=silently or force_valid_group_names=always an unexpected exception is thrown:
Sample playbook:
```
---
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: add a host to a group
add_host:
name: localhost
groups: Not-Working
```
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
inventory
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible --version
ansible 2.9.0.dev0
config file = /opt/gmuniz/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /opt/ansible-devel/ansible/lib/ansible
executable location = /opt/ansible-devel/ansible/bin/ansible
python version = 2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
ansible-config dump --only-changed
TRANSFORM_INVALID_GROUP_CHARS(/opt/gmuniz/ansible.cfg) = always
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
CentOs-7
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
<!--- Paste example playbooks or commands between quotes below -->
```
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: add a host to a group
add_host:
name: localhost
groups: Not-Working
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
I expect the host to be added to the group either with the originally provided name or the replaced underscore name.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```
TASK [add a host to a group] *************************************************************************************************************************************************************************************
task path: /opt/gmuniz/add_host.yml:6
creating host via 'add_host': hostname=localhost
[WARNING]: A duplicate localhost-like entry was found (localhost). First found localhost was localhost
[WARNING]: Invalid characters were found in group names and automatically replaced, use -vvvv to see details
ERROR! Unexpected Exception, this is probably a bug: u'Not-Working'
```
| https://github.com/ansible/ansible/issues/58980 | https://github.com/ansible/ansible/pull/58982 | b0f38931b0e0b55db30a012e81683d380ea7a670 | a7b14ec1becb947cc290deebe309ef06a12d1f7e | 2019-07-11T13:32:26Z | python | 2019-07-11T17:49:49Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,976 | ["changelogs/fragments/59043-docker_container-nocopy.yml", "lib/ansible/modules/cloud/docker/docker_container.py"] | [docker_container][ansible 2.8] - missing Mount modes on volumes | ##### SUMMARY
Unable to use the mount mode :nocopy on volume
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
docker_container
##### ANSIBLE VERSION
```
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /var/lib/awx/venv/venv-Ansible-28-python27/lib/python2.7/site-packages/ansible
executable location = /var/lib/awx/venv/venv-Ansible-28-python27/bin/ansible
python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
N/A
```
##### OS / ENVIRONMENT
AWX 3.0/docker 1.13/ RHEL7.4
##### 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: start nexus_ihm services
docker_container:
name: nexus_ihm
image: '{{ docker_images.nexus_ihm.image }}:{{ docker_images.nexus_ihm.version }}'
state: started
recreate: yes
log_driver: json-file
restart_policy: 'unless-stopped'
hostname: nexus_ihm
env:
TZ: Europe/Paris
volumes:
- 'nfsdata:/nexus-data:nocopy'
- 'nfsbackup:/backup'
```
##### EXPECTED RESULTS
Beeing able to access the volume within the container like in :
```sh
[root@LX01665L ~]# docker run --rm -ti -v nfsdata:/test --name test alpine /bin/sh
/ # ls /test/
config.json init-stdin init-stdout
/ # exit
[root@LX01665L ~]# docker run --rm -ti -v nfsdata:/test:nocopy --name test alpine /bin/sh
/ # ls /test/
backup etc kar port
blobs generated-bundles keystores restore-from-backup
cache health-check lock tmp
db instances log upgrades
elasticsearch javaprefs orient
/ #
```
##### ACTUAL RESULTS
The task crash with (NB, accordingly to the documentation in https://docs.ansible.com/ansible/latest/modules/docker_container_module.html where it's not specified beeing usable ) :
```
fatal: [lx01665l.tb.uro.equant.com]: FAILED! => {"changed": false, "msg": "Found invalid volumes mode: nocopy"}
```
| https://github.com/ansible/ansible/issues/58976 | https://github.com/ansible/ansible/pull/59043 | 34a68fa0fb52128ec443830c49549adcf5d0edc6 | fa7c387f9b975aa3214d958732ed77824a0e2fcc | 2019-07-11T13:09:48Z | python | 2019-07-13T18:50:32Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,973 | ["changelogs/fragments/58973-luks_device_add-type-option.yml", "lib/ansible/modules/crypto/luks_device.py"] | Support creating LUKS2 container in luks_device 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 -->
Ansible by default only creates LUKS1 format devices. Considering LUKS2 extra features and age, I think it would be beneficial to allow users to create LUKS2 devices.
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
luks_device
##### ADDITIONAL INFORMATION
<!--- Describe how the feature would be used, why it is needed and what it would solve -->
For reliability, one should use either disk UUID's or labels. UUID's are (in my opinion) a hassle when it comes to using them in Ansible.
Enter labels. Labels can be the same across multiple hosts, and will be tied to the right disk/partition, even if sda1 suddenly becomes sdb1 after some hardware reconfiguration.
Now, the LUKS1 format, which Ansible creates by default with the `luks_device` module, does not support labels... Support was added with LUKS2.
It should be noted that, from what I can see, the module *does already support removing keys from LUKS2 format devices*.
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: create LUKS2 container
luks_device:
device: "/dev/loop0"
state: "present"
keyfile: "/vault/keyfile"
format: luks2
``` | https://github.com/ansible/ansible/issues/58973 | https://github.com/ansible/ansible/pull/61812 | 5eb5f740838d447287ed49533c76864247f731a7 | 5b3526535c9e2f9e117e73d8fbea24b6f9c849ef | 2019-07-11T11:43:46Z | python | 2019-09-11T18:45:33Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,942 | ["changelogs/fragments/59949-undeprecate-first-found-skip.yml", "lib/ansible/plugins/lookup/first_found.py"] | first_found error message recommends deprecated usage | ##### SUMMARY
<!--- Explain the problem briefly below -->
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
with_first_found lookup plugin
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/Users/jeff.geerling/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15 (default, Jul 23 2018, 21:27:06) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_NOCOWS(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = True
ANSIBLE_PIPELINING(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = True
ANSIBLE_SSH_CONTROL_PATH(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = /tmp/ansible-ssh-%%h-%
DEFAULT_LOAD_CALLBACK_PLUGINS(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = True
DEFAULT_ROLES_PATH(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = [u'/Users/jeff.geerling/Drop
DEFAULT_STDOUT_CALLBACK(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = yaml
RETRY_FILES_ENABLED(/Users/jeff.geerling/Dropbox/Development/GitHub/drupal-pi/ansible.cfg) = False
```
##### OS / ENVIRONMENT
macOS 10.14
##### STEPS TO REPRODUCE
Add a task that uses with_first_found:
```yaml
- name: Include non-existent-file.yml if it exists.
include_tasks: "{{ item }}"
with_first_found:
- files:
- non-existent-file.yml
tags: ['always']
```
Get error message:
```
TASK [Include non-existent-file.yml if it exists.] ************************************************************************
fatal: [10.0.100.136]: FAILED! =>
msg: 'No file was found when using first_found. Use the ''skip: true'' option to allow this task to be skipped if no files are found'
```
Change task to use recommended option:
```
- name: Include non-existent-file.yml if it exists.
include_tasks: "{{ item }}"
with_first_found:
- files:
- non-existent-file.yml
skip: true
tags: ['always']
```
```
TASK [Include non-existent-file.yml if it exists.] ************************************************************************
[DEPRECATION WARNING]: Use errors="ignore" instead of skip. This feature will be removed in version 2.12. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
```
##### EXPECTED RESULTS
Documentation for failed task includes a non-deprecated usage recommendation.
##### ACTUAL RESULTS
Documentation for failed task recommends a deprecated parameter which, when used, throws a deprecation warning.
Related to: https://github.com/ansible/ansible/issues/56713 (I'm not sure why that particular issue was closed, though. | https://github.com/ansible/ansible/issues/58942 | https://github.com/ansible/ansible/pull/60161 | c954c0727179064ce0ecf62336ec74173d36ec31 | 707e33793d683254a511cd1ec825df86a5121feb | 2019-07-10T19:50:05Z | python | 2019-08-08T18:55:11Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,940 | ["lib/ansible/modules/windows/win_domain_group_membership.ps1"] | win_domain_group_membership add fails with domain credentials | <!--- 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
win_domain_group_membership module gives error when you add members to the group when domain_username/domain_password specified. I am trying to run the module from a windows instance joined to the AD domain controller.
I can run the same from powershell and it works.
Once added the usernames to the group, win_domain_group_membership (pure option) can delete the user. Pure option is deleting the user properly but cannot add any user. I think somewhere in add part passing credentials are not working properly.
It works when run directly on domain controllers (no need for domain_username/password args).
##### 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_domain_group_membership
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.8.1
2.8.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. -->
OS is windows 2019 AWS base AMI
##### 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 UserName to GroupName
win_domain_group_membership:
domain_username: '{{ domain_username }}'
domain_password: '{{ domain_password }}'
name: groupName
members:
- "userName"
state: pure
```
<!--- 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: [3.00.00.00] => (item={'key': 'groupName, 'value': {'description': 'desc', 'path': 'OU=ra,OU=role,OU=Groups,OU=random'}}) => {
"added": [],
"ansible_loop_var": "item",
"changed": false,
"item": {
"key": "groupName",
"value": {
"description": "desc",
"path": "OU=ra,OU=role,OU=Groups,OU=random"
}
},
"members": [userName],
"removed": []
}
```
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```
The full traceback is:
The server has rejected the client credentials.
At line:55 char:21
+ ... up_member = Get-ADObject -Filter "SamAccountName -eq '$member' -and $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Get-ADObject], AuthenticationException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.Security.Authentication.AuthenticationException,Microsoft.ActiveDirectory.Management.Commands.GetADObject
ScriptStackTrace:
at <ScriptBlock>, <No file>: line 55
System.Security.Authentication.AuthenticationException: The server has rejected the client credentials. ---> System.ServiceModel.Security.SecurityNegotiationException: The server has rejected the client credentials. ---> System.Security.Authentication.InvalidCredentialException: The server has rejected the client credentials. ---> System.ComponentModel.Win32Exception: The logon attempt failed
--- End of inner exception stack trace ---
at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.ActiveDirectory.WebServices.Proxy.Resource.Get(Message request)
at Microsoft.ActiveDirectory.Management.AdwsConnection.SearchAnObject(ADSearchRequest request)
--- End of inner exception stack trace ---
at Microsoft.ActiveDirectory.Management.AdwsConnection.ThrowAuthenticationRelatedExceptionIfAny(CommunicationException exception)
at Microsoft.ActiveDirectory.Management.AdwsConnection.SearchAnObject(ADSearchRequest request)
at Microsoft.ActiveDirectory.Management.AdwsConnection.Search(ADSearchRequest request)
at Microsoft.ActiveDirectory.Management.ADWebServiceStoreAccess.Microsoft.ActiveDirectory.Management.IADSyncOperations.Search(ADSessionHandle handle, ADSearchRequest request)
at Microsoft.ActiveDirectory.Management.ADObjectSearcher.GetRootDSE()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetRootDSE()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetConnectedStore()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetCmdletSessionInfo()
at Microsoft.ActiveDirectory.Management.Commands.ADGetCmdletBase`3.ADGetCmdletBaseBeginCSRoutine()
at Microsoft.ActiveDirectory.Management.CmdletSubroutinePipeline.Invoke()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.BeginProcessing()
fatal: [3.00.00.00]: FAILED! => {
"changed": false,
"msg": "Unhandled exception while executing module: The server has rejected the client credentials."
}
PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************************
3.00.00.00 : ok=5 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
| https://github.com/ansible/ansible/issues/58940 | https://github.com/ansible/ansible/pull/58943 | e5e3486be647f317c5ad242196fe588bdfbbc12c | 681ab6515abb589174f04c884a4d1e21f2c6f356 | 2019-07-10T19:34:20Z | python | 2019-07-16T19:38:42Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,938 | ["changelogs/fragments/75540-warn-invalid-configured-vault-secret-files.yaml", "lib/ansible/cli/__init__.py", "test/integration/targets/ansible-vault/runme.sh"] | Ignore missing/failed vault ids in vault_identity_list | <!--- 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
Our ansible.cfg lists all well-known keys, but ansible-vault fails to run if any of the keys are missing. We only publish to our CI/respective user environments keys that are appropriate for that stack. This means that an operations person cannot run ansible without having access to all known environment's keys. To us, this makes the use of multiple vault ids not all that useful.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
ansible-vault
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.7.10
config file = /Users/dkimsey/ansible/ansible.cfg
configured module search path = ['/Users/dkimsey/ansible/library']
ansible python module location = /Users/dkimsey/.virtualenvs/ansible-2.7/lib/python3.7/site-packages/ansible
executable location = /Users/dkimsey/.virtualenvs/ansible-2.7/bin/ansible
python version = 3.7.3 (default, May 1 2019, 10:48:04) [Clang 10.0.0 (clang-1000.11.45.5)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
DEFAULT_VAULT_IDENTITY_LIST(/Users/dkimsey/ansible/ansible.cfg) = ['qa@~/.vault-qa', 'stg@~/.vault-staging', 'prod@~/.vault-production']
```
##### 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 -->
<!--- Paste example playbooks or commands between quotes below -->
```
$ echo "my-secret-key" > ~/.vault-staging
$ ansible-vault encrypt_string --vault-id=stg --name client
```
<!--- 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'd expect it to skip missing vault keys. Maybe log it in verbose mode that it tried to access and failed.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```
ansible-vault 2.7.10
config file = /Users/dkimsey/ansible/ansible.cfg
configured module search path = ['/Users/dkimsey/ansible/library']
ansible python module location = /Users/dkimsey/.virtualenvs/ansible-2.7/lib/python3.7/site-packages/ansible
executable location = /Users/dkimsey/.virtualenvs/ansible-2.7/bin/ansible-vault
python version = 3.7.3 (default, May 1 2019, 10:48:04) [Clang 10.0.0 (clang-1000.11.45.5)]
Using /Users/dkimsey/ansible/ansible.cfg as config file
ERROR! The vault password file /Users/dkimsey/.vault-qa was not found
```
| https://github.com/ansible/ansible/issues/58938 | https://github.com/ansible/ansible/pull/75540 | 47ee28222794010ec447b7b6d73189eed1b46581 | 8bbecc7cac96203fedf99953a06eb32d74c7a4d7 | 2019-07-10T17:25:50Z | python | 2021-11-01T15:15:50Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,933 | ["test/integration/targets/azure_rm_loadbalancer/tasks/main.yml"] | azure_rm_loadbalancer intergration test target causing resource leakage on azure cloud | <!--- 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_loadbalancer intergration test target causing resource leakage on azure cloud
The specific task to create lb with multiple options is for some reason causing resource leakage on azure cloud account used for ansible-ci testing
The exact reason is still unknown but I want to try to make sure it can get fixed with same task doing operation on two separate lb instead on named ^lbname
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
azure_rm_loadbalancer integration test
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/abehl/.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.16 (default, Apr 30 2019, 15:54:43) [GCC 9.0.1 20190312 (Red Hat 9.0.1-0.10)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
<!--- Paste example playbooks or commands between quotes below -->
```yaml
Running ansible-ci on azure_rm_loadbalancer integration target causes this
In this case PublicIP is is tried to be deleted while LB attached to it
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
Systematic deletion of LB > PublicIP should happen and allow LB and PublicIP to be deleted
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
Public IP address /subscriptions/6d22db98-3e5f-4ab9-bdf9-2f911a2775f7/resourceGroups/ansible-core-ci-prod-a50bbaf0-0315-4286-815e-2c877e8d4b64-1/providers/Microsoft.Network/publicIPAddresses/pipa26c0a5f585 can not be deleted since it is still allocated to resource /subscriptions/6d22db98-3e5f-4ab9-bdf9-2f911a2775f7/resourceGroups/ansible-core-ci-prod-a50bbaf0-0315-4286-815e-2c877e8d4b64-1/providers/Microsoft.Network/loadBalancers/lbc26c0a5f581/frontendIPConfigurations/frontendipconf0.
```
| https://github.com/ansible/ansible/issues/58933 | https://github.com/ansible/ansible/pull/58936 | 15d76d97a94b50d9764cbdf4e5353625f41dc1a5 | 00d7aed56bdbc554dc26b4a32c77e4e9f92cc4ad | 2019-07-10T15:47:17Z | python | 2019-07-10T18:20:35Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,923 | ["changelogs/fragments/63194-lineinfile_insertafter_duplicate.yaml", "lib/ansible/modules/files/lineinfile.py", "test/integration/targets/lineinfile/files/firstmatch.txt", "test/integration/targets/lineinfile/files/test_58923.txt", "test/integration/targets/lineinfile/tasks/main.yml"] | lineinfile is not idempotent | <!--- 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 -->
lineinfile repeatedly inserts the same line
Reversion of https://github.com/ansible/ansible/pull/49409
##### ISSUE TYPE
- Bug report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
lineinfile
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.2
config file = /Users/stuart/git/productmadness/ansible/aws/atlassian/ansible.cfg
configured module search path = ['/Users/stuart/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.8.2/libexec/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.4 (default, Jul 9 2019, 18:13:23) [Clang 10.0.1 (clang-1001.0.46.4)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
DEFAULT_HOST_LIST(/Users/stuart/git/productmadness/ansible/aws/atlassian/ansible.cfg) = ['/Users/stuart/git/productmadness/ansible/aws/ansible_hosts.py']
HOST_KEY_CHECKING(/Users/stuart/git/productmadness/ansible/aws/atlassian/ansible.cfg) = False
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
master is OSX 10.14.5
Target is Centos 7.6.1810
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
use lineinfile with
insertafter and regexp
According to the docs if regexp matches insertafter is ignored
c.f. https://docs.ansible.com/ansible/latest/modules/lineinfile_module.html
viz
>The regular expression to look for in every line of the file.
>For state=present, the pattern to replace if found. Only the last line found will be replaced.
>For state=absent, the pattern of the line(s) to remove.
>If the regular expression is not matched, the line will be added to the file in keeping with insertbefore or insertafter settings.
>When modifying a line the regexp should typically match both the initial state of the line as well as its state after replacement by line to ensure idempotence.
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Set JVM opts
lineinfile:
path: /opt/atlassian/crucible/bin/start.sh
insertafter: '^#!/bin/sh'
regexp: ^export FISHEYE_OPTS
firstmatch: true
line: export FISHEYE_OPTS="-Xmx4096m -Xms2048m"
```
<!--- 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 that the line to be inserted after #!/bin/bash if it does not exist and to be left alone if it does
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
Evey time I run the playbook the line is added again after #!/bin/bash
<script src="https://gist.github.com/mutt13y/49c90c10430f4117d6bbbcb3e6e8a70e.js"></script>
```paste below
cat /opt/atlassian/crucible/bin/start.sh
#!/bin/sh
export FISHEYE_OPTS="-Xmx4096m -Xms2048m"
export FISHEYE_OPTS="-Xmx4096m -Xms2048m"
export FISHEYE_OPTS="-Xmx4096m -Xms2048m"
export FISHEYE_OPTS="-Xmx4096m -Xms2048m"
case "`uname`" in
Darwin*) if [ -z "$JAVA_HOME" ] ; then
```
| https://github.com/ansible/ansible/issues/58923 | https://github.com/ansible/ansible/pull/63194 | b7a9d99cefe15b248ebc11162529d16babd28d7f | 3b18337cac332e24bb2bcdca3f4a4451770efc68 | 2019-07-10T13:06:32Z | python | 2019-10-08T14:01:36Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,889 | ["changelogs/fragments/clean_facts_values.yml", "lib/ansible/vars/clean.py"] | Using set_fact for ansible_password exposes password with warning | <!--- 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
We deploy to both Linux and Windows servers. For Linux servers, we use ssh with key pairs, then sudo to become the target user. For Windows servers, we use winrm/ntlm with a common ID and have to supply a password. The password needs to be set in a vault. The ansible_password variable cannot be set globally because it breaks the ssh key/pair logins. Our solution was to create a variable that goes in the vault named WIN_PASS. The gather_facts stage fails on the Windows servers the ansible_password isn't set. So we start our playbook by setting ansible_password for those servers using set_fact and gather_facts: no. This works without warning. However, when we proceed to the next play, we get a warning at the play level: **[WARNING]: Removed restricted key from module data: ansible_password = ...**. The variable still contains the password and the tasks successfully authenticate with the windows host. The only issue is that the warning exposes the password. I have seen this issue reported and duplicated several times (for example: set_fact ansible_ssh_common_args fails #37535), but all are now closed.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
task_executor.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.7.10
config file = /<custompath>/ansible.cfg
configured module search path = [u'/<custompath>/ansible_core/ansible/modules', u'/<custompath>/ansible/ansible_cust/modules']
ansible python module location = /<custompath>/ansible_core/ansible
executable location = /<custompath>/ansible_core/bin/ansible
python version = 2.7.15 (default, May 3 2019, 15:19:10) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
[plays]$ ansible-config dump --only-changed
CACHE_PLUGIN(/<custompath>/ansible/ansible.cfg) = memory
DEFAULT_ACTION_PLUGIN_PATH(/<custompath>/ansible/ansible.cfg) = [u'/<custompath>/ansible/ansibl
DEFAULT_CALLBACK_PLUGIN_PATH(/<custompath>/ansible/ansible.cfg) = [u'/<custompath>/ansible/ansi
DEFAULT_CALLBACK_WHITELIST(/<custompath>/ansible/ansible.cfg) = [u'q_callback:service_callback']
DEFAULT_FACT_PATH(/<custompath>/ansible/ansible.cfg) = /<custompath>/facts
DEFAULT_FORKS(/<custompath>/ansible/ansible.cfg) = 50
DEFAULT_GATHER_TIMEOUT(/<custompath>/ansible/ansible.cfg) = 20
DEFAULT_HASH_BEHAVIOUR(/<custompath>/ansible/ansible.cfg) = merge
DEFAULT_INVENTORY_PLUGIN_PATH(/<custompath>/ansible/ansible.cfg) = [u'/<custompath>/ansible/ans
DEFAULT_MODULE_PATH(/<custompath>/ansible/ansible.cfg) = [u'/<custompath>/ansible_core/ansible/
DEFAULT_MODULE_UTILS_PATH(/<custompath>/ansible/ansible.cfg) = [u'/<custompath>/ansible/ansible
DEFAULT_ROLES_PATH(/<custompath>/ansible/ansible.cfg) = [u'/<custompath>/ansible/roles', u'/opt
HOST_KEY_CHECKING(/<custompath>/ansible/ansible.cfg) = False
INVENTORY_ENABLED(/<custompath>/ansible/ansible.cfg) = [u'test_inv', u'host_list', u'script', u'yam
(END)
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
RHEL 6.10 and Windows 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
---
- name: Prime Windows Facts
hosts: conv
gather_facts: no
roles:
- <role>
tasks:
- set_fact:
ansible_password: "{{ WIN_PASS }}"
cacheable: yes
- name: Debug something
hosts: conv,dmgr
tasks:
- debug:
msg: "{{ ansible_system }}"
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
We don't see the password
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
PLAY [Prime Windows Facts] ****************************************************************************
TASK [<role>: Including Passwords] *********************************************************
ok: [<host>] => {
"msg": "Including Passwords for <env>"
}
TASK [<role> : include Environment Passwords] ***********************************************
ok: [<host>]
TASK [<role> : fact cache windows password] *************************************************
ok: [<host>]
TASK [set_fact] ***************************************************************************************
ok: [<host>]
PLAY [Debug something] ********************************************************************************
[WARNING]: Removed restricted key from module data: ansible_password = REDACTED
TASK [Gathering Facts] ********************************************************************************
ok: [<host>]
ok: [<host>
TASK [debug] ******************************************************************************************
ok: [<host>] => {
"msg": "Win32NT"
}
ok: [<host>] => {
"msg": "Linux"
}
``` | https://github.com/ansible/ansible/issues/58889 | https://github.com/ansible/ansible/pull/76974 | eb093ae7c30f2c18ca53c84b7833ea53ee2f1e04 | 47faa6e206ccd697b4050062147a5d3242435597 | 2019-07-09T21:06:29Z | python | 2022-02-08T16:27:40Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,876 | ["changelogs/fragments/58876-do-not-reuse-remote_user-from-prev-loop.yaml", "lib/ansible/executor/task_executor.py"] | assigning variable to remote_user in loop only works first time | <!--- Verify first that your issue is not already reported on GitHub -->
it is not
<!--- 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 have a loop which tries to assign a user to remote_user in my playbook. The first assignment works, subsequent ones do not and the first assignment is used in subsequent iterations of the loop
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
ssh connection plugin perhaps? or the calling of it
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/bi003do/.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, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 30
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
target OS is AWS Linux instances of various flavors
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
run the following playbook using inventory file with a single known linux host with user: ec2-user
```ini
[test]
xxx.xxx.xxx.xxx
```
<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
- hosts: test
gather_facts: false
tasks:
- name: try users
remote_user: "{{ item }}"
ping:
ignore_unreachable: true
failed_when: false
with_items:
- centos
- ec2-user
- root
```
<!--- 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 loop 3 times trying to ping with the 3 users listed in with_items above
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
```
ansible-playbook TryUsers.yml -i inventory -vvvv
First iteration
<xxx.xxx.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: centos
Second iteration
<xxx.xxx.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: centos
third iteration
<xxx.xxx.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: centos
```
<!--- Paste verbatim command output between quotes -->
```
bi003do@usbou-ansible TryUsers]$ ansible-playbook TryUsers.yml -i inventory
PLAY [test] *********************************************************************************************************************************************************************************
TASK [try users] ****************************************************************************************************************************************************************************
failed: [xxx.xxx.xxx.xxx] (item=centos) => {"ansible_loop_var": "item", "item": "centos", "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}
failed: [10.5.162.71] (item=root) => {"ansible_loop_var": "item", "item": "root", "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}
failed: [10.5.162.71] (item=ec2-user) => {"ansible_loop_var": "item", "item": "ec2-user", "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}
fatal: [10.5.162.71]: UNREACHABLE! => {"changed": false, "msg": "All items completed", "results": [{"ansible_loop_var": "item", "item": "centos", "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}, {"ansible_loop_var": "item", "item": "root", "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}, {"ansible_loop_var": "item", "item": "ec2-user", "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}], "skip_reason": "Host 10.5.162.71 is unreachable"}
PLAY RECAP **********************************************************************************************************************************************************************************
10.5.162.71 : ok=0 changed=0 unreachable=1 failed=0 skipped=1 rescued=0 ignored=0
```
| https://github.com/ansible/ansible/issues/58876 | https://github.com/ansible/ansible/pull/59024 | da047eec59e8e8f0555053d850ae2b7bfb2ef8ab | a752e2a4670f3b87a570f03d9b2719f8412ad575 | 2019-07-09T16:26:35Z | python | 2019-07-19T06:39:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,868 | ["changelogs/fragments/reboot-add-last-boot-time-parameter.yaml", "lib/ansible/modules/system/reboot.py", "lib/ansible/modules/windows/win_reboot.py", "lib/ansible/plugins/action/reboot.py"] | reboot module hangs with OpenVZ hosts | ##### SUMMARY
Currently there is some issue with the reboot module with OpenVZ hosts. The reboot command is executed correctly, all hosts reboots, but the Ansible reboot tasks hangs.
If exactly the same playbook is run on KVM or native host, it finish without any issues.
It should be hot fixed in 2.7+ branches.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
reboot module
##### ANSIBLE VERSION
2.7
##### CONFIGURATION
Debian 9.9 / Ansible 2.8
##### OS / ENVIRONMENT
Debian 9.9
##### STEPS TO REPRODUCE
Trigger this reboot handler on OpenVZ hosts
```
- name: Reboot system
reboot:
reboot_timeout: 1200
post_reboot_delay: 5
connect_timeout: 2
listen: handler_reboot
```
##### EXPECTED RESULTS
Reboot is executed and once the host is back online, task is marked as changed and the execution of the playbook continues.
##### ACTUAL RESULTS
```
...
RUNNING HANDLER [shared_handlers : Reboot system] ********
```
(and no more output, the Ansible playbook hangs) | https://github.com/ansible/ansible/issues/58868 | https://github.com/ansible/ansible/pull/62680 | 617fbad7435703ee5bd628f1530818147ccb44d6 | 2b7393141fa29e607b43166a6bd8e2916cd2091f | 2019-07-09T12:43:59Z | python | 2020-01-21T18:42:32Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,841 | ["changelogs/fragments/75244-fix-templated-handler-names.yaml", "lib/ansible/plugins/strategy/__init__.py", "test/integration/targets/handlers/58841.yml", "test/integration/targets/handlers/roles/import_template_handler_names/tasks/main.yml", "test/integration/targets/handlers/roles/template_handler_names/handlers/main.yml", "test/integration/targets/handlers/roles/template_handler_names/tasks/evaluation_time.yml", "test/integration/targets/handlers/roles/template_handler_names/tasks/lazy_evaluation.yml", "test/integration/targets/handlers/runme.sh"] | var is suddenly not defined between tasks | <!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below -->
When running a task var is defined in shell task, undefined in notify
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
notify, loop, var, include_role
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/usr/share/ansible_modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Mar 26 2019, 22:13:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
ALLOW_WORLD_READABLE_TMPFILES(/etc/ansible/ansible.cfg) = True
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=240s
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 100
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/ansible_modules']
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/var/lib/awx/projects/_394__ansiblerepo/roles', u'/var/lib/awx/projects/_414__t02058_ivr_billing/roles']
DEFAULT_SCP_IF_SSH(/etc/ansible/ansible.cfg) = True
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 600
INVALID_TASK_ATTRIBUTE_FAILED(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Red Hat Enterprise Linux Server release 7.6 (Maipo)
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
<!--- Paste example playbooks or commands between quotes below -->
```
##Playbook
- hosts: mygroup
tasks:
- debug:
msg: Starting all Apps
- name: Load apps Variables
include_vars: AppsList.yml
tags:
- start
- bounce
- include_role:
name: "{{ web.appname }}"
apply:
ignore_errors: yes
vars:
appname: "{{ web.appname }}"
loop: "{{ apps }}"
loop_control:
loop_var: web
when: apps is defined
ignore_errors: yes
tags:
- start
- bounce
## AppsList.yml
apps:
- { appname: App1}
- { appname: App2 }
##Role included in loop
- name: get pid
shell: "ps -ef | grep -w {{ appname }} "
register: ServicePid
tags:
- start
##Task is fine
- name: Register Bounce variable
debug:
msg: This task paired with the next triggers a bounce with bounce tag, but skips the bounce without it, preserving idempotency
verbosity: 5
register: Bounce
ignore_errors: "{{ ansible_check_mode }}"
tags:
- start
- name: Notify start - if nothing changed or we want to bounce and still not running
debug:
msg: Not Running - Starting App
changed_when: true
notify: "restart {{ appname }}"
when: Bounce is not defined or ServicePid.stdout == ""
tags:
- bounce
- start
##task fails - ERROR! 'appname' is undefined
```
<!--- 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 that 'appname' will be defined inside the loop for all tasks.
this worked in Ansible 2.7
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```ok: [host] => {
"changed": false,
"cmd": "ps -ef | grep -w App1|
"delta": "0:00:00.115077",
"end": "2019-07-08 16:34:32.173968",
"invocation": {
"module_args": {
"_raw_params": "ps -ef | grep -w App1
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2019-…
TASK [webservice/SoapServiceStatus : Register Bounce variable] *****************
task path: /var/lib/awx/projects/_394__ansiblerepo/playbooks/roles/webservice/SoapServiceStatus/tasks/main.yml:10
ok: [host
] => {
"msg": "This task paired with the next triggers a bounce with bounce tag, but skips the bounce without it, preserving idempotency"
}
TASK [webservice/SoapServiceStatus : Notify start - if nothing changed or we want to bounce and still not running] ***
task path: /var/lib/awx/projects/_394__ansiblerepo/playbooks/roles/webservice/SoapServiceStatus/tasks/main.yml:19
ERROR! 'appname' is undefined
```
[Role.txt](https://github.com/ansible/ansible/files/3370349/Role.txt)
[AppsList.txt](https://github.com/ansible/ansible/files/3370350/AppsList.txt)
[play.txt](https://github.com/ansible/ansible/files/3370351/play.txt) | https://github.com/ansible/ansible/issues/58841 | https://github.com/ansible/ansible/pull/75244 | d8dcfe737a841c2075581c13f1f2a5f20397d3ea | c8d413164d2a7f76376792bb0028000909ac68b7 | 2019-07-08T21:58:27Z | python | 2021-08-03T19:16:19Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,834 | ["test/runner/completion/docker.txt"] | Update default test container to Python 3.8.0b2 | <!--- Verify first that your feature was not already discussed on GitHub -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
Python 3.8.0b2 is [released](https://www.python.org/downloads/release/python-380b2/). We should update the default test container with this version.
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
`shippable.yml`
##### ADDITIONAL INFORMATION
<!--- Describe how the feature would be used, why it is needed and what it would solve -->
This release [reverted a C API breaking change](https://github.com/python/cpython/pull/13959) in Beta 1. | https://github.com/ansible/ansible/issues/58834 | https://github.com/ansible/ansible/pull/58877 | 0befccbeb96d388574249b65849c84cddeaae915 | 5ccd674dba810dbbe0622b764c4d06f2814cbb56 | 2019-07-08T17:18:37Z | python | 2019-07-09T21:44:16Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,820 | ["changelogs/fragments/58820-use-templated-loop_var-in-include_tasks.yaml", "lib/ansible/executor/task_executor.py", "lib/ansible/playbook/included_file.py", "test/integration/targets/loops/tasks/main.yml", "test/integration/targets/loops/tasks/templated_loop_var_tasks.yml"] | Templated loop_var not defined when looping include_tasks | <!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below -->
When looping `include_tasks`, the loop control `loop_var` property is not defined in the included task, when the `loop_var` property has been assigned with a template.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
- loop_var
- include_tasks
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /playbooks/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.3 (default, Jun 11 2019, 01:05:09) [GCC 6.3.0 20170516]
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Redhat7
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
---
# main.yml
- hosts: localhost
vars:
loop_var_name: custom_var
tasks:
- include_tasks: looped-include.yml
loop:
- first
- second
loop_control:
loop_var: "{{ loop_var_name }}"
```
```yaml
---
# looped-include.yml
- name: Print looped var
debug:
var: custom_var
- name: Loop default item var
debug:
var: item
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
We expect the variabe `custom_var` to be the looped variable, and `item` to be undefined.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Neither `custom_var` nor `item` are defined in the looped included task.
<!--- Paste verbatim command output between quotes -->
```paste below
PLAY [localhost] *****************************************************************************************
TASK [Gathering Facts] ***********************************************************************************
ok: [localhost]
included: /ansible-bug/looped-include.yml for localhost
included: /ansible-bug/looped-include.yml for localhost
TASK [Print looped var] **********************************************************************************
ok: [localhost] =>
custom_var: VARIABLE IS NOT DEFINED!
TASK [Loop default item var] *****************************************************************************
ok: [localhost] =>
item: VARIABLE IS NOT DEFINED!
TASK [Print looped var] **********************************************************************************
ok: [localhost] =>
custom_var: VARIABLE IS NOT DEFINED!
TASK [Loop default item var] *****************************************************************************
ok: [localhost] =>
item: VARIABLE IS NOT DEFINED!
```
| https://github.com/ansible/ansible/issues/58820 | https://github.com/ansible/ansible/pull/58866 | ad490573306864f8596f9e9af49e69f70d8f15d0 | 7346b699eec99d7279da4175b99f07e08f0de283 | 2019-07-08T09:51:03Z | python | 2019-07-10T11:49:24Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,813 | ["lib/ansible/modules/cloud/univention/udm_dns_record.py"] | udm_dns_record module has incorrect module info | <!--- 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
udm_dns_record contains probably copy&paste info from udm_dns_zone module, see https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/univention/udm_dns_record.py#L64 Thus it's confusing how to use it, if one uses 'udm_dns_zone' in her playbook it would fail because invalid values.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
udm_dns_record module
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.7.7
config file = /home/jiri/awebsys/ansible/ansible.cfg
configured module search path = ['/home/jiri/.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.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0]
```
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
```
$ ansible-doc udm_dns_record | sed -n '/^EXAMPLES/,$p'
EXAMPLES:
# Create a DNS record on a UCS
- udm_dns_zone:
name: www
zone: example.com
type: host_record
data:
- a: 192.0.2.1
RETURN VALUES:
#
```
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
Should have valid example data. | https://github.com/ansible/ansible/issues/58813 | https://github.com/ansible/ansible/pull/58814 | 88ec5e14cb9edd780d15e763ed89cad47e095174 | 1f427249d5ed66d597400cf719083bd4ce1848fb | 2019-07-08T06:07:48Z | python | 2019-07-09T07:22:02Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,808 | ["changelogs/fragments/58808-mail-add-date-header.yaml", "lib/ansible/modules/notification/mail.py"] | mail module should send email with "Date" header | <!--- 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
mail module does not send email with Date header. It should send email with "Date" header automatically without any manual email header manipulation.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
mail
##### ANSIBLE VERSION
```
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/yclee/.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.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
```
##### CONFIGURATION
(None)
##### OS / ENVIRONMENT
Ubuntu 18.04
##### STEPS TO REPRODUCE
N/A
##### EXPECTED RESULTS
email should have Date headers
##### ACTUAL RESULTS
email did not have Date headers and I have to manually insert it
| https://github.com/ansible/ansible/issues/58808 | https://github.com/ansible/ansible/pull/59080 | de66abe52182bc124ffbd0ef0559375d471c79fe | f0eaf1fb397e0123852e2c87bca9f3809b1ed167 | 2019-07-08T03:59:31Z | python | 2019-07-16T14:55:59Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,788 | ["lib/ansible/module_utils/network/ios/providers/cli/config/bgp/neighbors.py"] | ios_bgp next-hop-self does not add command | <!--- 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 setting `next_hop_self: true` within the AF Neighbors, this does not get set.
##### 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_bgp
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = None
configured module search path = ['/Users/joshv/.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.2 (default, Feb 10 2019, 15:44:18) [Clang 10.0.0 (clang-1000.11.45.5)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
➜ ansible-config dump --only-changed
Time: 0h:00m:15s
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
MacOS --> Cisco IOS
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
- Created a playbook with `next_hop_self` set to true, it was not added
- Output shows that the neighbor is activated twice
- Checked `neighbors.py` file, the `next_hop_self` section is just a copy of the `activate` section (lines 165-172)
``` python
def _render_next_hop_self(self, item, config=None):
cmd = 'neighbor %s activate' % item['neighbor']
if item['next_hop_self'] is False:
if not config or cmd in config:
cmd = 'no %s' % cmd
return cmd
elif not config or cmd not in config:
return cmd
```
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: "PLAY 3: Setup R4"
hosts: r4
become: yes
become_method: enable
tags: router_setup
tasks:
- name: "TASK 1: Setup BGP Peers"
ios_bgp:
config:
bgp_as: 65500
router_id: 10.0.0.4
log_neighbor_changes: true
neighbors:
- neighbor: 192.0.2.5
remote_as: 65510
timers:
keepalive: 15
holdtime: 45
min_neighbor_holdtime: 5
description: R2 Uplink
- neighbor: 198.51.100.1
remote_as: 65500
timers:
keepalive: 15
holdtime: 45
min_neighbor_holdtime: 5
description: R3 conenction
networks:
- prefix: 0.0.0.0
masklen: 0
address_family:
- afi: ipv4
safi: unicast
redistribute:
- protocol: eigrp
id: "20"
metric: 10
neighbors:
- neighbor: 198.51.100.1
activate: yes
next_hop_self: yes
operation: override
register: output
```
<!--- 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'd expect that the command `neighbor 198.51.100.1 next-hop-self` would be in the commands
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
`neighbor 198.51.100.1 activate` was sent twice
<!--- Paste verbatim command output between quotes -->
```paste below
ok: [r4] => {
"msg": {
"changed": true,
"commands": [
"no router bgp 65500",
"router bgp 65500",
"bgp router-id 10.0.0.4",
"bgp log-neighbor-changes",
"neighbor 192.0.2.5 remote-as 65510",
"neighbor 192.0.2.5 timers 15 45 5",
"neighbor 192.0.2.5 description R2 Uplink",
"neighbor 198.51.100.1 remote-as 65500",
"neighbor 198.51.100.1 timers 15 45 5",
"neighbor 198.51.100.1 description R3 conenction",
"network 0.0.0.0",
"address-family ipv4",
"redistribute eigrp 20 metric 10",
"neighbor 198.51.100.1 activate",
"neighbor 198.51.100.1 activate",
"exit-address-family",
"exit"
],
"failed": false
}
}
```
| https://github.com/ansible/ansible/issues/58788 | https://github.com/ansible/ansible/pull/58789 | faf50dbace25d0236f8019d114c214c61fff3f55 | 73db7e290143c9b167fa9d5d7f801262347f713b | 2019-07-06T18:24:00Z | python | 2019-07-06T20:39:10Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,775 | ["changelogs/fragments/58965-npm-validate-option-types.yml", "lib/ansible/modules/packaging/language/npm.py", "test/sanity/validate-modules/ignore.txt"] | npm module gives completely cryptic, useless error when you list multiple packages under name: | <!--- 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
npm doesn't allow "name" arg to be list, gives completely useless, cryptic error when it is
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
npm
##### ANSIBLE VERSION
```paste below
ansible 2.8.1
config file = /home/jik/src/family-orchestration/ansible.cfg
configured module search path = [u'/home/jik/.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.16 (default, Apr 6 2019, 01:42:57) [GCC 8.3.0]
```
##### CONFIGURATION
```paste below
ANSIBLE_PIPELINING(/home/jik/src/family-orchestration/ansible.cfg) = True
DEFAULT_HOST_LIST(/home/jik/src/family-orchestration/ansible.cfg) = [u'/home/jik
DEFAULT_REMOTE_USER(/home/jik/src/family-orchestration/ansible.cfg) = root
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Both console and remote ansible host are Ubuntu 19.04 amd64.
##### STEPS TO REPRODUCE
<!--- Paste example playbooks or commands between quotes below -->
```yaml
----
- hosts: localhost
tasks:
- npm:
name:
- eslint
- eslint-scope
```
##### EXPECTED RESULTS
The listed npm packages are installed in a two npm invocations (one to determine which are installed, one to install the missing ones).
##### ACTUAL RESULTS
Completely incomprehensible "ValueError: No JSON object could be decoded" error that doesn't tell you anything about what you're doing wrong or how to fix it. | https://github.com/ansible/ansible/issues/58775 | https://github.com/ansible/ansible/pull/58965 | fbb4eaaba90890c2b58972a5eae210a4df49b89f | 6f94995b52ec93477b398e28a36ab2b2b99205ae | 2019-07-05T17:41:29Z | python | 2019-07-17T04:04:58Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,769 | ["changelogs/fragments/58769-template-included-handler-names.yml", "lib/ansible/plugins/strategy/__init__.py"] | Hang while executing handler when handler is included and notifies another handler | ##### SUMMARY
I'll start by saying that this is a bit of a weird one. It seems that when a handler task is included from another handler and notifies yet another handler, ansible generates spurious warnings and then hangs.
Just to confuse things even more, if you remove the variable reference in `name` OR the `notify` from `bar_handler_tasks.yml`, ansible executes normally.
Another thing to note is that this code (or something very much like it) apparently worked properly in Ansible 2.7.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
handlers
##### ANSIBLE VERSION
```
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/agaffney/.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.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
```
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
N/A
##### STEPS TO REPRODUCE
`bar.yml`:
```yaml
- hosts: localhost
gather_facts: no
handlers:
- name: play handler 1
include_tasks: bar_handler_tasks.yml
- name: play handler 2
debug:
msg: play handler 2
tasks:
- name: trigger handler 1
debug:
msg: trigger handler 1
changed_when: true
notify: play handler 1
```
`bar_handler_tasks.yml`:
```yaml
- name: included handler 1 {{ inventory_hostname }}
debug:
msg: included handler 1
- name: included handler 2
debug:
msg: whatever
changed_when: true
notify: play handler 2
```
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
##### ACTUAL RESULTS
```
PLAY [localhost] **************************************************************************************************************************************************************************************************************************************************************
TASK [trigger handler 1] ******************************************************************************************************************************************************************************************************************************************************
changed: [localhost] => {
"msg": "trigger handler 1"
}
RUNNING HANDLER [play handler 1] **********************************************************************************************************************************************************************************************************************************************
included: /tmp/ansible_test/kiwiirc/bar_handler_tasks.yml for localhost
RUNNING HANDLER [included handler 1 {{ inventory_hostname }}] *****************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "included handler 1"
}
RUNNING HANDLER [included handler 2] ******************************************************************************************************************************************************************************************************************************************
[WARNING]: 'inventory_hostname' is undefined
RUNNING HANDLER [included handler 2] ******************************************************************************************************************************************************************************************************************************************
[ERROR]: User interrupted execution
```
| https://github.com/ansible/ansible/issues/58769 | https://github.com/ansible/ansible/pull/58780 | 982a36c915cd776536092b593f06ae2a1ef2462a | d1afcbced1c7c2de63a5b01d9fbd59e98d7fb117 | 2019-07-05T14:58:43Z | python | 2019-07-10T18:53:56Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,752 | ["changelogs/fragments/58752_argument_aliases.yml", "lib/ansible/module_utils/basic.py", "test/units/module_utils/basic/test_argument_spec.py"] | Unsupported parameters message doesn't show aliases | #### ISSUE TYPE
- Bug Report
#### SUMMARY
In anisble playbook we can specify ‘aliases’ for certain parameters if available
But if we do say a typo in the parameter name then playbooks fails with "Unsupported parameter"
the message “Unsupported parameters..” shows all the parameters that are supported, but these doesn’t include the aliases.
Code:
Say module has the following
```
zone_member_spec = dict(
pwwn=dict(required=True, type='str', aliases=['device-alias']),
devtype=dict(type='str', choices=['initiator', 'target', 'both']),
remove=dict(type='bool', default=False)
)
```
The parameter 'pwwn' has alias 'device-alias', but the error shown is
```
fatal: [m9250i-107]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (nxos_zone_zoneset) module: dxevice-alias found in zone_zoneset_details -> zone -> members. Supported parameters include: devtype, pwwn, remove"}
```
Here I expected “Supported parameters include: devtype, pwwn/device-alias, remove”
```
ansible 2.8.1.post0
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 = /root/suhas_ansible_project/withGit/ansible/lib/ansible
executable location = /root/suhas_ansible_project/withGit/ansible/bin/ansible
python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
``` | https://github.com/ansible/ansible/issues/58752 | https://github.com/ansible/ansible/pull/69427 | 5260527c4a71bfed99d803e687dd19619423b134 | e439194c8c4190936553c4c653a2cd939faaabb7 | 2019-07-05T09:45:54Z | python | 2020-07-23T10:32:18Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,746 | ["changelogs/fragments/58746-hcloud_server_allow_rescue_mode.yml", "lib/ansible/modules/cloud/hcloud/hcloud_server.py", "test/integration/targets/hcloud_server/tasks/main.yml"] | hcloud_server misses a way to put a server in rescue mode | <!--- 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 -->
Atm, there is no way to put the server in rescue mode
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
hcloud_server
##### ADDITIONAL INFORMATION
<!--- Describe how the feature would be used, why it is needed and what it would solve -->
Atm, Since I can use the hetzner api, I'm using the following code to put it into rescue:
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Enable rescue
uri:
url: "https://api.hetzner.cloud/v1/servers/{{ item }}/actions/enable_rescue"
method: POST
status_code: 201
body_format: json
body:
type: "linux64"
ssh_keys: [341997]
headers:
Content-Type: "application/json"
Authorization: "Bearer {{ hostvars['localhost']['hetzner_api_token'] }}"
with_items:
- "{{ server_id }}"
```
<!--- HINT: You can also paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/58746 | https://github.com/ansible/ansible/pull/60070 | 85f7a7e848a7402f93318bfec9562b155b6e02cd | 100b56439ee0fb779f049c1cd61ebb305a6bb5ce | 2019-07-05T07:51:38Z | python | 2019-08-17T09:29:58Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,728 | ["changelogs/fragments/gather_subset_defaults.yml", "lib/ansible/playbook/play.py"] | 'gather_subset' setting in ansible.cfg and ansible/roles are ignored | ##### SUMMARY
'gather_subset' setting in ansible.cfg and ansible/roles are ignored
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
fact gathering
##### ANSIBLE VERSION
```
ansible 2.8.1
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, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
```
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = %(directory)s/ans-ssh-%%h-%%p-%%r
ANSIBLE_SSH_RETRIES(/etc/ansible/ansible.cfg) = 1
DEFAULT_CALLBACK_WHITELIST(/etc/ansible/ansible.cfg) = [u'profile_tasks', u'grafana_annotations']
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 500
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = smart
DEFAULT_GATHER_SUBSET(/etc/ansible/ansible.cfg) = [u'!hardware', u'!ohai', u'!facter', u'!virtual', u'!network']
DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 10
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = [u'/etc/ansible/inventory']
DEFAULT_SCP_IF_SSH(/etc/ansible/ansible.cfg) = True
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 15
```
##### OS / ENVIRONMENT
```
CentOS Linux release 7.6.1810 (Core)
```
##### STEPS TO REPRODUCE
```
I have the following settings in my ansible.cfg:
...
gathering = smart
gather_subset = min
...
and also tried to set following within my role:
...
- name: 'test fact gahtering'
setup:
gather_subset: 'min'
...
but still all facts are gathered during a playbook run.
"ansible_virtualization_role": "guest",
"ansible_virtualization_type": "xen",
"gather_subset": [
"all"
As a workaround I set the default value to 'min' within:
"/usr/lib/python2.7/site-packages/ansible/modules/system/setup.py".
That works.
def main():
module = AnsibleModule(
argument_spec=dict(
gather_subset=dict(default=["min"], required=False, type='list'),
```
##### EXPECTED RESULTS
gather_subset setting should be loaded from ansible.cfg or within role if set.
##### ACTUAL RESULTS
gather_subset within ansible.cfg and role are ignored and all facts are gathered
```
"ansible_virtualization_role": "guest",
"ansible_virtualization_type": "xen",
"gather_subset": [
"all"
```
| https://github.com/ansible/ansible/issues/58728 | https://github.com/ansible/ansible/pull/59271 | aa0de421d2948c6552770534381e58d6acae7997 | 8a886a6bee30fbb29835558f939a585007eaec67 | 2019-07-04T12:50:18Z | python | 2019-07-22T21:59:22Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,721 | ["lib/ansible/modules/cloud/vmware/vmware_guest.py", "test/integration/targets/vmware_guest/tasks/clone_resize_disks.yml", "test/integration/targets/vmware_guest/tasks/main.yml"] | VMware: vmware_guest throws vmdk already exists | <!--- 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 -->
vmware_guest throws error that vmdk already exists although it does not. It is created during running the module but somehow fails.
pyvmomi-6.7.1.2018.12
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
vmware_guest
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.8.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: Create new VM
vmware_guest:
hostname: "{{ vcenter_hostname }}"
esxi_hostname: "{{ esxi_host }}"
username: '{{domain_user}}'
password: "{{ domain_user_password }}"
validate_certs: False
datacenter: TM
name: "{{ vm_hostname }}"
folder: "{{ vm_destination }}"
state: poweredon
disk:
- size_gb: '{{ disk_size }}'
type: thin
autoselect_datastore: True
hardware:
memory_mb: "{{ memory }}"
num_cpus: "{{ cores }}"
num_cpu_cores_per_socket: "{{ cores }}"
networks:
- name: LAN
domain: "{{ domain }}"
dns_servers:
- "{{ dns1 }}"
- "{{ dns2 }}"
type: static
ip: "{{ ip }}"
netmask: 255.255.254.0
gateway: 192.168.1.5
customization:
autologon: True
hostname: "{{ vm_hostname }}"
domain: "{{ domain }}"
password: vagrant
domainadmin: "{{ domain_user }}"
domainadminpassword: "{{ domain_user_password }}"
joindomain: "{{ domain }}"
timezone: 105
runonce:
- powershell.exe -ExecutionPolicy Unrestricted -File C:\StartupScripts\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert -EnableCredSSP
- powershell.exe -ExecutionPolicy Unrestricted -File C:\StartupScripts\DisableFirewall.ps1
wait_for_customization: yes
template: "{{ vm_template }}"
wait_for_ip_address: yes
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
Should just create the VM.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
Failed to create a virtual machine : Cannot complete the operation because the file or folder [EL02] ********/********.vmdk already exists"
```
| https://github.com/ansible/ansible/issues/58721 | https://github.com/ansible/ansible/pull/58737 | b6273e91cfbcf3f9c9ab849b6803c6a8a3aa7c3d | 3a5d13b0d761bb5ac5a83d14daa37848e72ec857 | 2019-07-04T09:16:34Z | python | 2019-07-15T04:39:54Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,714 | ["changelogs/fragments/psrp-reconnection.yaml", "lib/ansible/plugins/connection/psrp.py"] | PSRP documentation has wrong parameter name | <!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
The [PSRP documentation](https://docs.ansible.com/ansible/latest/plugins/connection/psrp.html) mentions `ansible_psrp_connection_backoff` but this seems to be incorrect. The code appears to refer to `ansible_psrp_reconnection_backoff` instead (`reconnection` vs `connection`).
<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->
##### ISSUE TYPE
- Documentation Report
##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
PSRP
lib/ansible/plugins/connection/psrp.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.0.dev0
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/local/lib/python2.7/dist-packages/ansible-2.8.0.dev0-py2.7.egg/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
None
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. OS version, browser, etc. -->
Linux, Ubuntu 18.04.2 LTS
##### ADDITIONAL INFORMATION
<!--- Describe how this improves the documentation, e.g. before/after situation or screenshots -->
None.
<!--- HINT: You can paste gist.github.com links for larger files --> | https://github.com/ansible/ansible/issues/58714 | https://github.com/ansible/ansible/pull/59369 | a20afb58221d0991b2374916eeb963d58bf52069 | 9ff26a4a22defc05d4a6ba9e650f74670067a51a | 2019-07-04T08:30:17Z | python | 2019-07-22T19:55:52Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,691 | ["changelogs/fragments/win_get_url-proxy-not-used.yml", "lib/ansible/modules/windows/win_get_url.ps1"] | win_get_url doesn't use the proxy even if proxy_url is specified | ##### SUMMARY
`win_get_url` doesn't use the proxy even if `proxy_url` is specified. Therefore, if I execute a `win_get_url` task under a proxy restricted network, it fails with 407 error (Proxy Authentication Required).
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
win_get_url
##### ANSIBLE VERSION
```console
$ ansible --version
ansible 2.8.1
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.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
```
##### CONFIGURATION
```console
$ ansible-config dump --only-changed
ANSIBLE_NOCOWS(/mnt/c/Users/user/tmp/ansible-bug/ansible.cfg) = True
INJECT_FACTS_AS_VARS(/mnt/c/Users/user/tmp/ansible-bug/ansible.cfg) = False
RETRY_FILES_ENABLED(/mnt/c/Users/user/tmp/ansible-bug/ansible.cfg) = False
```
##### OS / ENVIRONMENT
Control machine is Ubuntu 18.04 on WSL.
```console
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
```
Installed pip libraries
```console
$ pip list --format=columns
Package Version
------------- ---------
ansible 2.8.1
asn1crypto 0.24.0
certifi 2019.6.16
chardet 3.0.4
cryptography 2.1.4
enum34 1.1.6
gyp 0.1
httplib2 0.9.2
idna 2.6
ipaddress 1.0.17
Jinja2 2.10
keyring 10.6.0
keyrings.alt 3.0
MarkupSafe 1.0
ntlm-auth 1.3.0
paramiko 2.0.0
pip 9.0.1
pyasn1 0.4.2
pycrypto 2.6.1
pygobject 3.26.1
python-apt 1.6.4
pywinrm 0.3.0
pyxdg 0.25
PyYAML 3.12
requests 2.22.0
requests-ntlm 1.1.0
SecretStorage 2.3.1
setuptools 39.0.1
six 1.11.0
urllib3 1.25.3
wheel 0.30.0
xmltodict 0.12.0
```
Target machine is Windows 10.
- Edition: Windows 10 Pro
- Version: 1809
- Installation Date: 2019/02/07
- OS Build: 17763.379
##### STEPS TO REPRODUCE
Inventory file (`hosts`) is as below.
```ini
[windows10]
localhost
[windows10:vars]
ansible_port=5986
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
ansible_user=domain\user
ansible_password=********
ansible_winrm_transport=ntlm
```
Playbook (`test.yml`) is as below.
```yaml
- hosts: windows10
gather_facts: no
tasks:
- name: Download file via proxy
win_get_url:
url: https://github.com/ansible/ansible/archive/v2.8.1.zip
dest: "%TEMP%"
proxy_url: http://proxy.example.com:8080
proxy_username: proxyuser
proxy_password: ********
```
I applied a playbook like this, it fails with 407 error.
```console
$ ansible-playbook -vvv -i hosts test.yml
ansible-playbook 2.8.1
config file = /mnt/c/Users/user/tmp/ansible-bug/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-playbook
python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
Using /mnt/c/Users/user/tmp/ansible-bug/ansible.cfg as config file
host_list declined parsing /mnt/c/Users/user/tmp/ansible-bug/hosts as it did not pass it's verify_file() method
script declined parsing /mnt/c/Users/user/tmp/ansible-bug/hosts as it did not pass it's verify_file() method
auto declined parsing /mnt/c/Users/user/tmp/ansible-bug/hosts as it did not pass it's verify_file() method
Parsed /mnt/c/Users/user/tmp/ansible-bug/hosts inventory source with ini plugin
PLAYBOOK: test.yml ************************************************************************************************************************************************************************************************
1 plays in test.yml
PLAY [windows10] **************************************************************************************************************************************************************************************************
META: ran handlers
TASK [Download file via proxy] ************************************************************************************************************************************************************************************
task path: /mnt/c/Users/user/tmp/ansible-bug/test.yml:4
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_get_url.ps1
Pipelining is enabled.
<localhost> ESTABLISH WINRM CONNECTION FOR USER: domain\user on PORT 5986 TO localhost
EXEC (via pipeline wrapper)
The full traceback is:
The remote server returned an error: (407) Proxy Authentication Required.
At line:107 char:9
+ $web_response = $web_request.GetResponse()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], WebException
+ FullyQualifiedErrorId : WebException
ScriptStackTrace:
at Invoke-AnsibleWebRequest, <No file>: line 107
at Invoke-DownloadFile, <No file>: line 311
at <ScriptBlock>, <No file>: line 406
fatal: [localhost]: FAILED! => {
"changed": false,
"dest": "C:\\Users\\user\\AppData\\Local\\Temp\\v2.8.1.zip",
"elapsed": 0,
"invocation": {
"module_args": {
"checksum": null,
"checksum_algorithm": "sha1",
"checksum_url": null,
"dest": "C:\\Users\\user\\AppData\\Local\\Temp",
"force": true,
"force_basic_auth": false,
"headers": {},
"proxy_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"proxy_url": "http://proxy.example.com:8080",
"proxy_username": "proxyuser",
"timeout": 10,
"url": "https://github.com/ansible/ansible/archive/v2.8.1.zip",
"url_password": null,
"url_username": null,
"use_proxy": true,
"validate_certs": true
}
},
"msg": "Error requesting 'https://github.com/ansible/ansible/archive/v2.8.1.zip'. The remote server returned an error: (407) Proxy Authentication Required.",
"status_code": 407,
"url": "https://github.com/ansible/ansible/archive/v2.8.1.zip"
}
PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
##### EXPECTED RESULTS
`win_get_url` uses a proxy configuration and download a file successfully.
##### ACTUAL RESULTS
`win_get_url` doesn't use a proxy configuration and fails with 407 error.
| https://github.com/ansible/ansible/issues/58691 | https://github.com/ansible/ansible/pull/58738 | 60fb9fc208adebdc10c8a0f5ff1b3d61f8d6516d | 48a518d9a32aec2be834e88084e36a9924403115 | 2019-07-03T22:35:39Z | python | 2019-07-04T21:42:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,630 | ["lib/ansible/modules/network/aci/aci_maintenance_group_node.py"] | "aci_maintenance_group_node" module errors out with "KeyError: 'target_filter'" | <!--- 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
Manually editing "aci_maintenance_group_node.py" and replacing all instances of "filter_target" with "target_filter" resolves the error and the play completes successfully.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
aci_maintenance_group_node
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/nturner/.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.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
<!--- Paste example playbooks or commands between quotes below -->
```yaml
Any run of this module should experience failure due to incorrect Python coding,
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
The full traceback is:
Traceback (most recent call last):
File "/home/nturner/.ansible/tmp/ansible-tmp-1562072839.15-205495106365568/AnsiballZ_aci_maintenance_group_node.py", line 114, in <module>
_ansiballz_main()
File "/home/nturner/.ansible/tmp/ansible-tmp-1562072839.15-205495106365568/AnsiballZ_aci_maintenance_group_node.py", line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/nturner/.ansible/tmp/ansible-tmp-1562072839.15-205495106365568/AnsiballZ_aci_maintenance_group_node.py", line 49, in invoke_module
imp.load_module('__main__', mod, module, MOD_DESC)
File "/tmp/ansible_aci_maintenance_group_node_payload_zjFM9y/__main__.py", line 234, in <module>
File "/tmp/ansible_aci_maintenance_group_node_payload_zjFM9y/__main__.py", line 208, in main
File "/tmp/ansible_aci_maintenance_group_node_payload_zjFM9y/ansible_aci_maintenance_group_node_payload.zip/ansible/module_utils/network/aci/aci.py", line 460, in construct_url
File "/tmp/ansible_aci_maintenance_group_node_payload_zjFM9y/ansible_aci_maintenance_group_node_payload.zip/ansible/module_utils/network/aci/aci.py", line 500, in _construct_url_2
KeyError: 'target_filter'
```
| https://github.com/ansible/ansible/issues/58630 | https://github.com/ansible/ansible/pull/58675 | 36add6e86f65366ae5efc602f59fb8af1b0980bb | f3bde056b51d9227ec8f8b6570b7c35b949a2a1d | 2019-07-02T13:14:42Z | python | 2019-08-27T13:10:47Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,609 | ["lib/ansible/modules/system/aix_filesystem.py"] | aix_filesystem.py - fail_json() missing msg= | <!--- 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 passed invalid data, a number of functions in `lib/ansible/modules/system/aix_filesystem.py` are running fail_json() without `msg=` on the error message itself, generating: `TypeError: exit_json() takes exactly 1 argument (4 given)` when attempting to fail.
ie:
```python2
def resize_fs(module, filesystem, size):
....
module.fail_json("Failed to run chfs.", rc=rc, err=err)
....
def mount_fs(module, filesystem):
...
module.fail_json("Failed to run mount.", rc=rc, err=err)
...
def unmount_fs(module, filesystem):
...
module.fail_json("Failed to run unmount.", rc=rc, err=err)
...
```
To fulfil function requirements, kwargs should be:
```python2
def resize_fs(module, filesystem, size):
....
module.fail_json(msg="Failed to run chfs.", rc=rc, err=err)
....
def mount_fs(module, filesystem):
...
module.fail_json(msg="Failed to run mount.", rc=rc, err=err)
...
def unmount_fs(module, filesystem):
...
module.fail_json(msg="Failed to run unmount.", rc=rc, err=err)
...
```
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
aix_filesystem.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.0
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 = /bin/ansible
python version = 2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -o ForwardAgent=no
COMMAND_WARNINGS(/etc/ansible/ansible.cfg) = True
DEFAULT_BECOME(/etc/ansible/ansible.cfg) = True
DEFAULT_FORCE_HANDLERS(/etc/ansible/ansible.cfg) = True
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
DEFAULT_KEEP_REMOTE_FILES(env: ANSIBLE_KEEP_REMOTE_FILES) = True
DEFAULT_MANAGED_STR(/etc/ansible/ansible.cfg) = This file is managed by ansible - local changes will be lost! - Last Updated {{ now(fmt='%Y/%m/%d - %H:%M:%S %z(%Z)') }}
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = root
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles/internal', u'/etc/ansible/roles/external']
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = True
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = True
SYSTEM_WARNINGS(/etc/ansible/ansible.cfg) = True
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
AIX
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Run module with the above invalid data, such as mounting a filesystem which does not exist.
<!--- Paste example playbooks or commands between quotes below -->
```yaml
ansible HOSTNAME -i /etc/ansible/test.ini -m aix_filesystem -a "filesystem=/mnt/exp1 state=mounted"
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
With a fix in place in `mount_fs()` :
```
if rc != 0:
module.fail_json(msg="Failed to run mount.", rc=rc, err=err)
```
```
{"msg": "Failed to run mount.", "failed": true, "rc": 1, "err": "mount: /mnt/exp1 is not a known file system\n", "invocation": {"module_args": {"size": null, "vg": null, "rm_mount_point": false, "auto_mount": true, "account_subsystem": false, "mount_group": null, "state": "mounted", "fs_type": "jfs2", "filesystem": "/mnt/exp1", "device": "lv_exp1", "nfs_server": null, "attributes": ["agblksize='4096'", "isnapshot='no'"], "permissions": "rw"}}}
```
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Using current code:
```
if rc != 0:
print(err)
module.fail_json("Failed to run mount.", rc=rc, err=err)
```
<!--- Paste verbatim command output between quotes -->
```paste below
Traceback (most recent call last):
File "__main__.py", line 579, in <module>
main()
File "__main__.py", line 561, in main
result['changed'], result['msg'] = mount_fs(module, filesystem)
File "__main__.py", line 430, in mount_fs
module.fail_json("Failed to run mount.", rc=rc, err=err)
TypeError: fail_json() takes exactly 1 argument (4 given)
```
| https://github.com/ansible/ansible/issues/58609 | https://github.com/ansible/ansible/pull/58642 | adea964c3e58a30118a6b4a5a45a835b4f3b68a8 | 75724bb7cabcdd78eed0ee3435b056e75db315ee | 2019-07-01T21:12:46Z | python | 2019-07-11T18:23:18Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,592 | ["lib/ansible/modules/cloud/vmware/vmware_guest_disk.py", "test/integration/targets/vmware_guest_disk/aliases", "test/integration/targets/vmware_guest_disk/tasks/main.yml"] | vmware_guest_disk: add disk_mode parameter | <!--- 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 -->
vmware_guest_disk should propose `disk_mode` parameter (like vmware_guest module).
The playbook bellow does not raise an error but disk is always added in `persistent` mode, even I set `independent_persistent` for `disk_mode` var.
If it's a bug please could you fix it? If it's not consider it as a feature request :)
##### ISSUE TYPE
- Feature Idea (or maybe a bug)
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
vmware_guest_disk
##### 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
---
- name: get vm {{ target | upper }} facts
vmware_guest_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter }}"
validate_certs: no
name: "{{ target | upper }}"
register: vm_facts
delegate_to: localhost
- name: add disk to vm {{ target | upper }}
vmware_guest_disk:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter }}"
validate_certs: no
name: "{{ target | upper }}"
disk:
- size_gb: "{{ size_gb }}"
type: "{{ type }}"
disk_mode: "{{ disk_mode }}"
scsi_controller: "{{ scsi_controller }}"
unit_number: "{{ unit_number }}"
datastore: "{{ vm_facts.instance.hw_datastores | first }}"
delegate_to: localhost
```
<!--- HINT: You can also paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/58592 | https://github.com/ansible/ansible/pull/60406 | 1aca1f86b6037def60bf7460c0c702fe7fdd21ac | 513bddb44ad2840155cdd66ff42e9b9074632053 | 2019-07-01T15:03:30Z | python | 2019-09-05T15:52:12Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,578 | ["changelogs/fragments/58812-support_absolute_paths_additionally.yml", "lib/ansible/modules/cloud/misc/terraform.py"] | terraform plan_file custom path broken | <!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/misc/terraform.py#L353 expects the plan_file to be a filename not a path to a file.inside of project_path. Works with relative paths but not with absolute paths. Lucky for me I use a path inside project_path but it worked before with paths outside too.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
terraform
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /home/adam/.ansible.cfg
configured module search path = ['/home/adam/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/adam/.local/lib/python3.6/site-packages/ansible
executable location = /home/adam/.local/bin/ansible
python version = 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
```
##### 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
use absolute path for plan_file
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
uses the filepath provided
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
TASK [run terraform apply] ***************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not find plan_file \"/home/.../plan.tfplan\", check the path and try again."}
```
| https://github.com/ansible/ansible/issues/58578 | https://github.com/ansible/ansible/pull/58812 | 663171e21820f1696b93c3f182626b0fd006b61b | e711d01ed1337b28578a7ccc3d114b2641c871a8 | 2019-07-01T08:40:00Z | python | 2019-12-21T11:49:38Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,562 | ["lib/ansible/module_utils/basic.py"] | File module may crash when setting mode on a symlink, if it points to a read-only filesystem | ##### SUMMARY
When using a module attempts to set the mode of a symlink, and the symlink target points to a read-only filesystem, then it may crash with an `OSError: [Errno 30] Read-only file system`.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
`file` module, due to `ansible/module_utils/basic.py` line 1117, in a `module.set_mode_if_different(…)` call.
https://github.com/ansible/ansible/blob/35dcd231be4f0afe2e1ee7a53769b3de1cc5222f/lib/ansible/module_utils/basic.py#L1101-L1122
##### ANSIBLE VERSION
```
ansible 2.8.1
python version = 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]
```
##### OS / ENVIRONMENT
OS on target host: Linux (or any platform where [`os.lchmod()` does not exist](https://mail.python.org/pipermail/docs/2011-February/003119.html)).
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
- hosts: all
tasks:
- copy:
dest: /tmp/fs.img
content: "{{ '_' * 1048576 }}"
- filesystem:
type: vfat
dev: /tmp/fs.img
- mount:
state: mounted
path: /mnt/readonly_fs
src: /tmp/fs.img
fstype: vfat
opts: ro
- name: This succeeds
file:
state: link
path: /tmp/some_symlink
src: /mnt/readonly_fs/nonexistent
follow: false
force: true
mode: 0757
- name: This crashes
file:
state: link
path: /tmp/some_other_symlink
src: /mnt/readonly_fs
follow: false
force: true
mode: 0757
```
##### EXPECTED RESULTS
The play should not fail, since `follow: false` should mean that the `chmod` only operates on `/tmp/some_symlink`, and never should never care about where it points.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
PLAY [all] ******************************************************************************************
TASK [Gathering Facts] ******************************************************************************
ok: [target.example.org]
TASK [copy] *****************************************************************************************
changed: [target.example.org]
TASK [filesystem] ***********************************************************************************
changed: [target.example.org]
TASK [mount] ****************************************************************************************
changed: [target.example.org]
TASK [This succeeds] ********************************************************************************
changed: [target.example.org]
TASK [This crashes] *********************************************************************************
fatal: [target.example.org]: FAILED! => {
"changed": false,
"module_stderr": "Shared connection to target.example.org closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1561877445.915763-155915524570611/AnsiballZ_file.py\", line 114, in <module>\r\n _ansiballz_main()\r\n File \"/root/.ansible/tmp/ansible-tmp-1561877445.915763-155915524570611/AnsiballZ_file.py\", line 106, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/root/.ansible/tmp/ansible-tmp-1561877445.915763-155915524570611/AnsiballZ_file.py\", line 49, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/usr/lib/python3.6/imp.py\", line 235, in load_module\r\n return load_source(name, filename, file)\r\n File \"/usr/lib/python3.6/imp.py\", line 170, in load_source\r\n module = _exec(spec, sys.modules[name])\r\n File \"<frozen importlib._bootstrap>\", line 618, in _exec\r\n File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n File \"/tmp/ansible_file_payload_r219es0e/__main__.py\", line 921, in <module>\r\n File \"/tmp/ansible_file_payload_r219es0e/__main__.py\", line 909, in main\r\n File \"/tmp/ansible_file_payload_r219es0e/__main__.py\", line 742, in ensure_symlink\r\n File \"/tmp/ansible_file_payload_r219es0e/ansible_file_payload.zip/ansible/module_utils/basic.py\", line 1339, in set_fs_attributes_if_different\r\n File \"/tmp/ansible_file_payload_r219es0e/ansible_file_payload.zip/ansible/module_utils/basic.py\", line 1112, in set_mode_if_different\r\nOSError: [Errno 30] Read-only file system: b'/tmp/some_other_symlink'\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP ******************************************************************************************
target.example.org : ok=5 changed=4 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
| https://github.com/ansible/ansible/issues/58562 | https://github.com/ansible/ansible/pull/58564 | 6e9bcc2579a988571abe1a83c6ca31ae1f2bd4d4 | a9fcd1d197037387ccefec714b317e8034b396b1 | 2019-06-30T07:02:52Z | python | 2019-07-02T15:15:39Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,541 | ["lib/ansible/module_utils/vmware.py", "lib/ansible/modules/cloud/vmware/vmware_guest.py", "test/lib/ansible_test/_internal/cloud/vcenter.py"] | vmware_guest: autoselect_datastore=True should select a datatore reachable on the ESXi | ##### SUMMARY
The following snippet from https://github.com/ansible/ansible/blob/devel/test/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml uses `autoselect_datastore: True`.
```yaml
- name: create new VMs
vmware_guest:
validate_certs: False
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: newvm_1
#template: "{{ item|basename }}"
guest_id: centos64Guest
datacenter: "{{ dc1 }}"
hardware:
num_cpus: 1
num_cpu_cores_per_socket: 1
memory_mb: 256
hotadd_memory: true
hotadd_cpu: false
max_connections: 10
disk:
- size: 1gb
type: thin
autoselect_datastore: True
state: poweredoff
folder: F0
```
One of my two datastores is dedicated to the ISO image and so, is readOnly. But it still get selected consistently. I use the following hack to avoid the problem:
```diff
diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py
index 6a63e97798..3648e3e87f 100644
--- a/lib/ansible/modules/cloud/vmware/vmware_guest.py
+++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py
@@ -1925,6 +1925,15 @@ class PyVmomiHelper(PyVmomi):
datastore_freespace = 0
for ds in datastores:
+ is_readonly = False
+ for h in ds.host:
+ if h.mountInfo.accessMode == 'readOnly':
+ is_readonly = True
+ break
+
+ if is_readonly:
+ continue
+
if (ds.summary.freeSpace > datastore_freespace) or (ds.summary.freeSpace == datastore_freespace and not datastore):
# If datastore field is provided, filter destination datastores
if 'datastore' in self.params['disk'][0] and \
```
<!--- 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 -->
vmware_guest
| https://github.com/ansible/ansible/issues/58541 | https://github.com/ansible/ansible/pull/58872 | 57dc7ec265bbc741126fa46e44ff3bb6adae5624 | 647b78a09cc45df0c25eaf794c06915f3e2ee9c5 | 2019-06-29T02:40:20Z | python | 2019-08-09T02:26:52Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,511 | ["changelogs/fragments/win_find-fix-ignore-of-deduped-files.yml", "lib/ansible/modules/windows/win_find.ps1", "lib/ansible/modules/windows/win_find.py"] | win_find module not returning deduplicated files |
##### SUMMARY
Using the win_find module against a Windows share it is not returning some files. In this case .exe files.
The .exe files are deduplicated and looking at their properties in Windows explorer, they appear as something like this:
'Size: 100MB'
'Size on disk: 0 bytes'.
win_find is successfully returning other (non deduplicated) files from the same directory and it is showing the correct number of files in the directory (the number of files including the deduplicated .exe files).
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
win_find.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
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 = /root/playbooks/ansible-venv/lib/python2.7/site-packages/ansible
executable location = /root/playbooks/ansible-venv/bin/ansible
python version = 2.7.5 (default, Jun 11 2019, 12:19:05) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### 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. -->
Ansible Server: RHEL7
Target Host: Win20126
Share Server: Win2016
##### 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: Get list of exes from share with deduplication
debugger: always
win_find:
paths: \\server\share\
patterns: '*.exe' # When uncommented this returns no files from the share.
# When commented it returns everything but the deduplicated files (exes in this case)
# The debug output then shows the list of files found plus; "examined": 29, "matched": 13
# Still missing the exe files from the output...
user_name: user
user_password: pass
register: list_of_exes
become: true
become_method: runas
vars:
ansible_become_user: '{{ ansible_user }}'
ansible_become_pass: '{{ ansible_password }}'
- debug:
var: list_of_exes
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
Would expect the results to include the deduplicated files
```
TASK [debug] ********************************************************************************************************
ok: [169.254.0.1] => {
"list_of_exes": {
"changed": false,
"examined": 29,
"failed": false,
"files": [...],
"matched": 13
}
}
```
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Playbook executes ok but does not return the deduplicated files.
<!--- Paste verbatim command output between quotes -->
```paste below
TASK [debug] ********************************************************************************************************
ok: [169.254.0.1] => {
"list_of_exes": {
"changed": false,
"examined": 29,
"failed": false,
"files": [],
"matched": 0
}
}
```
| https://github.com/ansible/ansible/issues/58511 | https://github.com/ansible/ansible/pull/58680 | 8def67939dbd5dbba84fe160f3ad187c76ebe63a | 99796dfa87731b5dc210e7649bfe09664c99ffcd | 2019-06-28T16:17:37Z | python | 2019-09-16T00:02:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,493 | ["lib/ansible/modules/system/cron.py"] | cron does not allow to remove a cron_file without user anymore | ##### SUMMARY
Removing a cron_file is no longer possible since 2.8 without specifying the user parameter.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
cron
##### ANSIBLE VERSION
```paste below
ansible 2.8.1
config file = /home/duck/OSPO/community-cage-infra-ansible/ansible.cfg
configured module search path = ['/home/duck/OSPO/community-cage-infra-ansible/library']
ansible python module location = /home/duck/.local/lib/python3.7/site-packages/ansible
executable location = /home/duck/.local/bin/ansible
python version = 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0]
```
##### CONFIGURATION
```paste below
ANSIBLE_FORCE_COLOR(env: ANSIBLE_FORCE_COLOR) = True
ANSIBLE_PIPELINING(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=30m
CACHE_PLUGIN(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ./facts_cache
CACHE_PLUGIN_TIMEOUT(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = 86400
DEFAULT_ACTION_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/actio
DEFAULT_CALLBACK_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/cal
DEFAULT_CONNECTION_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/c
DEFAULT_FILTER_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/filte
DEFAULT_FORKS(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = 10
DEFAULT_GATHERING(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = smart
DEFAULT_HASH_BEHAVIOUR(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/hosts.yml']
DEFAULT_LOOKUP_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/looku
DEFAULT_MANAGED_STR(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = Ansible managed
DEFAULT_MODULE_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/library']
DEFAULT_ROLES_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/roles']
DEFAULT_STRATEGY_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/str
DEFAULT_TIMEOUT(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = 40
DEFAULT_VARS_PLUGIN_PATH(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = ['/home/duck/OSPO/community-cage-infra-ansible/plugins/vars']
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /home/duck/.ansible_vault/cage.txt
ERROR_ON_MISSING_HANDLER(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = True
PARAMIKO_HOST_KEY_AUTO_ADD(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = True
PERSISTENT_CONNECT_TIMEOUT(/home/duck/OSPO/community-cage-infra-ansible/ansible.cfg) = 1800
```
##### OS / ENVIRONMENT
Ansible runs on Debian unstable and the node is using Debian Stretch.
##### STEPS TO REPRODUCE
The following worked before 2.8 and now fails.
```yaml
- name: remove useless backup cron
cron:
cron_file: backup-postgresql-databases
state: absent
```
##### EXPECTED RESULTS
There is no reason to request the user when deleting the contab file thus it should continue to work as before 2.8.
I would dare to say a test is missing here.
##### ACTUAL RESULTS
```paste below
fatal: [catton.osci.io]: FAILED! => {"changed": false, "msg": "missing parameter(s) required by 'cron_file': user"}
```
| https://github.com/ansible/ansible/issues/58493 | https://github.com/ansible/ansible/pull/58751 | 709fbcf8043c9fc636d2404e61de0f76ef5bad9d | 61647731e28889cd5ebbf678e9f78aebae7ee812 | 2019-06-28T08:58:17Z | python | 2019-07-05T13:02:29Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,467 | ["lib/ansible/module_utils/redfish_utils.py", "lib/ansible/modules/remote_management/redfish/idrac_redfish_command.py", "lib/ansible/modules/remote_management/redfish/idrac_redfish_config.py", "lib/ansible/modules/remote_management/redfish/redfish_command.py", "lib/ansible/modules/remote_management/redfish/redfish_config.py"] | Redfish commands need way to specify single system, manager or chassis | <!--- 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 -->
A number of the existing Redfish commands act on a single system, manager or chassis. But there is no option to specify which one to act on if there are multiple systems, managers or chassis in the service. Currently, in this case, the module will act on the first one in 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 -->
redfish_utils.py
redfish_config.py
redfish_command.py
##### ADDITIONAL INFORMATION
<!--- Describe how the feature would be used, why it is needed and what it would solve -->
Given the issue summarized above, it is impossible to issue certain commands to systems, managers and chassis beyond the first one that appears in the collection.
To solve this, the behavior will be updated as follows:
- New options to specify a particular system, manager or chassis will be added.
- For the impacted commands (see below), if there is exactly one system/manager/chassis resource in the service, act on that resource. Specifying the system/manager/chassis using the new options will not be required.
- In the case where there are multiple system/manager/chassis resources, the one to act on ~~must~~ should be specified using the new options. If one is not specified, ~~an error~~ a deprecation warning will be reported and ~~no action taken~~ the existing behavior of using the first resource in the collection will be used.
Here are the impacted commands.
Commands that act on a single **system**:
- Power* (PowerOn, PowerReboot, etc.)
- SetOneTimeBoot
- SetBiosDefaultSettings
- SetBiosAttributes
Commands that act on a single **manager**:
- GracefulRestart
- ClearLogs
Commands that act on a single **chassis**:
- IndicatorLedOn, IndicatorLedOff, IndicatorLedBlink
<!--- Paste example playbooks or commands between quotes below -->
An example of an existing playbook to reboot a system:
```yaml
- name: Reboot system power
redfish_command:
category: Systems
command: PowerReboot
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
```
An example of the playbook after adding a new option to specify the system to reboot:
```yaml
- name: Reboot system power
redfish_command:
category: Systems
command: PowerReboot
system_id: 437XR1138R2
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
```
**Note:**
When implementing this feature, but sure to fix any places that may result in errors like:
`The value Lit for the property IndicatorLED is not in the list of acceptable values`
`Key IndicatorLED not found`
<!--- HINT: You can also paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/58467 | https://github.com/ansible/ansible/pull/62921 | c3838b5d7340e0b6e2abae3fc17a38092fddff71 | 4349ab57779679d273a61cff88347a5416fac05e | 2019-06-27T16:05:09Z | python | 2019-10-31T22:09:48Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,463 | ["changelogs/fragments/58466-FIX_win_find-Bug-Get-FileStat_fails_on_large_files.yml", "lib/ansible/modules/windows/win_find.ps1"] | win_find failed to check some files, these files were ignored and will not be part of the result output | ##### SUMMARY
It appears that large folders break win_find when the size is too large to fit inside a System.Int32.
Further, win_find breaks as soon as a warning is encountered, causing it to no longer process folders.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
win_find.ps1
##### ANSIBLE VERSION
2.8.0
##### STEPS TO REPRODUCE
```
---
- name: Search for folders
win_find:
paths: C:\ProgramData
file_type: directory
```
##### ADDITIONAL INFO
Example of using the Get-FileStat function on a large folder.
PS C:\Windows\system32> $file = Get-Item -LiteralPath C:\ProgramData\Anaconda2 -Force
PS C:\Windows\system32> Get-FileStat -file $file
Cannot convert value "4444553383" to type "System.Int32". Error: "Value was either too large or too small for an Int32."
At line:186 char:13
[int]$specified_size = $matches[1]
CategoryInfo : InvalidArgument: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : InvalidCastFromStringToInteger
##### ACTUAL RESULTS
```
win_find failed to check some files, these files were ignored and will not be part of the result output
```
##### RECOMMENDED CHAGES
```
Function Assert-Size($info) {
$valid_match = $true
if ($null -ne $size) {
$bytes_per_unit = @{'b'=1; 'k'=1024; 'm'=1024*1024; 'g'=1024*1024*1024; 't'=1024*1024*1024*1024}
$size_pattern = '^(-?\d+)(b|k|m|g|t)?$'
$match = $size -match $size_pattern
if ($match) {
[int]$specified_size = $matches[1]
```
...................
TO
```
Function Assert-Size($info) {
$valid_match = $true
if ($null -ne $size) {
$bytes_per_unit = @{'b'=1; 'k'=1024; 'm'=1024*1024; 'g'=1024*1024*1024; 't'=1024*1024*1024*1024}
$size_pattern = '^(-?\d+)(b|k|m|g|t)?$'
$match = $size -match $size_pattern
if ($match) {
[int64]$specified_size = $matches[1]
```
| https://github.com/ansible/ansible/issues/58463 | https://github.com/ansible/ansible/pull/58466 | d361ff412282fe9b4c701aba85a7b4846a29ee21 | 8def67939dbd5dbba84fe160f3ad187c76ebe63a | 2019-06-27T15:32:52Z | python | 2019-09-15T23:04:59Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,456 | ["lib/ansible/modules/source_control/bitbucket/bitbucket_access_key.py"] | Bitbucket_access_key list object is not an iterator (python 2.7 compat) | <!--- 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
Invoking the 'bitbucket_access_key' of ansible 2.8 installed with pip 19.1 on python 2.7 (Ubuntu 14.04...) gives the following error.
```
line 114, in <module>\n _ansiballz_main()\n File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1561635678.17-267746543539506/AnsiballZ_bitbucket_access_key.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1561635678.17-267746543539506/AnsiballZ_bitbucket_access_key.py\", line 49, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_bitbucket_access_key_payload_yyexZQ/__main__.py\", line 285, in <module>\n File \"/tmp/ansible_bitbucket_access_key_payload_yyexZQ/__main__.py\", line 256, in main\n File \"/tmp/ansible_bitbucket_access_key_payload_yyexZQ/__main__.py\", line 169, in get_existing_deploy_key\nTypeError: list object is not an iterator\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
bitbucket_access_key module
##### ANSIBLE VERSION
```
/usr/local/lib/python2.7/dist-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,
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/ubuntu/.local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.6 (default, Nov 13 2018, 12:45:42) [GCC 4.8.4]
```
##### Patch
The following patch fixes the issue:
```
--- bitbucket_access_key.py.orig 2019-06-27 12:17:18.168641126 +0000
+++ bitbucket_access_key.py 2019-06-27 12:16:59.664723635 +0000
@@ -166,7 +166,7 @@
if info['status'] != 200:
module.fail_json(msg='Failed to retrieve the list of deploy keys: {0}'.format(info))
- res = next(filter(lambda v: v['label'] == module.params['label'], content['values']), None)
+ res = next(iter(filter(lambda v: v['label'] == module.params['label'], content['values'])), None)
if res is not None:
return res
```
| https://github.com/ansible/ansible/issues/58456 | https://github.com/ansible/ansible/pull/58816 | 5f9fe6b9c8336a24a81632ff4f7039dcf559f30d | 9797857a673c4eee253de54cd7e33c06b51e3dba | 2019-06-27T12:26:05Z | python | 2019-09-03T19:24:41Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,451 | ["lib/ansible/modules/files/file.py"] | file_module: Hardlink-Example should be corrected | <!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
Example for the hardlink uses wrong parameter - set to "link" / should be "hard"
<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->
##### ISSUE TYPE
- Documentation Report
##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
file modul
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.8
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. OS version, browser, etc. -->
##### ADDITIONAL INFORMATION
<!--- Describe how this improves the documentation, e.g. before/after situation or screenshots -->
<!--- HINT: You can paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/58451 | https://github.com/ansible/ansible/pull/58485 | 5937080977ae50823ee68ed5d87a6c4ad2433e29 | 184143e498f3c5541443e1e61f867bfecf4d165f | 2019-06-27T09:13:51Z | python | 2019-06-28T13:56:45Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,444 | ["changelogs/fragments/hostname-oracle-linux-regeression.yaml", "lib/ansible/modules/system/hostname.py"] | hostname module cannot be used on Oracle Linux | ##### SUMMARY
In devel branch, hostname module doesn't recognise Oracle Linux.
Regression from PR #56936 caused by PR #55459.
stable-2.8 branch is OK.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
hostname
##### ANSIBLE VERSION
```
2.9 / devel
```
##### CONFIGURATION
##### OS / ENVIRONMENT
```
$ head -n5 /etc/os-release
NAME="Oracle Linux Server"
VERSION="7.4"
ID="ol"
VERSION_ID="7.4"
PRETTY_NAME="Oracle Linux Server 7.4"
```
##### STEPS TO REPRODUCE
```yaml
- name: set hostname
hostname:
name: "mytesthostname"
```
##### EXPECTED RESULTS
```
changed: [myhost]
```
##### ACTUAL RESULTS
```
fatal: [myhost]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Oracle)"}
```
##### ANALYSIS
This is a **regression** from PR #56936 caused by PR #55459.
Relevant lines from PR #56936:
[lib/ansible/modules/system/hostname.py#L660](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/system/hostname.py#L660)
```
class OracleLinuxHostname(Hostname):
platform = 'Linux'
- distribution = 'Oracle'
+ distribution = 'Ol'
strategy_class = RedHatStrategy
```
But the update of bundled distro to 1.4.0 means that `Oracle` is now returned, not `Ol` (#55459):
[lib/ansible/module_utils/distro/_distro.py#L55](https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/distro/_distro.py#L55)
```
- NORMALIZED_OS_ID = {
+ NORMALIZED_OS_ID = {
+ 'ol': 'oracle', # Oracle Enterprise Linux
+ }
```
This was not picked up in testing when #56936 was merged into devel because there is no automated testing against Oracle Linux.
**How to fix** - simply revert as shown:
[lib/ansible/modules/system/hostname.py#L660](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/system/hostname.py#L660)
```
class OracleLinuxHostname(Hostname):
platform = 'Linux'
- distribution = 'Ol'
+ distribution = 'Oracle'
strategy_class = RedHatStrategy
```
**NB:** does not affect stable-2.8 because distro-1.4.0 is not included. | https://github.com/ansible/ansible/issues/58444 | https://github.com/ansible/ansible/pull/58510 | 393ea1cd55ece489d99e53ad317bbc8bbb3261db | 1a5ae366f49ed117cc32a8c7c5f447d2d346fd94 | 2019-06-27T05:07:09Z | python | 2019-06-28T16:24:03Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,436 | ["changelogs/fragments/58436-include-correct-error.yml", "lib/ansible/plugins/strategy/__init__.py"] | Wrong error repot | ##### SUMMARY
The error message for include task with wrong filename show the parent file (in my example ok.yml instead of typo.yml)
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
import_tasks
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
both
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/nirr/.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.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
and
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/nirr/.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.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_COW_SELECTION(/etc/ansible/ansible.cfg) = small
ANSIBLE_NOCOWS(/etc/ansible/ansible.cfg) = False
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
DEFAULT_BECOME_METHOD(/etc/ansible/ansible.cfg) = sudo
DEFAULT_BECOME_USER(/etc/ansible/ansible.cfg) = root
DEFAULT_CALLBACK_WHITELIST(/etc/ansible/ansible.cfg) = [u'timer']
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 80
DEFAULT_LIBVIRT_LXC_NOSECLABEL(/etc/ansible/ansible.cfg) = True
DEFAULT_LOAD_CALLBACK_PLUGINS(/etc/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /home/nirr/.ansible/ansible.log
DEFAULT_POLL_INTERVAL(/etc/ansible/ansible.cfg) = 15
DEFAULT_REMOTE_PORT(/etc/ansible/ansible.cfg) = 23
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = dev
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/tmp/roles', u'/etc/ansible/roles', u'/etc/roles']
DEFAULT_SCP_IF_SSH(/etc/ansible/ansible.cfg) = smart
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
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 -->
playbook under ./tmp.yml:
```yaml
---
- hosts: localhost
connection: local
gather_facts: no
roles:
- my_role
```
task under ./roles/my_role/main.yml
```yaml
- name: include tasks
include_tasks: "ok.yml"
```
task under ./roles/my_role/ok.yml
```yaml
- name: task with typo
import_tasks: typo.yml
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
as in 2.7.10:
ansible-playbook -i localhost, try.yml
```
fatal: [localhost]: FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or access '/tmp/typo.yml' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
```
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
ansible-playbook -i localhost, try.yml -vvv
```paste below
ansible-playbook 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/nirr/.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.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
Using /etc/ansible/ansible.cfg as config file
Parsed localhost, inventory source with host_list plugin
___________________
< PLAYBOOK: try.yml >
-------------------
\ ,__,
\ (oo)____
(__) )\
||--|| *
1 plays in try.yml
__________________
< PLAY [localhost] >
------------------
\ ,__,
\ (oo)____
(__) )\
||--|| *
META: ran handlers
________________________________
< TASK [my_role : include tasks] >
--------------------------------
\ ,__,
\ (oo)____
(__) )\
||--|| *
task path: /tmp/roles/my_role/tasks/main.yml:1
fatal: [localhost]: FAILED! => {
"reason": "Could not find or access '/tmp/roles/my_role/tasks/ok.yml' on the Ansible Controller."
}
```
| https://github.com/ansible/ansible/issues/58436 | https://github.com/ansible/ansible/pull/58464 | 20ad120829e5e1ee0f51aab4f4f88afc1d956697 | 939e2b4c799b60bac4ceaea649737912a2c9a115 | 2019-06-26T21:19:00Z | python | 2019-06-27T19:05:42Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,420 | ["lib/ansible/modules/files/unarchive.py", "test/integration/targets/unarchive/tasks/main.yml"] | The unarchive integration test fails when LC_ALL is not set. | ##### SUMMARY
The unarchive integration test fails when LC_ALL is not set.
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
unarchive
##### ANSIBLE VERSION
devel
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
N/A
##### STEPS TO REPRODUCE
1. Set `ansible_connection=ssh ansible_host=localhost` for `testhost` to prevent modules from inheriting the environment from the controller: https://github.com/ansible/ansible/blob/edcb5b6775adac09eee5412b499b8f0aa5194610/test/integration/inventory#L6
2. Run the test in an environment where LC_ALL is not set by default: `ansible-test integration unarchive --remote freebsd/12.0 -v`
##### EXPECTED RESULTS
Tests pass.
##### ACTUAL RESULTS
Tests traceback:
```
TASK [unarchive : test that unarchive works with an archive that contains non-ascii filenames] **************************************************************************
fatal: [testhost]: FAILED! => {"changed": false, "module_stderr": "Shared connection to localhost closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1561576726.3763218-37161750934991/AnsiballZ_unarchive.py\", line 139, in <module>\r\n _ansiballz_main()\r\n File \"/root/.ansible/tmp/ansible-tmp-1561576726.3763218-37161750934991/AnsiballZ_unarchive.py\", line 131, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/root/.ansible/tmp/ansible-tmp-1561576726.3763218-37161750934991/AnsiballZ_unarchive.py\", line 65, in invoke_module\r\n spec.loader.exec_module(module)\r\n File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n File \"/tmp/ansible_unarchive_payload_o9_x930g/__main__.py\", line 909, in <module>\r\n File \"/tmp/ansible_unarchive_payload_o9_x930g/__main__.py\", line 859, in main\r\n File \"/usr/local/lib/python3.6/genericpath.py\", line 42, in isdir\r\n st = os.stat(s)\r\nUnicodeEncodeError: 'ascii' codec can't encode characters in position 51-54: ordinal not in range(128)\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
Failure on Shippable: https://app.shippable.com/github/ansible/ansible/runs/129521/18/tests | https://github.com/ansible/ansible/issues/58420 | https://github.com/ansible/ansible/pull/58431 | 7ed7d374e43819282b21a20048eff768d8a0a018 | 23f0ca0acdc09ad4371e8f9eda3315cff8f75345 | 2019-06-26T19:19:22Z | python | 2019-06-28T16:47:10Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,418 | ["lib/ansible/modules/files/read_csv.py"] | The read_csv integration test fails when LC_ALL is not set. | ##### SUMMARY
The read_csv integration test fails when LC_ALL is not set.
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
read_csv
##### ANSIBLE VERSION
devel
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
N/A
##### STEPS TO REPRODUCE
1. Set `ansible_connection=ssh ansible_host=localhost` for `testhost` to prevent modules from inheriting the environment from the controller: https://github.com/ansible/ansible/blob/edcb5b6775adac09eee5412b499b8f0aa5194610/test/integration/inventory#L6
2. Run the test in an environment where LC_ALL is not set by default: `ansible-test integration read_csv --remote freebsd/12.0 -v`
##### EXPECTED RESULTS
Tests pass.
##### ACTUAL RESULTS
Tests traceback:
```
TASK [read_csv : Read users from CSV file and return a dictionary] ******************************************************************************************************
fatal: [testhost]: FAILED! => {"changed": false, "module_stderr": "Shared connection to localhost closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1561575641.134005-97732254058242/AnsiballZ_read_csv.py\", line 139, in <module>\r\n _ansiballz_main()\r\n File \"/root/.ansible/tmp/ansible-tmp-1561575641.134005-97732254058242/AnsiballZ_read_csv.py\", line 131, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/root/.ansible/tmp/ansible-tmp-1561575641.134005-97732254058242/AnsiballZ_read_csv.py\", line 65, in invoke_module\r\n spec.loader.exec_module(module)\r\n File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n File \"/tmp/ansible_read_csv_payload_dllmyumq/__main__.py\", line 235, in <module>\r\n File \"/tmp/ansible_read_csv_payload_dllmyumq/__main__.py\", line 210, in main\r\n File \"/usr/local/lib/python3.6/csv.py\", line 98, in fieldnames\r\n self._fieldnames = next(self.reader)\r\n File \"/usr/local/lib/python3.6/encodings/ascii.py\", line 26, in decode\r\n return codecs.ascii_decode(input, self.errors)[0]\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128)\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
Failure on Shippable: https://app.shippable.com/github/ansible/ansible/runs/129521/18/tests | https://github.com/ansible/ansible/issues/58418 | https://github.com/ansible/ansible/pull/58450 | 18f95957191af6d4bc6fd8d300097aff6ac966a7 | de8ac7983252c9338c6bdc80cf33f8f0af247833 | 2019-06-26T19:02:08Z | python | 2019-06-27T15:02:35Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,415 | ["test/runner/requirements/constraints.txt"] | Python 3.8 win_ping test timeout | ##### SUMMARY
NOTE: This issue only occurs when using Python 3.8.
The Windows group 1 tests are failing early in the nightly CI run for all Windows versions:
https://app.shippable.com/github/ansible/ansible/runs/129532/11/console
https://app.shippable.com/github/ansible/ansible/runs/129532/12/console
https://app.shippable.com/github/ansible/ansible/runs/129532/13/console
https://app.shippable.com/github/ansible/ansible/runs/129532/14/console
https://app.shippable.com/github/ansible/ansible/runs/129532/15/console
https://app.shippable.com/github/ansible/ansible/runs/129532/16/console
All of the tests time out on executing win_ping. Here's one example:
```
09:41 Run command: ansible -m win_ping -i windows_2008, windows_2008 -e 'ansible_connection=winrm ansible_host=ec2-3-16-152-175.us-east-2.compute.amazonaws.com ansible_user=administrator ansible_password=******************* ansible_port=5986 ansible_winrm_server_cert_validation=ignore'
59:59
59:59 NOTICE: Killed command to avoid an orphaned child process during handling of an unexpected exception.
```
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
windows
##### ANSIBLE VERSION
devel
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
Shippable
##### STEPS TO REPRODUCE
Run Windows group 1 tests on Shippable with coverage enabled.
##### EXPECTED RESULTS
Tests pass.
##### ACTUAL RESULTS
Tests fail. | https://github.com/ansible/ansible/issues/58415 | https://github.com/ansible/ansible/pull/59733 | 4a7e11ba9afd84e78b9ad8403afe51db372f1c5f | ed4a729fd6af17c4962fe41a287222b7858b889a | 2019-06-26T18:35:24Z | python | 2019-07-29T20:05:29Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,413 | ["test/runner/requirements/constraints.txt"] | Python 3.8 unit test timeout with coverage | ##### SUMMARY
The nightly CI runs with code coverage are timing out for Python 3.8 unit tests:
https://app.shippable.com/github/ansible/ansible/runs/129532/10/console
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
unit tests
##### ANSIBLE VERSION
devel
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
Shippable
##### STEPS TO REPRODUCE
Run unit tests on Python 3.8 with code coverage enabled on Shippable.
##### EXPECTED RESULTS
Tests pass.
##### ACTUAL RESULTS
Tests time out.
| https://github.com/ansible/ansible/issues/58413 | https://github.com/ansible/ansible/pull/59733 | 4a7e11ba9afd84e78b9ad8403afe51db372f1c5f | ed4a729fd6af17c4962fe41a287222b7858b889a | 2019-06-26T18:14:24Z | python | 2019-07-29T20:05:29Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,370 | ["changelogs/fragments/58370-mysqldb-allow-multiple_databases_create_delete_operation.yml", "docs/docsite/rst/porting_guides/porting_guide_2.9.rst", "lib/ansible/modules/database/mysql/mysql_db.py", "test/integration/targets/mysql_db/tasks/main.yml", "test/integration/targets/mysql_db/tasks/multi_db_create_delete.yml", "test/integration/targets/mysql_db/tasks/state_dump_import.yml"] | Allow mysql_db module to create/drop multiple databases | ##### SUMMARY
mysql_db module should be able to create/drop multiple databases
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
lib/ansible/modules/database/mysql/mysql_db.py
##### ADDITIONAL INFORMATION
Why and what it would solve:
Avoids repetitive tasks to create/delete more than one databases (similar to https://github.com/ansible/ansible/issues/56059)
<!--- Paste example playbooks or commands between quotes below -->
- Create (Multiple databases)
```yaml
tasks:
- name: Create multiple databases (provided in comma separated form)
mysql_db:
name: bobdata, bobthebuilder
state: present
- name: Create multiple databases (provided in list form)
mysql_db:
name:
- bobdata
- bobthebuilder
state: present
```
- Delete/Drop (Multiple databases)
```yaml
- name: Delete/drop multiple databases (provided in comma separated form)
mysql_db:
name: bobdata, bobthebuilder
state: absent
- name: Delete/drop multiple databases (provided in list form)
mysql_db:
name:
- bobdata
- bobthebuilder
state: absent
```
Credits for the idea to @Andersson007 from comment https://github.com/ansible/ansible/pull/56721#issuecomment-505128646 | https://github.com/ansible/ansible/issues/58370 | https://github.com/ansible/ansible/pull/58602 | cdf0947df092fb9883a13bca13a120ff29cacfc5 | 393e4a41d08c9654279215094630ed2e7f84d8d1 | 2019-06-26T04:04:27Z | python | 2019-07-18T14:56:32Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,351 | ["changelogs/fragments/58351-fix-non-ascii-vault.yml", "lib/ansible/parsing/yaml/objects.py", "test/units/parsing/yaml/test_objects.py"] | AnsibleVaultEncryptedUnicode.__str__() will traceback on python2 with non-ascii strings. |
##### SUMMARY
This line of code will traceback on Python2 if a vaulted string contains non-ascii characters:
https://github.com/ansible/ansible/blob/devel/lib/ansible/parsing/yaml/objects.py#L131
The function should be defined like this:
``` python
def __str__(self):
return to_native(self.data, errors='surrogate_or_strict')
```
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
lib/ansible/parsing/yaml/objects.py
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
Current devel (2.9) and previous versions
```
##### 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
I'm not sure if the current ```__str__()``` method ever gets called on Python2. A quick test by tracing the following playbook shows that ```__unicode__()``` gets called in that playbook.
```
---
- hosts: localhost
gather_facts: False
vars:
the_secret: !vault |
$ANSIBLE_VAULT;1.1;AES256
62666630343233373162323132363462633332356664636165616339303536333334366231303963
6433666337653864653163623063353932386130646530370a303234633037383966343366343037
39336433656461656261326165643431633363313562343764373136613338363039366136366439
6666633836343935660a396336393834326232383636613665316133666464393834623831326562
6165
tasks:
- debug: msg="{{ the_secret }}"
```
(Vault password is 12345)
It probably should be fixed, though, as all it will take to provoke a UnicodeError is some piece of code being changed to do ```'%s' % vault_encrypted_variable_with_non_ascii_chars```. The %s format string will use ```__str__()``` instead of ```__unicode__()``` and provoke the error.
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
<!--- Paste verbatim command output between quotes -->
```paste below
```
| https://github.com/ansible/ansible/issues/58351 | https://github.com/ansible/ansible/pull/58503 | e28bc463530abbaa4b6ae608f08876e94091ce5a | 826f224f0293dc4e9264b44ecd2d8a07710e89c0 | 2019-06-25T17:51:55Z | python | 2019-06-28T17:23:15Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,337 | ["lib/ansible/modules/net_tools/nmcli.py"] | nmcli conn_name description | <!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
nmcli docs state, for the conn_name option: when not provided a default name is generated: `<type>[-<ifname>][-<num>]`
am I misunderstanding something or does this imply that the option isn't actually required?
<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->
##### ISSUE TYPE
- Documentation Report
##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
nmcli
| https://github.com/ansible/ansible/issues/58337 | https://github.com/ansible/ansible/pull/59034 | 343acd76d459993de64cf8e7a519f9d344b81620 | fec314febb63185151dfae7386c29f0623894288 | 2019-06-25T14:30:42Z | python | 2019-07-12T20:07:55Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,326 | ["changelogs/fragments/58326-vmware_rest_client-handle_unauth.yml", "lib/ansible/module_utils/vmware_rest_client.py", "lib/ansible/modules/cloud/vmware/vmware_category.py", "lib/ansible/modules/cloud/vmware/vmware_tag.py", "lib/ansible/modules/cloud/vmware/vmware_tag_manager.py"] | VMware: Unable to use vmware_tag_manager module | <!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
Unable to run a playbook with vmware_tag_manager module.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
vmware_tag_manager
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```yaml
- hosts: "{{ target }}"
gather_facts: no
tasks:
- name: add tags
vmware_tag_manager:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: yes
tag_names:
- tag1
- tag2
object_name: "{{ target | upper }}"
object_type: VirtualMachine
state: add
delegate_to: localhost
become: yes
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Python 2.7.5
pip list
```
Package Version
---------------------------------- ------------------
ansible 2.8.1
asn1crypto 0.24.0
Babel 0.9.6
backports.ssl-match-hostname 3.5.0.1
certifi 2018.4.16
cffi 1.12.3
chardet 3.0.4
click 6.7
configobj 4.7.2
cryptography 2.7
decorator 3.4.0
dnspython 1.12.0
docopt 0.6.2
enum34 1.0.4
ethtool 0.8
httplib2 0.9.1
idna 2.7
iniparse 0.4
ipaddress 1.0.16
isodate 0.5.0
javapackages 1.0.0
Jinja2 2.7.2
jmespath 0.9.0
jsoncsv 2.0.6
kitchen 1.1.1
lxml 4.3.4
M2Crypto 0.21.1
Magic-file-extensions 0.2
MarkupSafe 0.11
netaddr 0.7.19
netsnmp-python 1.0a1
nsx-policy-python-sdk 2.3.0.0.3.13851140
nsx-python-sdk 2.3.0.0.3.13851140
nsx-vmc-aws-integration-python-sdk 2.3.0.0.3.13851140
nsx-vmc-policy-python-sdk 2.3.0.0.3.13851140
paramiko 2.1.1
passlib 1.6.5
pciutils 1.7.3
perf 0.1
pip 19.1.1
ply 3.4
pulp-common 2.16.4.1
pyasn1 0.1.9
pycparser 2.14
pycurl 7.19.0
pygobject 3.22.0
pygpgme 0.3
pyinotify 0.9.4
pykickstart 1.99.66.19
pyliblzma 0.5.3
pyOpenSSL 19.0.0
pyparsing 1.5.6
python-dateutil 1.5
python-dmidecode 3.10.13
python-linux-procfs 0.4.9
pyudev 0.15
pyvmomi 6.7.1.2018.12
pyxattr 0.5.1
PyYAML 3.10
requests 2.22.0
schedutils 0.4
setuptools 0.9.8
simplejson 3.16.0
six 1.12.0
slip 0.4.0
slip.dbus 0.4.0
subscription-manager 1.21.10
suds 0.4
urlgrabber 3.10
urllib3 1.25.3
vapi-client-bindings 3.0.0
vapi-common-client 2.12.0
vapi-runtime 2.12.0
vmc-client-bindings 1.6.0
wheel 0.24.0
xlwt 1.3.0
yum-metadata-parser 1.1.4
```
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Run a playbook with vmware_tag_manager module on the same environment. Same issue with validate_certs: yes et validate_certs: no,
<!--- Paste example playbooks or commands between quotes below -->
```
ansible-playbook test.yml -i nonproduction --ask-vault -e "target=mytestvm"
```
<!--- 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 run without errors and tags should be added to the VM.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Errors related to supported versions of some packages or attach or detach privilege on urn:vmomi:InventoryServiceTag.
<!--- Paste verbatim command output between quotes -->
With validate_certs: yes
```paste below
fatal: [mytestvm -> localhost]: FAILED! => {"changed": false, "module_stderr": "/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!\n RequestsDependencyWarning)\nTraceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1561462780.71-111378165335699/AnsiballZ_vmware_tag_manager.py\", line 114, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1561462780.71-111378165335699/AnsiballZ_vmware_tag_manager.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1561462780.71-111378165335699/AnsiballZ_vmware_tag_manager.py\", line 49, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_vmware_tag_manager_payload_m5YI7p/__main__.py\", line 283, in <module>\n File \"/tmp/ansible_vmware_tag_manager_payload_m5YI7p/__main__.py\", line 278, in main\n File \"/tmp/ansible_vmware_tag_manager_payload_m5YI7p/__main__.py\", line 151, in __init__\n File \"/tmp/ansible_vmware_tag_manager_payload_m5YI7p/ansible_vmware_tag_manager_payload.zip/ansible/module_utils/vmware_rest_client.py\", line 61, in __init__\n File \"/tmp/ansible_vmware_tag_manager_payload_m5YI7p/ansible_vmware_tag_manager_payload.zip/ansible/module_utils/vmware_rest_client.py\", line 116, in connect_to_rest\n File \"/usr/lib/python2.7/site-packages/com/vmware/cis_client.py\", line 198, in create\n return self._invoke('create', None)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/bindings/stub.py\", line 345, in _invoke\n return self._api_interface.native_invoke(ctx, _method_name, kwargs)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/bindings/stub.py\", line 266, in native_invoke\n method_result = self.invoke(ctx, method_id, data_val)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/bindings/stub.py\", line 202, in invoke\n ctx)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/security/client/security_context_filter.py\", line 102, in invoke\n self, service_id, operation_id, input_value, ctx)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/provider/filter.py\", line 76, in invoke\n service_id, operation_id, input_value, ctx)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/protocol/client/msg/json_connector.py\", line 79, in invoke\n response = self._do_request(VAPI_INVOKE, ctx, params)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/protocol/client/msg/json_connector.py\", line 122, in _do_request\n headers=request_headers, body=request_body))\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/protocol/client/rpc/requests_provider.py\", line 98, in do_request\n cookies=http_request.cookies, timeout=timeout)\n File \"/usr/lib/python2.7/site-packages/requests/sessions.py\", line 533, in request\n resp = self.send(prep, **send_kwargs)\n File \"/usr/lib/python2.7/site-packages/requests/sessions.py\", line 646, in send\n r = adapter.send(request, **kwargs)\n File \"/usr/lib/python2.7/site-packages/requests/adapters.py\", line 514, in send\n raise SSLError(e, request=request)\nrequests.exceptions.SSLError: HTTPSConnectionPool(host='vcenter.example.com', port=443): Max retries exceeded with url: /api (Caused by SSLError(SSLError(\"bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)\",),))\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
With validate_certs: no
```
fatal: [mytestvm -> localhost]: FAILED! => {"changed": false, "module_stderr": "/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!\n RequestsDependencyWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\nTraceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1561462878.88-208452166425456/AnsiballZ_vmware_tag_manager.py\", line 114, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1561462878.88-208452166425456/AnsiballZ_vmware_tag_manager.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1561462878.88-208452166425456/AnsiballZ_vmware_tag_manager.py\", line 49, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_vmware_tag_manager_payload_pmXHEt/__main__.py\", line 283, in <module>\n File \"/tmp/ansible_vmware_tag_manager_payload_pmXHEt/__main__.py\", line 279, in main\n File \"/tmp/ansible_vmware_tag_manager_payload_pmXHEt/__main__.py\", line 244, in ensure_state\n File \"/usr/lib/python2.7/site-packages/com/vmware/cis/tagging_client.py\", line 1168, in attach\n 'object_id': object_id,\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/bindings/stub.py\", line 345, in _invoke\n return self._api_interface.native_invoke(ctx, _method_name, kwargs)\n File \"/usr/lib/python2.7/site-packages/vmware/vapi/bindings/stub.py\", line 298, in native_invoke\n self._rest_converter_mode)\ncom.vmware.vapi.std.errors_client.Unauthorized: {error_type : None, messages : [LocalizableMessage(default_message='MYDOMAIN.COM\\\\service_account does not have attach or detach privilege on urn:vmomi:InventoryServiceTag:bcf7a240-1dda-43ed-a98e-dfb9806d1849:GLOBAL', args=['MYDOMAIN.COM\\\\service_account', 'attach or detach', 'urn:vmomi:InventoryServiceTag:bcf7a240-1dda-43ed-a98e-dfb9806d1849:GLOBAL'], params=None, id='cis.tagging.unauthorized.error', localized=None)], data : None}\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
| https://github.com/ansible/ansible/issues/58326 | https://github.com/ansible/ansible/pull/58405 | 242f160747638fda253d7ac7e96ea4a5c4d0c03e | e2d159c40c42946256bc37887322f0e82853e93b | 2019-06-25T11:45:30Z | python | 2019-06-28T02:29:54Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,310 | ["changelogs/fragments/58310-gather-facts-verbosity.yml", "lib/ansible/plugins/action/gather_facts.py"] | setup module became excessively verbose in 2.8, but only if used implicitly | <!--- 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
implicit fact gathering (`gather_facts: true`) has started dumping the entire setup output with just a single `-v`, which is new with 2.8.0 and still present in 2.8.1 (not present in 2.7.11). this does *not* happen with `-v` if `gather_facts: false` and `setup` task is run manually in the play.
please restore the many-years-old, established behavior of implicit fact gathering to not have so much spam in `-v` output, which will also restore consistency with manual `setup` module invocation.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
setup
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.8.1
config file = /path/to/playbase/.ansible.cfg
configured module search path = [u'/path/to/playbase/lib']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15+ (default, Feb 3 2019, 13:13:16) [GCC 8.2.0]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
ANSIBLE_NOCOWS(/path/to/playbase/.ansible.cfg) = True
DEFAULT_GATHER_SUBSET(/path/to/playbase/.ansible.cfg) = [u'!all', u'min', u'network']
DEFAULT_LOAD_CALLBACK_PLUGINS(/path/to/playbase/.ansible.cfg) = True
DEFAULT_MODULE_PATH(/path/to/playbase/.ansible.cfg) = [u'/path/to/playbase/lib']
DEFAULT_STDOUT_CALLBACK(/path/to/playbase/.ansible.cfg) = default
DISPLAY_ARGS_TO_STDOUT(/path/to/playbase/.ansible.cfg) = False
DISPLAY_SKIPPED_HOSTS(/path/to/playbase/.ansible.cfg) = False
```
(irrelevant removed)
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
controller: debian 9
target: ubuntu 16
##### STEPS TO REPRODUCE
good (non-execessive) output from `ansible-playbook -v`:
```yaml
- hosts: localhost
connection: local
gather_facts: false
tasks:
- setup:
- meta: noop
```
bad (excessive, entire setup fact structure dumped) output from `ansible-playbook -v`:
```yaml
- hosts: localhost
connection: local
gather_facts: true
tasks:
- meta: noop
```
##### EXPECTED RESULTS
expect that setup doesn't show entire set of gathered facts just with a simple `-v`, filling our logs with orders of magnitude more spam and forcing us to rewrite all our plays for explicit fact gathering to avoid it and all our roles to check if facts are present and run setup if not
removing `-v` is not an option because that's far too little information in most cases, we want more than "ok" for most things, the output is totally fine for all other modules under `-v` but setup module has now changed its long standing behavior. expect it to behave same way as it has for years, looking something like this:
```
ok: [localhost]
```
##### ACTUAL RESULTS
huge dump of entire json structure:
```
ok: [localhost] => {"ansible_facts": {"ansible_all_ipv4_addresses": ... <snipped>
```
furthermore, it's inconsistent between implicit and explicit gathering. | https://github.com/ansible/ansible/issues/58310 | https://github.com/ansible/ansible/pull/58339 | 18d713e6d5bc4a09dd2b129039b43f1bacd1c212 | bc25ac20e13255ecd0142d45965798b7adb568cd | 2019-06-25T01:48:00Z | python | 2019-06-25T15:28:09Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,302 | ["changelogs/fragments/win_format-Idem-not-working-if-file-exist-but-same-fs.yml", "lib/ansible/modules/windows/win_format.ps1", "test/integration/targets/win_format/tasks/tests.yml"] | win_format fails on second run | <!--- 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 the win_format module a run of the playbook will fail if the filesystem has files in it. The module is failing with the error: `Force format must be specified to format non-pristine volumes`. Because the module fails it cannot be used in an idempotent manner. This prevents a playbook from running successfully if there are files in a previously formatted filesystem.
I don't see why the module care if there are file present in the filesystem if all of the format options (fstype, allocation_unit_size, etc. are the same).
##### 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_format
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /home/bevans/Documents/consulting_engagements/mt_bank/2019-06_ansible_windows/ansible.cfg
configured module search path = ['/home/bevans/.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.3 (default, May 11 2019, 00:38:04) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Target OS is Windows 10
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
1. Run the playbook to format an unformatted partition
2. Create a file on the newly formatted partition
3. Re-run the playbook
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- hosts: all
gather_facts: false
tasks:
- win_partition:
disk_number: 1
drive_letter: F
partition_size: -1
- win_format:
drive_letter: F
file_system: NTFS
```
<!--- 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 first run of the playbook results in the task being changed. On the second run the task should be ok.
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
The first run of the playbook successfully formatted the partition, but the second run (after files have been created on the filesystem) fails.
<!--- Paste verbatim command output between quotes -->
```paste below
$ ansible-playbook t3.yml
PLAY [win10] *********************************************************************************************************************************
TASK [win_partition] *************************************************************************************************************************
changed: [win10]
TASK [win_format] ****************************************************************************************************************************
changed: [win10]
PLAY RECAP ***********************************************************************************************************************************
win10 : ok=2 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
$ ansible-playbook t3.yml
PLAY [win10] *********************************************************************************************************************************
TASK [win_partition] *************************************************************************************************************************
ok: [win10]
TASK [win_format] ****************************************************************************************************************************
fatal: [win10]: FAILED! => {"changed": false, "msg": "Force format must be specified to format non-pristine volumes"}
PLAY RECAP ***********************************************************************************************************************************
win10 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
```
| https://github.com/ansible/ansible/issues/58302 | https://github.com/ansible/ansible/pull/59819 | c7662d8b2f0d1fd954b8026442af3ef1497e99d5 | 74a3eec1d9afc3911a6c41efb11cf6f8a3474796 | 2019-06-24T20:06:58Z | python | 2019-09-16T02:45:44Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,284 | ["changelogs/fragments/58323-copy-deep-recursive-with-remote_src.yaml", "lib/ansible/modules/files/copy.py", "test/integration/targets/copy/tasks/tests.yml"] | recursive copy with remote_src=yes does not recurse beyond first level | <!--- 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
Recursively copying changed directories does not work if the changes are deeper than one directory level. If contents the top-level src directory appears unchanged, the whole directory appears unchanged.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
copy
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/akorsunsky/.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.3 (default, May 11 2019, 00:38:04) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
```
##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto
```
##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
- Distribution: Fedora 30, 64 Bit
- Python: 3.7.3 (default, May 11 2019, 00:38:04) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
- `uname -a`: Linux localhost 5.1.9-300.fc30.x86_64 #1 SMP Tue Jun 11 16:17:54 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
##### STEPS TO REPRODUCE
<!--- Paste example playbooks or commands between quotes below -->
```bash
mkdir -p /tmp/src/a/b/ /tmp/dest/a/b/
touch /tmp/src/a/b/newfile
ansible localhost -m copy -a "src=/tmp/src/ dest=/tmp/dest/ remote_src=yes"
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
`/tmp/src/a/b/newfile` copied to `/tmp/dest/a/b/newfile`, task marked as changed.
##### ACTUAL RESULTS
`/tmp/dest/a/b/newfile` does not exist. Task marked as not changed.
<!--- Paste verbatim command output between quotes -->
```paste below
localhost | SUCCESS => {
"changed": false,
"checksum": null,
"dest": "/tmp/dest/",
"gid": 1269600003,
"group": "akorsunsky",
"md5sum": null,
"mode": "0775",
"owner": "akorsunsky",
"size": 60,
"src": "/tmp/src/",
"state": "directory",
"uid": 1269600003
}
```
| https://github.com/ansible/ansible/issues/58284 | https://github.com/ansible/ansible/pull/58323 | 26236f474ba8aa600d321c9cb7c5b11d123928ac | b7e38dfa52024c1363cdd37fac3fce52ad421f08 | 2019-06-24T15:11:09Z | python | 2019-10-30T16:17:11Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,282 | ["lib/ansible/playbook/helpers.py", "lib/ansible/playbook/role/definition.py", "lib/ansible/template/__init__.py", "test/units/template/test_templar.py"] | jinja2 invalid syntax results in string instead of error | ##### SUMMARY
An invalid syntax within a jinja2 statement results in the statement being returned instead of an syntax error.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
jinja2
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/PycharmProjects/ansible-2/lib/ansible
executable location = /home/user/PycharmProjects/ansible-2/bin/ansible
python version = 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127]
```
##### CONFIGURATION
##### OS / ENVIRONMENT
ArchLinux
##### STEPS TO REPRODUCE
```yaml
- name: Test
hosts: localhost
gather_facts: false
become: false
strategy: linear
tasks:
- debug:
msg: "{{ foo | ipaddr('address')) }}"
```
##### EXPECTED RESULTS
Syntax error (two closing `)`-characters)
##### ACTUAL RESULTS
```paste below
ok: [localhost] => {
"msg": "{{ foo | ipaddr('address')) }}"
}
```
@sivel | https://github.com/ansible/ansible/issues/58282 | https://github.com/ansible/ansible/pull/58290 | f5b9bd81fcc0334113411f4dbefeb40214bb0837 | e32d60bbcd44ccc7761268c6d6f00db036db962b | 2019-06-24T14:50:48Z | python | 2019-06-25T15:54:37Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,246 | ["changelogs/fragments/58246-win_domain_user-idempotency.yaml", "lib/ansible/modules/windows/win_domain_user.ps1", "lib/ansible/modules/windows/win_domain_user.py"] | win_domain_user not idempotent for setting passwords | ##### SUMMARY
win_domain_user always returns changed if a password is specified.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
win_domain_user
##### ANSIBLE VERSION
```paste below
ansible 2.8.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.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127]
```
##### CONFIGURATION
##### OS / ENVIRONMENT
ArchLinux
##### STEPS TO REPRODUCE
```yaml
- name: Set AD User Password
win_domain_user:
name: '{{ user_name }}'
password: '{{ password }}'
state: present
- name: Set AD User Password again
win_domain_user:
name: '{{ user_name }}'
password: '{{ password }}'
state: present
```
##### EXPECTED RESULTS
The 2nd task to show as not changed.
##### ACTUAL RESULTS
The 2nd task shows as changed, even though the password was already set. | https://github.com/ansible/ansible/issues/58246 | https://github.com/ansible/ansible/pull/58383 | 811153afb1a8e91355ccd7a7d016007a61a9506d | fb2c1d4577f9f1542ef93232fe4e910cf76072d2 | 2019-06-23T07:14:07Z | python | 2019-08-18T20:17:41Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,245 | ["lib/ansible/modules/cloud/hcloud/hcloud_rdns.py", "test/integration/targets/hcloud_rdns/aliases", "test/integration/targets/hcloud_rdns/defaults/main.yml", "test/integration/targets/hcloud_rdns/tasks/main.yml"] | hcloud: Add reverse DNS management | <!--- 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 -->
The Hetzner Cloud API has a `change_dns_ptr` call for both servers and floating IPs to update reverse DNS entries. The Ansible module should make use of this to allow reverse DNS management.
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
hcloud_server hcloud_floating_ip
##### 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
- name: Update reverse DNS
hcloud_server:
name: {{ name }}
dns_ptr:
- ip: {{ ipv4_addr }}
dns_ptr: {{ name }}.example.com
- ip: {{ ipv6_addr }}
dns_ptr: {{ name }}.example.com
```
<!--- HINT: You can also paste gist.github.com links for larger files -->
| https://github.com/ansible/ansible/issues/58245 | https://github.com/ansible/ansible/pull/60123 | 814e24fab5e5807cb753882f412b10a7abdbef1f | 4a09c7a920217d233aaabd83fda8b914c412fd62 | 2019-06-23T00:19:42Z | python | 2019-08-14T20:51:05Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,240 | ["docs/docsite/rst/user_guide/playbooks_delegation.rst"] | set_fact and run_once incorrectly setting facts | ##### SUMMARY
If set_fact is used with run_once the fact gets applied to all hosts.
Edit: Documentation should mention `delegate_facts: True` is required.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
run_once
##### ANSIBLE VERSION
```paste below
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/PycharmProjects/ansible-2/lib/ansible
executable location = /home/user/PycharmProjects/ansible-2/bin/ansible
python version = 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127]
```
##### CONFIGURATION
##### OS / ENVIRONMENT
ArchLinux
##### STEPS TO REPRODUCE
There are at least two hosts in the group TestGroup
```yaml
- name: Test
hosts: TestGroup
become: false
gather_facts: false
tasks:
- set_fact:
foo: foo
- run_once: yes
block:
- set_fact:
foo: bar
- ping: null
when: foo == "bar"
```
##### EXPECTED RESULTS
The final ping gets executed for all hosts except the one that was randomly chosen for the RunOnce block.
##### ACTUAL RESULTS
The final ping gets skipped for all hosts. | https://github.com/ansible/ansible/issues/58240 | https://github.com/ansible/ansible/pull/58241 | 1b90e10cf0c77e770cb217d99f6e9fe3b4833408 | ee52b60d7dacc86f6b4a41083ca033a024f63949 | 2019-06-22T20:34:04Z | python | 2019-06-27T21:19:22Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,222 | ["lib/ansible/modules/windows/win_snmp.py"] | win_snmp not working ? | <!--- 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 -->
win_snmp module doesnt set / add community strings or managers. playbook results always shows the current configuration but no changes
##### 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_snmp
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.1
config file = /root/myplatform/ansible.cfg
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 = /usr/bin/ansible
python version = 2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
```
##### 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. -->
Windows server 2016 standard edition
##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
simple playbook based on documentation sample. tested with kerberos and ntlm method, also with become:
<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
- name: SNMP test
hosts: testhost
gather_facts: no
vars:
ansible_user: AD username
ansible_password: AD password
ansible_connection: winrm
ansible_winrm_transport: ntlm
ansible_winrm_server_cert_validation: ignore
snmp_community_ro:
- private
snmp_managers:
- localhost
- 10.10.10.10
tasks:
- name: Replace SNMP communities
win_snmp:
communities: "{{ snmp_community_ro}}"
managers: "{{ snmp_managers }}"
action: set
```
<!--- HINT: You can paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
expected to get SNMP settings changed
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
playbook result only shows the current SNMP settings - no changes are applied
<!--- Paste verbatim command output between quotes -->
```paste below
PLAY [SNMP test] ***************************************************************
TASK [Replace SNMP communities] ************************************************
ok: [testhost] => {"changed": false, "community_strings": [], "permitted_managers": ["localhost"]}
PLAY RECAP *********************************************************************
testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
| https://github.com/ansible/ansible/issues/58222 | https://github.com/ansible/ansible/pull/58261 | 75ca8eb42f49e2814fbe80cb429690537122ef65 | 372b896ed1a43ad94c4f7c81bbe17d4cd7b3a671 | 2019-06-22T02:16:23Z | python | 2019-06-24T07:00:18Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,194 | ["changelogs/fragments/58194-vm-name-item-not-yet-present-at-creation-time.yaml", "lib/ansible/modules/cloud/misc/proxmox_kvm.py"] | [proxmox_kvm] Error in get_vmid when called 'too early' after the creation of a VM | ##### SUMMARY
For a fraction of second after the creation of a new VM, the VM name is not yet defined in its relative dictionary returned by the proxmoxer when querying the list of VMs (proxmox.cluster.resources.get(type='vm')).
Accessing to this non existing attribute as an element of a dictionary instead of using the get function on the dictionary raise an error.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
proxmox_kvm
##### ANSIBLE VERSION
```
ansible 2.8.0
config file = /home/pguermo/Projects/superluminal-pdp/etc/ansible.cfg
configured module search path = ['/home/pguermo/Projects/superluminal-pdp/library']
ansible python module location = /home/pguermo/.virtualenvs/superluminal-pdp/lib/python3.5/site-packages/ansible
executable location = /home/pguermo/.virtualenvs/superluminal-pdp/bin/ansible
python version = 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
```
##### STEPS TO REPRODUCE
Create several VMs on proxmox in a row.
```
proxmox_kvm:
api_host: "{{ pve_host_fqdn }}"
api_user: "{{ pve_user }}"
api_password: "{{ pve_password }}"
validate_certs: "{{ validate_certs }}"
node: "{{ pve_node }}"
name: "{{ ansible_host }}"
pool: "{{ pool_id }}"
vmid: "{{ vmid }}"
description: "{{ description | default(vm.description) }}"
net: "{{ net | default(vm.net) }}"
balloon: "{{ balloon | default(vm_defaults.balloon) }}"
cores: "{{ cores | default(vm_defaults.cores) }}"
ide: "{{ ide | default(vm_defaults.ide) }}"
memory: "{{ memory | default(vm_defaults.memory) }}"
ostype: "{{ ostype | default(vm_defaults.ostype) }}"
scsi: "{{ scsi | default(vm_defaults.scsi) }}"
state: present
delegate_to: localhost
```
Some VMs will not be created.
If you add traces in the function get_vmid(proxmox, name) of ansible/modules/cloud/misc/proxmox_kvm.py, you'll notice that for some new VMs of the list, the dictionary doesn't have a 'name' entry. The `vm['name']` is then failing.
Use instead `vm.get('name')`. It will returns None if there is no name entry in the dictionary and the check `if vm.get('name') == name` can be processed properly. | https://github.com/ansible/ansible/issues/58194 | https://github.com/ansible/ansible/pull/58196 | 21863d48f3bb8c8b470fb3a132c9a3a7db470561 | 8923d1353765e85ad4660f8fcc81ee4915a94f91 | 2019-06-21T13:30:25Z | python | 2019-08-13T17:22:17Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,184 | ["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` ignoring variables | ##### SUMMARY
meta reset_connection ignores the connection variables specified within host or group vars. Therefore connections fail with some connectors.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
`lib/ansible/modules/utilities/helper/meta.py`
`lib/ansible/plugins/connection/vmware_tools.py`
##### ANSIBLE VERSION
```paste below
ansible 2.9.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/PycharmProjects/ansible-2/lib/ansible
executable location = /home/user/PycharmProjects/ansible-2/bin/ansible
python version = 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127]
```
##### CONFIGURATION
##### OS / ENVIRONMENT
ArchLinux
##### STEPS TO REPRODUCE
Trying to use reset_connection with e.g. vmware_tools connector fail as meta does not forward required variables, like ansible does for normal connections.
```yaml
- name: reset connection
meta: reset_connection
```
##### EXPECTED RESULTS
successfully reconnecting to the vm (e.g. for credential switching)
##### ACTUAL RESULTS
```paste below
ERROR! Unexpected Exception, this is probably a bug: 'No setting was provided for required configuration plugin_type: connection plugin: vmware_tools setting: vmware_host '
the full traceback was:
Traceback (most recent call last):
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/__init__.py", line 58, in get_option
option_value = C.config.get_config_value(option, plugin_type=get_plugin_class(self), plugin_name=self._load_name, variables=hostvars)
File "/home/user/PycharmProjects/ansible-2/lib/ansible/config/manager.py", line 381, in get_config_value
keys=keys, variables=variables, direct=direct)
File "/home/user/PycharmProjects/ansible-2/lib/ansible/config/manager.py", line 456, in get_config_value_and_origin
to_native(_get_entry(plugin_type, plugin_name, config)))
ansible.errors.AnsibleError: No setting was provided for required configuration plugin_type: connection plugin: vmware_tools setting: vmware_host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/PycharmProjects/ansible-2/bin/ansible-playbook", line 111, in <module>
exit_code = cli.run()
File "/home/user/PycharmProjects/ansible-2/lib/ansible/cli/playbook.py", line 121, in run
results = pbex.run()
File "/home/user/PycharmProjects/ansible-2/lib/ansible/executor/playbook_executor.py", line 169, in run
result = self._tqm.run(play=play)
File "/home/user/PycharmProjects/ansible-2/lib/ansible/executor/task_queue_manager.py", line 239, in run
play_return = strategy.run(iterator, play_context)
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/strategy/linear.py", line 263, in run
results.extend(self._execute_meta(task, play_context, iterator, host))
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/strategy/__init__.py", line 1068, in _execute_meta
connection.reset()
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/connection/vmware_tools.py", line 361, in reset
self._connect()
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/connection/vmware_tools.py", line 344, in _connect
self._establish_connection()
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/connection/vmware_tools.py", line 286, in _establish_connection
"host": self.vmware_host,
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/connection/vmware_tools.py", line 246, in vmware_host
return self.get_option("vmware_host")
File "/home/user/PycharmProjects/ansible-2/lib/ansible/plugins/__init__.py", line 60, in get_option
raise KeyError(to_native(e))
KeyError: 'No setting was provided for required configuration plugin_type: connection plugin: vmware_tools setting: vmware_host '
```
##### Notes
There are currently also other issues that prevent reset_connection from working with the vmware_tools connector, but they are addressed within separate issues and are out of scope for this one. This issue is about the required variables not being passed to connectors by the meta helper, this may be an issue for other connectors, too.
| https://github.com/ansible/ansible/issues/58184 | https://github.com/ansible/ansible/pull/73708 | 43300e22798e4c9bd8ec2e321d28c5e8d2018aeb | 935528e22e5283ee3f63a8772830d3d01f55ed8c | 2019-06-21T12:06:45Z | python | 2021-03-03T20:25:16Z |
closed | ansible/ansible | https://github.com/ansible/ansible | 58,158 | ["changelogs/fragments/58158-sysctl-fix-referenced-before-assignment.yaml", "lib/ansible/modules/system/sysctl.py"] | BUG in sysctl module: local variable 'err' referenced before assignment | ##### SUMMARY
```
master:/usr/local/lib/python2.7/site-packages/ansible/modules/system/sysctl.py", line 297, in reload_sysctl
UnboundLocalError: local variable 'err' referenced before assignment
```
- Bug exists in Ansible 2.7.11 and the latest git repo
- Related source file: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/system/sysctl.py#L278
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
- sysctl
##### ANSIBLE VERSION
```paste below
$ ansible --version
ansible 2.7.11
config file = /Users/zhb/projects/pro/ansible.cfg
configured module search path = [u'/Users/zhb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.16 (default, May 24 2019, 09:49:36) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)]
```
##### OS / ENVIRONMENT
- Host OS: macOS 10.14.5
- Target OS: OpenBSD 6.5 (amd64) | https://github.com/ansible/ansible/issues/58158 | https://github.com/ansible/ansible/pull/58161 | a09aa205e12ddcd6ca979c52ab719197f87d269d | 9069a681aabdef45aa201bf39577405070d63af6 | 2019-06-21T06:23:22Z | python | 2019-06-25T15:13:34Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,904 | ["libs/langchain/langchain/llms/sagemaker_endpoint.py"] | Issue: cannot import name 'LLMContentHandler' from 'langchain.llms.sagemaker_endpoint | Cannot import LLMContentHandler
langchain: 0.0.351
python: 3.9
To reproduce:
``` python
from langchain.llms.sagemaker_endpoint import LLMContentHandler
```
Issue could be resolved by updating
https://github.com/langchain-ai/langchain/blob/583696732cbaa3d1cf3a3a9375539a7e8785850c/libs/langchain/langchain/llms/sagemaker_endpoint.py#L1C5-L7
as follow:
``` python
from langchain_community.llms.sagemaker_endpoint import (
LLMContentHandler,
SagemakerEndpoint,
)
__all__ = [
"SagemakerEndpoint",
"LLMContentHandler"
]
```
| https://github.com/langchain-ai/langchain/issues/14904 | https://github.com/langchain-ai/langchain/pull/14906 | 4f4b078bf3b2ea3c150f0a03765eae24efda6c1a | 1069a93d187bcaa290d087d3754ef1189882add9 | 2023-12-19T13:53:31Z | python | 2023-12-19T15:00:32Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,699 | ["libs/community/langchain_community/vectorstores/pgvector.py"] | sqlalchemy.exc.InvalidRequestError: Table 'langchain_pg_collection' is already defined for this MetaData instance. | ### Issue you'd like to raise.
what is this issue, and how can i resolve it:
```python
os.environ["AZURE_OPENAI_API_KEY"] = AZURE_OPENAI_API_KEY
os.environ["AZURE_OPENAI_ENDPOINT"] = AZURE_OPENAI_ENDPOINT
os.environ["OPENAI_API_TYPE"] = "azure"
os.environ["OPENAI_API_VERSION"] = "2023-05-15"
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
embedding = OpenAIEmbeddings()
COLLECTION_NAME = "network_team_documents"
CONNECTION_STRING = PGVector.connection_string_from_db_params(
driver=os.environ.get(DB_DRIVER, DB_DRIVER),
host=os.environ.get(DB_HOST, DB_HOST),
port=int(os.environ.get(DB_PORT, DB_PORT)),
database=os.environ.get(DB_DB, DB_DB),
user=os.environ.get(DB_USER, DB_USER),
password=os.environ.get(DB_PASS, DB_PASS),
)
store = PGVector(
collection_name=COLLECTION_NAME,
connection_string=CONNECTION_STRING,
embedding_function=embedding,
extend_existing=True,
)
gpt4 = AzureChatOpenAI(
azure_deployment="GPT4",
openai_api_version="2023-05-15",
)
retriever = store.as_retriever(search_type="similarity", search_kwargs={"k": 10})
qa_chain = RetrievalQA.from_chain_type(llm=gpt4,
chain_type="stuff",
retriever=retriever,
return_source_documents=True)
return qa_chain
```
```python
Traceback (most recent call last):
File "/opt/network_tool/chatbot/views.py", line 21, in chat
chat_object = create_session()
File "/opt/network_tool/chatbot/chatbot_functions.py", line 95, in create_session
store = PGVector(
File "/opt/klevernet_venv/lib/python3.10/site-packages/langchain_community/vectorstores/pgvector.py", line 199, in __init__
self.__post_init__()
File "/opt/klevernet_venv/lib/python3.10/site-packages/langchain_community/vectorstores/pgvector.py", line 207, in __post_init__
EmbeddingStore, CollectionStore = _get_embedding_collection_store()
File "/opt/klevernet_venv/lib/python3.10/site-packages/langchain_community/vectorstores/pgvector.py", line 66, in _get_embedding_collection_store
class CollectionStore(BaseModel):
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/orm/decl_api.py", line 195, in __init__
_as_declarative(reg, cls, dict_)
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/orm/decl_base.py", line 247, in _as_declarative
return _MapperConfig.setup_mapping(registry, cls, dict_, None, {})
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/orm/decl_base.py", line 328, in setup_mapping
return _ClassScanMapperConfig(
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/orm/decl_base.py", line 578, in __init__
self._setup_table(table)
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/orm/decl_base.py", line 1729, in _setup_table
table_cls(
File "", line 2, in __new__
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
return fn(*args, **kwargs) # type: ignore[no-any-return]
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/sql/schema.py", line 436, in __new__
return cls._new(*args, **kw)
File "/opt/klevernet_venv/lib/python3.10/site-packages/sqlalchemy/sql/schema.py", line 468, in _new
raise exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: Table 'langchain_pg_collection' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.
```
### Suggestion:
_No response_ | https://github.com/langchain-ai/langchain/issues/14699 | https://github.com/langchain-ai/langchain/pull/14726 | 1cec0afc62697ee730aa1378b69ab4556ffecffc | 9fb26a2a718bc18a5ce48f04cf6b66bc4751b734 | 2023-12-14T06:51:40Z | python | 2023-12-14T21:27:30Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,467 | ["libs/langchain/langchain/chains/llm_summarization_checker/base.py", "libs/langchain/tests/unit_tests/chains/test_llm_summarization_checker.py"] | DeprecationWarning: `input_variables' is deprecated and ignored | ### System Info
langchain==0.0.346
### Who can help?
@hwch
### Information
- [ ] The official example notebooks/scripts
- [ ] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [X] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
https://github.com/langchain-ai/langchain/pull/14266 added a deprecation for `input_variables` argument of `PromptTemplate.from_file`. It was released in 0.0.346.
However, https://github.com/langchain-ai/langchain/blob/v0.0.346/libs/langchain/langchain/chains/llm_summarization_checker/base.py#L20-L31 still uses `input_variables` at the module-level. So now this `DeprecationWarning` is emitted simply for importing from LangChain.
Can we fix this, so LangChain isn't emitting `DeprecationWarning`s?
### Expected behavior
I expect LangChain to not automatically emit `DeprecationWarning`s when importing from it | https://github.com/langchain-ai/langchain/issues/14467 | https://github.com/langchain-ai/langchain/pull/14468 | df95abb7e76f4432f5d270e4065d2cb2839a9f64 | b9ef92f2f4bb1e4322dff040c4474c0922fbf546 | 2023-12-08T21:10:46Z | python | 2023-12-13T01:43:27Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,402 | ["libs/community/langchain_community/embeddings/azure_openai.py"] | AzureOpenAIEmbeddings cannot authenticate with azure_ad_token_provider | ### System Info
Langchain: 0.0.346
OpenAI: 1.3.7
### Who can help?
_No response_
### Information
- [ ] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
Simple script to authenticate to Azure with RBAC
```
from langchain.embeddings import AzureOpenAIEmbeddings
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
token_provider = get_bearer_token_provider(DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default")
embeddings = AzureOpenAIEmbeddings(azure_endpoint='xxxxxxx', azure_ad_token_provider=token_provider)
```
### Expected behavior
Should authenticate, but is seems like the `azure_ad_token_provider` is not added to the values dict
langchain/embeddings/azure_openai.py line 80-86
```
values["azure_endpoint"] = values["azure_endpoint"] or os.getenv(
"AZURE_OPENAI_ENDPOINT"
)
values["azure_ad_token"] = values["azure_ad_token"] or os.getenv(
"AZURE_OPENAI_AD_TOKEN"
)
```
Other parameters are added to values, but not `azure_ad_token_provider` | https://github.com/langchain-ai/langchain/issues/14402 | https://github.com/langchain-ai/langchain/pull/14432 | 8a4162d15ef670a202b25fe483e80fe2ae3f5668 | dce3c74905ce2632f614961d3462960d2ce2ad28 | 2023-12-07T15:35:19Z | python | 2023-12-13T22:37:39Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,342 | ["docs/docs/modules/data_connection/retrievers/multi_vector.ipynb", "docs/docs/modules/data_connection/retrievers/parent_document_retriever.ipynb", "libs/langchain/langchain/retrievers/multi_vector.py", "libs/langchain/tests/unit_tests/indexes/test_indexing.py", "libs/langchain/tests/unit_tests/retrievers/test_multi_vector.py", "libs/langchain/tests/unit_tests/retrievers/test_parent_document.py"] | Error: | ### System Info
I try this example code
```
from langchain.retrievers import ParentDocumentRetriever
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.storage import InMemoryStore
# This text splitter is used to create the parent documents
parent_splitter = RecursiveCharacterTextSplitter(chunk_size=2000)
# This text splitter is used to create the child documents
# It should create documents smaller than the parent
child_splitter = RecursiveCharacterTextSplitter(chunk_size=400)
# The vectorstore to use to index the child chunks
vectorstore = Chroma(embedding_function=OpenAIEmbeddings())
# The storage layer for the parent documents
store = InMemoryStore()
vectorstore = Chroma(collection_name="test", embedding_function=OpenAIEmbeddings())
```
# Initialize the retriever
parent_document_retriever = ParentDocumentRetriever(
vectorstore=vectorstore,
docstore=store,
child_splitter=child_splitter,
parent_splitter=parent_splitter,
)
but I encountered an error:
```
1 # Initialize the retriever
----> 2 parent_document_retriever = ParentDocumentRetriever(
3 vectorstore=vectorstore,
4 docstore=store,
5 child_splitter=child_splitter,
TypeError: MultiVectorRetriever.__init__() got an unexpected keyword argument 'child_splitter'
```
### Who can help?
_No response_
### Information
- [X] The official example notebooks/scripts
- [ ] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
```
from langchain.retrievers import ParentDocumentRetriever
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.storage import InMemoryStore
# This text splitter is used to create the parent documents
parent_splitter = RecursiveCharacterTextSplitter(chunk_size=2000)
# This text splitter is used to create the child documents
# It should create documents smaller than the parent
child_splitter = RecursiveCharacterTextSplitter(chunk_size=400)
# The vectorstore to use to index the child chunks
vectorstore = Chroma(embedding_function=OpenAIEmbeddings())
# The storage layer for the parent documents
store = InMemoryStore()
vectorstore = Chroma(collection_name="test", embedding_function=OpenAIEmbeddings())
# Initialize the retriever
parent_document_retriever = ParentDocumentRetriever(
vectorstore=vectorstore,
docstore=store,
child_splitter=child_splitter,
parent_splitter=parent_splitter,
)
```
### Expected behavior
I can run. | https://github.com/langchain-ai/langchain/issues/14342 | https://github.com/langchain-ai/langchain/pull/14350 | 7bdfc43766e72e4b67512bd85119b1c797035b86 | 867ca6d0bec2dac5330257bc886880743f3ece4d | 2023-12-06T11:09:11Z | python | 2023-12-06T19:12:50Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,232 | ["libs/community/langchain_community/vectorstores/neo4j_vector.py", "libs/community/tests/integration_tests/vectorstores/test_neo4jvector.py", "libs/community/tests/unit_tests/vectorstores/test_neo4j.py"] | similarity_search_with_score does not accept "!" in the query | ### System Info
python 3.11.6
langchain==0.0.345
langchain-core==0.0.9
jupyter_client==8.6.0
jupyter_core==5.5.0
ipykernel==6.27.0
ipython==8.17.2
on mac M2
### Who can help?
@baskaryan @tomasonjo @hwchase17
### Information
- [ ] The official example notebooks/scripts
- [ ] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
1. The setup is the same as in https://github.com/langchain-ai/langchain/issues/14231, although I don't think it matters.
2. Run `existing_graph.similarity_search_with_score("It is the end of the world. Take shelter!")`
3. It returns the following error
---------------------------------------------------------------------------
ClientError Traceback (most recent call last)
[/Users/josselinperrus/Projects/streetpress/neo4j.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/neo4j.ipynb) Cell 17 line 1
----> [1](vscode-notebook-cell:/Users/josselinperrus/Projects/streetpress/neo4j.ipynb#X21sZmlsZQ%3D%3D?line=0) existing_graph.similarity_search_with_score("It is the end of the world. Take shelter !")
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:550](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:550), in Neo4jVector.similarity_search_with_score(self, query, k)
[540](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:540) """Return docs most similar to query.
[541](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:541)
[542](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:542) Args:
(...)
[547](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:547) List of Documents most similar to the query and score for each
[548](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:548) """
[549](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:549) embedding = self.embedding.embed_query(query)
--> [550](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:550) docs = self.similarity_search_with_score_by_vector(
[551](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:551) embedding=embedding, k=k, query=query
[552](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:552) )
[553](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:553) return docs
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:595](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:595), in Neo4jVector.similarity_search_with_score_by_vector(self, embedding, k, **kwargs)
[586](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:586) read_query = _get_search_index_query(self.search_type) + retrieval_query
[587](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:587) parameters = {
[588](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:588) "index": self.index_name,
[589](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:589) "k": k,
(...)
[592](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:592) "query": kwargs["query"],
[593](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:593) }
--> [595](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:595) results = self.query(read_query, params=parameters)
[597](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:597) docs = [
[598](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:598) (
[599](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:599) Document(
(...)
[607](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:607) for result in results
[608](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:608) ]
[609](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:609) return docs
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:242](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:242), in Neo4jVector.query(self, query, params)
[240](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:240) try:
[241](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:241) data = session.run(query, params)
--> [242](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:242) return [r.data() for r in data]
[243](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:243) except CypherSyntaxError as e:
[244](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:244) raise ValueError(f"Cypher Statement is not valid\n{e}")
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:242](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:242), in <listcomp>(.0)
[240](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:240) try:
[241](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:241) data = session.run(query, params)
--> [242](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:242) return [r.data() for r in data]
[243](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:243) except CypherSyntaxError as e:
[244](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/langchain/vectorstores/neo4j_vector.py:244) raise ValueError(f"Cypher Statement is not valid\n{e}")
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:270](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:270), in Result.__iter__(self)
[268](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:268) yield self._record_buffer.popleft()
[269](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:269) elif self._streaming:
--> [270](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:270) self._connection.fetch_message()
[271](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:271) elif self._discarding:
[272](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/work/result.py:272) self._discard()
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:178](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:178), in ConnectionErrorHandler.__getattr__.<locals>.outer.<locals>.inner(*args, **kwargs)
[176](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:176) def inner(*args, **kwargs):
[177](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:177) try:
--> [178](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:178) func(*args, **kwargs)
[179](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:179) except (Neo4jError, ServiceUnavailable, SessionExpired) as exc:
[180](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:180) assert not asyncio.iscoroutinefunction(self.__on_error)
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:849](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:849), in Bolt.fetch_message(self)
[845](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:845) # Receive exactly one message
[846](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:846) tag, fields = self.inbox.pop(
[847](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:847) hydration_hooks=self.responses[0].hydration_hooks
[848](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:848) )
--> [849](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:849) res = self._process_message(tag, fields)
[850](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:850) self.idle_since = perf_counter()
[851](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py:851) return res
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:374](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:374), in Bolt5x0._process_message(self, tag, fields)
[372](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:372) self._server_state_manager.state = self.bolt_states.FAILED
[373](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:373) try:
--> [374](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:374) response.on_failure(summary_metadata or {})
[375](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:375) except (ServiceUnavailable, DatabaseUnavailable):
[376](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py:376) if self.pool:
File [~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:245](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:245), in Response.on_failure(self, metadata)
[243](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:243) handler = self.handlers.get("on_summary")
[244](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:244) Util.callback(handler)
--> [245](https://file+.vscode-resource.vscode-cdn.net/Users/josselinperrus/Projects/streetpress/~/Projects/streetpress/venv/lib/python3.11/site-packages/neo4j/_sync/io/_common.py:245) raise Neo4jError.hydrate(**metadata)
ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure `db.index.fulltext.queryNodes`: Caused by: org.apache.lucene.queryparser.classic.ParseException: Encountered "<EOF>" at line 1, column 42.
Was expecting one of:
<BAREOPER> ...
"(" ...
"*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
<REGEXPTERM> ...
"[" ...
"{" ...
<NUMBER> ...
<TERM> ...
"*" ...
}
### Expected behavior
No error | https://github.com/langchain-ai/langchain/issues/14232 | https://github.com/langchain-ai/langchain/pull/14646 | 7e6ca3c2b95594d7bdee4ba1337896b5dca1833e | ea2616ae23be97135696f7ace838ff38661426fc | 2023-12-04T16:07:02Z | python | 2023-12-13T17:09:50Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,175 | ["libs/langchain/langchain/embeddings/clarifai.py", "libs/langchain/langchain/llms/clarifai.py"] | ModuleNotFoundError: No module named 'clarifai.auth' | ### System Info
platform: Vagrant - Ubuntu 2204
python: 3.9.18
langchain version: 0.0.344
langchain core: 0.0.8
clarifai: 9.10.4
### Who can help?
@hwchase17 @agola11
### Information
- [X] The official example notebooks/scripts
- [x] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
1. Install the latest version of clarifai (9.10.4)
2. Run the example: https://python.langchain.com/docs/integrations/llms/clarifai
``` bash
Could not import clarifai python package. Please install it with `pip install clarifai`.
File 'clarifai.py', line 77, in validate_environment:
raise ImportError( Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/env/lib/python3.9/site-packages/langchain/llms/clarifai.py", line 74, in validate_environment
from clarifai.auth.helper import ClarifaiAuthHelper
ModuleNotFoundError: No module named 'clarifai.auth'
```
### Expected behavior
I expect **ClarifaiAuthHelper** to import correctly.
In the latest version of clarifai **ClarifaiAuthHelper** is imported in this way:
``` python
from clarifai.client.auth.helper import ClarifaiAuthHelper
``` | https://github.com/langchain-ai/langchain/issues/14175 | https://github.com/langchain-ai/langchain/pull/14215 | ca8a022cd937ba398bb5544f4428f6ceafe56b84 | 8504ec56e4fc25308ba5baa4beaca944d9ff3371 | 2023-12-02T15:28:09Z | python | 2023-12-04T19:53:34Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,159 | ["docs/docs/use_cases/tagging.ipynb"] | create_tagging_chain_pydantic() pydantic schema validation errors | ### System Info
[pydantic_chain_test_code.txt](https://github.com/langchain-ai/langchain/files/13532796/pydantic_chain_test_code.txt)
[error_log.txt](https://github.com/langchain-ai/langchain/files/13532799/error_log.txt)
### Who can help?
@agola11 @hwchase17
The attached code is adopted from the official example from https://python.langchain.com/docs/use_cases/tagging. I am using the AzureChatOpenAI API, but I don't think the cause is related to that. I added an example prompt to ensure that the llm is working properly.
It appears that even when passing in a confirmed subclass of BaseModel, which is pydantic_schema, create_tagging_chain_pydantic(Tags, llm) is triggering validation errors. Please see the attached test code and error log.
### Information
- [X] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [X] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
Run the attached code and match it with the attached error log, which shows the version numbers of Python, Langchain and Pydantic. I am running on WIndows 11.:
Python version: 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)]
Langchain version: 0.0.344
Pydantic version: 2.5.2
### Expected behavior
Expected behavior is as shown in the last example on https://python.langchain.com/docs/use_cases/tagging
Tags(sentiment='sad', aggressiveness=5, language='spanish') | https://github.com/langchain-ai/langchain/issues/14159 | https://github.com/langchain-ai/langchain/pull/14165 | 641e401ba857e7f6f895b54fbb02c0560d2283a5 | 702a6d7044b01b82730e32dd61c83fd99c6272ab | 2023-12-02T00:35:53Z | python | 2023-12-04T20:06:04Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,127 | ["libs/langchain/langchain/llms/__init__.py"] | Volc Engine MaaS has wrong entry in LLM type to class dict (causing SpaCy to not work with LangChain anymore) | ### System Info
* Windows 11 Home (build 22621.2715)
* Python 3.12.0
* Clean virtual environment using Poetry with following dependencies:
```
python = "3.12.0"
langchain = "0.0.344"
spacy = "3.7.2"
spacy-llm = "0.6.4"
```
### Who can help?
@h3l As the creator of the pull request where VolcEngine was introduced
@baskaryan As tag handler of that pull request
### Information
- [ ] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
Anything that triggers spaCy's registry to make an inventory, for example:
```python
import spacy
spacy.blank("en")
```
With the last part of the Traceback being:
```
File "PROJECT_FOLDER\.venv\Lib\site-packages\langchain\llms\__init__.py", line 699, in __getattr__
k: v() for k, v in get_type_to_cls_dict().items()
^^^
File "PROJECT_FOLDER\.venv\Lib\site-packages\langchain_core\load\serializable.py", line 97, in __init__
super().__init__(**kwargs)
File "PROJECT_FOLDER\.venv\Lib\site-packages\pydantic\v1\main.py", line 341, in __init__
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for VolcEngineMaasLLM
__root__
Did not find volc_engine_maas_ak, please add an environment variable `VOLC_ACCESSKEY` which contains it, or pass `volc_engine_maas_ak` as a named parameter. (type=value_error)
```
#### What I think causes this
I am quite certain that this is caused by [`langchain.llms.__init__.py:869 (for commit b161f30)`](https://github.com/langchain-ai/langchain/blob/b161f302ff56a14d8d0331cbec4a3efa23d06e1a/libs/langchain/langchain/llms/__init__.py#L869C51-L869C51):
```python
def get_type_to_cls_dict() -> Dict[str, Callable[[], Type[BaseLLM]]]:
return {
"ai21": _import_ai21,
"aleph_alpha": _import_aleph_alpha,
"amazon_api_gateway": _import_amazon_api_gateway,
...
"qianfan_endpoint": _import_baidu_qianfan_endpoint,
"yandex_gpt": _import_yandex_gpt,
# Line below is the only that actually calls the import function, returning a class instead of an import function
"VolcEngineMaasLLM": _import_volcengine_maas(),
}
```
The Volc Engine Maas LLM is the only in this dict to actually call the import function, while all other entries only the function itself, and do not call it.
### Expected behavior
Class to type dict only returns import functions, not actual classes:
```python
def get_type_to_cls_dict() -> Dict[str, Callable[[], Type[BaseLLM]]]:
return {
"ai21": _import_ai21,
"aleph_alpha": _import_aleph_alpha,
"amazon_api_gateway": _import_amazon_api_gateway,
...
"qianfan_endpoint": _import_baidu_qianfan_endpoint,
"yandex_gpt": _import_yandex_gpt,
# What I think would be correct (now without function call)
"VolcEngineMaasLLM": _import_volcengine_maas,
}
```
Unfortunately I don't have time to put in a PR myself, but I hope this helps finding the solution!
| https://github.com/langchain-ai/langchain/issues/14127 | https://github.com/langchain-ai/langchain/pull/14194 | 6ae0194dc70119d8b05a0624a6cc4950f9f84608 | 818252b1f8b9ac9af6bb80d43b21c5e95d6b2e11 | 2023-12-01T13:58:13Z | python | 2023-12-03T16:43:23Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 14,069 | ["libs/langchain/langchain/chat_models/azure_openai.py", "libs/langchain/langchain/llms/openai.py"] | AzureOpenAI azure_ad_token_provider Keyerror | ### System Info
When I use below snippet of code
```
import os
from azure.identity import DefaultAzureCredential
from azure.identity import get_bearer_token_provider
from langchain.llms import AzureOpenAI
from langchain.chat_models import AzureChatOpenAI
credential = DefaultAzureCredential(interactive_browser_tenant_id=tenant_id,
interactive_browser_client_id=client_id,
client_secret=client_secret)
token_provider = get_bearer_token_provider(credential, "https://cognitiveservices.azure.com/.default")
endpoint = "https://xxxx.openai.azure.com"
client = AzureOpenAI( azure_endpoint=endpoint,
api_version="2023-05-15",
azure_deployment="example-gpt-4",
azure_ad_token_provider=token_provider)
```
I get error :
```---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[36], line 21
18 # api_version = "2023-05-15"
19 endpoint = "https://xxxx.openai.azure.com"
---> 21 client = AzureOpenAI(
22 azure_endpoint=endpoint,
23 api_version="2023-05-15",
24 azure_deployment="example-gpt-4",
25 azure_ad_token_provider=token_provider,
26 )
File ~/PycharmProjects/aicc/env/lib/python3.9/site-packages/langchain_core/load/serializable.py:97, in Serializable.__init__(self, **kwargs)
96 def __init__(self, **kwargs: Any) -> None:
---> 97 super().__init__(**kwargs)
98 self._lc_kwargs = kwargs
File ~/PycharmProjects/aicc/env/lib/python3.9/site-packages/pydantic/v1/main.py:339, in BaseModel.__init__(__pydantic_self__, **data)
333 """
334 Create a new model by parsing and validating input data from keyword arguments.
335
336 Raises ValidationError if the input data cannot be parsed to form a valid model.
337 """
338 # Uses something other than `self` the first arg to allow "self" as a settable attribute
--> 339 values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
340 if validation_error:
341 raise validation_error
File ~/PycharmProjects/aicc/env/lib/python3.9/site-packages/pydantic/v1/main.py:1102, in validate_model(model, input_data, cls)
1100 continue
1101 try:
-> 1102 values = validator(cls_, values)
1103 except (ValueError, TypeError, AssertionError) as exc:
1104 errors.append(ErrorWrapper(exc, loc=ROOT_KEY))
File ~/PycharmProjects/aicc/env/lib/python3.9/site-packages/langchain/llms/openai.py:887, in AzureOpenAI.validate_environment(cls, values)
877 values["openai_api_base"] += (
878 "/deployments/" + values["deployment_name"]
879 )
880 values["deployment_name"] = None
881 client_params = {
882 "api_version": values["openai_api_version"],
883 "azure_endpoint": values["azure_endpoint"],
884 "azure_deployment": values["deployment_name"],
885 "api_key": values["openai_api_key"],
886 "azure_ad_token": values["azure_ad_token"],
--> 887 "azure_ad_token_provider": values["azure_ad_token_provider"],
888 "organization": values["openai_organization"],
889 "base_url": values["openai_api_base"],
890 "timeout": values["request_timeout"],
891 "max_retries": values["max_retries"],
892 "default_headers": values["default_headers"],
893 "default_query": values["default_query"],
894 "http_client": values["http_client"],
895 }
896 values["client"] = openai.AzureOpenAI(**client_params).completions
897 values["async_client"] = openai.AsyncAzureOpenAI(
898 **client_params
899 ).completions
KeyError: 'azure_ad_token_provider'
```
Ive also tried AzureChatOpenAI , and I get the same error back.
The error is not reproduced when I use openai library AzureOpenAI .
Also on openai the azure_ad_token_provider has type azure_ad_token_provider: 'AzureADTokenProvider | None' = None while in langchain it has type azure_ad_token_provider: Optional[str] = None which also makes me wonder if it would take as input a different type than string to work with.
any ideas on how to fix this? Im actually using Azure Service principal authentication, and if I use as alternative field azure_ad_token = credential.get_token(“https://cognitiveservices.azure.com/.default”).token I get token expired after 60min which does not happen with a bearer token, so It is important to me to make the token_provider work.
libraries :
pydantic 1.10.12
pydantic_core 2.10.1
openai 1.2.0
langchain 0.0.342
langchain-core 0.0.7
### Who can help?
@hwchase17 @agola11
### Information
- [X] The official example notebooks/scripts
- [ ] My own modified scripts
### Related Components
- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
import os
from azure.identity import DefaultAzureCredential
from azure.identity import get_bearer_token_provider
from langchain.llms import AzureOpenAI
from langchain.chat_models import AzureChatOpenAI
credential = DefaultAzureCredential(interactive_browser_tenant_id=tenant_id,
interactive_browser_client_id=client_id,
client_secret=client_secret)
token_provider = get_bearer_token_provider(credential, "https://cognitiveservices.azure.com/.default")
endpoint = "https://xxxx.openai.azure.com"
client = AzureOpenAI( azure_endpoint=endpoint,
api_version="2023-05-15",
azure_deployment="example-gpt-4",
azure_ad_token_provider=token_provider)
### Expected behavior
client = AzureOpenAI( azure_endpoint=endpoint,
api_version="2023-05-15",
azure_deployment="example-gpt-4",
azure_ad_token_provider=token_provider)
should return a Runnable instance which I can use for LLMChain | https://github.com/langchain-ai/langchain/issues/14069 | https://github.com/langchain-ai/langchain/pull/14166 | 9938086df07d69d24f9770209ea9087d3b906155 | 62505043be20cf8af491e30785a6ca0eeb1d276e | 2023-11-30T13:39:55Z | python | 2023-12-03T16:55:25Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,803 | ["libs/langchain/langchain/chains/graph_qa/cypher_utils.py", "libs/langchain/tests/unit_tests/data/cypher_corrector.csv"] | CypherQueryCorrector cannot validate a correct cypher, some query types are not handled | CypherQueryCorrector does not handle with some query types:
If there is such a query (There is a comma in the match between clauses):
```
MATCH (a:APPLE {apple_id: 123})-[:IN]->(b:BUCKET), (ba:BANANA {name: banana1})
```
Corresponding code section:
- It extract a relation between BUCKET and BANANA, however there is none.
- ELSE case should be divided into cases. (INCOMING relation, OUTGOING relation, BIDIRECTIONAL relation, NO relation etc.)
- IF there is no relation and only a comma between clauses, then it should not try validation.
https://github.com/langchain-ai/langchain/blob/751226e067bc54a70910763c0eebb34544aaf47c/libs/langchain/langchain/chains/graph_qa/cypher_utils.py#L228 | https://github.com/langchain-ai/langchain/issues/13803 | https://github.com/langchain-ai/langchain/pull/13849 | e42e95cc11cc99b8597dc6665a3cfdbb0a0f37e6 | 1ad65f7a982affc9429d10a4919a78ffd54646dc | 2023-11-24T08:39:00Z | python | 2023-11-27T03:30:11Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,667 | ["libs/core/langchain_core/prompts/loading.py"] | Can not load chain with ChatPromptTemplate | ### System Info
LangChain version: `0.0.339`
Python version: `3.10`
### Who can help?
@hwchase17
### Information
- [ ] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [X] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
When serializing the `ChatPromptTemplate`, it saves it in a JSON/YAML format like this:
```
{'input_variables': ['question', 'context'],
'output_parser': None,
'partial_variables': {},
'messages': [{'prompt': {'input_variables': ['context', 'question'],
'output_parser': None,
'partial_variables': {},
'template': "...",
'template_format': 'f-string',
'validate_template': True,
'_type': 'prompt'},
'additional_kwargs': {}}],
'_type': 'chat'}
```
Note that the `_type` is "chat".
However, LangChain's `load_prompt_from_config` [does not recognize "chat" as the supported prompt type](https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/prompts/loading.py#L19).
Here is a minimal example to reproduce the issue:
```python
from langchain.prompts import ChatPromptTemplate
from langchain.chains import RetrievalQA
from langchain.llms import OpenAI
from langchain.vectorstores import FAISS
from langchain.embeddings import OpenAIEmbeddings
from langchain.chains.loading import load_chain
TEMPLATE = """Answer the question based on the context:
{context}
Question: {question}
Answer:
"""
chat_prompt = ChatPromptTemplate.from_template(TEMPLATE)
llm = OpenAI()
def get_retriever(persist_dir = None):
vectorstore = FAISS.from_texts(
["harrison worked at kensho"], embedding=OpenAIEmbeddings()
)
return vectorstore.as_retriever()
chain_with_chat_prompt = RetrievalQA.from_chain_type(
llm=llm,
chain_type="stuff",
retriever=get_retriever(),
chain_type_kwargs={"prompt": chat_prompt},
)
chain_with_prompt_saved_path = "./chain_with_prompt.yaml"
chain_with_prompt.save(chain_with_prompt_saved_path)
loaded_chain = load_chain(chain_with_prompt_saved_path, retriever=get_retriever())
```
The above script failed with the error:
`ValueError: Loading chat prompt not supported`
### Expected behavior
Load a chain that contains `ChatPromptTemplate` should work. | https://github.com/langchain-ai/langchain/issues/13667 | https://github.com/langchain-ai/langchain/pull/13818 | 8a3e0c9afa59487b191e411a4acae55e39db7fa9 | b3e08f9239d5587fa61adfa9c58dafdf6b740a38 | 2023-11-21T17:40:19Z | python | 2023-11-27T16:39:50Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,539 | ["libs/langchain/langchain/embeddings/azure_openai.py", "libs/langchain/langchain/embeddings/openai.py", "libs/langchain/tests/integration_tests/embeddings/test_azure_openai.py"] | New update broke embeddings models | ### System Info
LangChain version: 0.0.337
Python version: 3.10.13
### Who can help?
_No response_
### Information
- [ ] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
db = Chroma.from_documents(docs, AzureOpenAIEmbeddings())
### Expected behavior
This worked on previous versions of LangChain using OpenAIEmbeddings(), but now I get this error
BadRequestError: Error code: 400 - {'error': {'message': 'Too many inputs. The max number of inputs is 16. We hope to increase the number of inputs per request soon. Please contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 for further questions.', 'type': 'invalid_request_error', 'param': None, 'code': None}}
| https://github.com/langchain-ai/langchain/issues/13539 | https://github.com/langchain-ai/langchain/pull/13425 | e53f59f01a2d5020e4a3248380d7a04891c8be1f | 6bf9b2cb51f94872bb251ba22fe7e3aefb753d43 | 2023-11-17T21:47:33Z | python | 2023-11-20T02:34:51Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,507 | ["libs/langchain/langchain/llms/vllm.py"] | VLLMOpenAI -- create() got an unexpected keyword argument 'api_key' | ### System Info
Python 3.9
langchain 0.0.336
openai 1.3.2
pandas 2.1.3
### Who can help?
@EYU
### Information
- [X] The official example notebooks/scripts
- [ ] My own modified scripts
### Related Components
- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
First of all, thank you for this great library !
Concerning the bug, I have a vllm openai server (0.2.1.post1) running locally started with the following command:
```
python -m vllm.entrypoints.openai.api_server --model ./zephyr-7b-beta --served-model-name zephyr-7b-beta
```
On the client side, I have this piece of code, slightly adapted from the documentation (only the model name changes).
```python
from langchain.llms import VLLMOpenAI
llm = VLLMOpenAI(
openai_api_key="EMPTY",
openai_api_base="http://localhost:8000/v1",
model_name="zephyr-7b-beta",
)
print(llm("Rome is"))
```
And I got the following error:
```text
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[19], line 6
1 llm = VLLMOpenAI(
2 openai_api_key="EMPTY",
3 openai_api_base="http://localhost:8000/v1",
4 model_name="zephyr-7b-beta",
5 )
----> 6 llm("Rome is")
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/langchain/llms/base.py:876, in BaseLLM.__call__(self, prompt, stop, callbacks, tags, metadata, **kwargs)
869 if not isinstance(prompt, str):
870 raise ValueError(
871 "Argument `prompt` is expected to be a string. Instead found "
872 f"{type(prompt)}. If you want to run the LLM on multiple prompts, use "
873 "`generate` instead."
874 )
875 return (
--> 876 self.generate(
877 [prompt],
878 stop=stop,
879 callbacks=callbacks,
880 tags=tags,
881 metadata=metadata,
882 **kwargs,
883 )
884 .generations[0][0]
885 .text
886 )
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/langchain/llms/base.py:656, in BaseLLM.generate(self, prompts, stop, callbacks, tags, metadata, run_name, **kwargs)
641 raise ValueError(
642 "Asked to cache, but no cache found at `langchain.cache`."
643 )
644 run_managers = [
645 callback_manager.on_llm_start(
646 dumpd(self),
(...)
654 )
655 ]
--> 656 output = self._generate_helper(
657 prompts, stop, run_managers, bool(new_arg_supported), **kwargs
658 )
659 return output
660 if len(missing_prompts) > 0:
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/langchain/llms/base.py:544, in BaseLLM._generate_helper(self, prompts, stop, run_managers, new_arg_supported, **kwargs)
542 for run_manager in run_managers:
543 run_manager.on_llm_error(e)
--> 544 raise e
545 flattened_outputs = output.flatten()
546 for manager, flattened_output in zip(run_managers, flattened_outputs):
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/langchain/llms/base.py:531, in BaseLLM._generate_helper(self, prompts, stop, run_managers, new_arg_supported, **kwargs)
521 def _generate_helper(
522 self,
523 prompts: List[str],
(...)
527 **kwargs: Any,
528 ) -> LLMResult:
529 try:
530 output = (
--> 531 self._generate(
532 prompts,
533 stop=stop,
534 # TODO: support multiple run managers
535 run_manager=run_managers[0] if run_managers else None,
536 **kwargs,
537 )
538 if new_arg_supported
539 else self._generate(prompts, stop=stop)
540 )
541 except BaseException as e:
542 for run_manager in run_managers:
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/langchain/llms/openai.py:454, in BaseOpenAI._generate(self, prompts, stop, run_manager, **kwargs)
442 choices.append(
443 {
444 "text": generation.text,
(...)
451 }
452 )
453 else:
--> 454 response = completion_with_retry(
455 self, prompt=_prompts, run_manager=run_manager, **params
456 )
457 if not isinstance(response, dict):
458 # V1 client returns the response in an PyDantic object instead of
459 # dict. For the transition period, we deep convert it to dict.
460 response = response.dict()
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/langchain/llms/openai.py:114, in completion_with_retry(llm, run_manager, **kwargs)
112 """Use tenacity to retry the completion call."""
113 if is_openai_v1():
--> 114 return llm.client.create(**kwargs)
116 retry_decorator = _create_retry_decorator(llm, run_manager=run_manager)
118 @retry_decorator
119 def _completion_with_retry(**kwargs: Any) -> Any:
File ~/softwares/miniconda3/envs/demo/lib/python3.9/site-packages/openai/_utils/_utils.py:299, in required_args.<locals>.inner.<locals>.wrapper(*args, **kwargs)
297 msg = f"Missing required argument: {quote(missing[0])}"
298 raise TypeError(msg)
--> 299 return func(*args, **kwargs)
TypeError: create() got an unexpected keyword argument 'api_key'
```
It seems that if I remove the line 158 from `langchain/llms/vllm.py`, the code is working.
### Expected behavior
I expect a completion with no error. | https://github.com/langchain-ai/langchain/issues/13507 | https://github.com/langchain-ai/langchain/pull/13517 | 6bc08266e0c9ca7841bb322259e69a9c0dd6a08d | 69d39e2173fcb44cdcd334cb912acaf7b148dff6 | 2023-11-17T08:56:07Z | python | 2023-11-20T01:49:55Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,407 | ["libs/core/langchain_core/runnables/base.py", "libs/core/tests/unit_tests/runnables/test_runnable.py"] | RunnableLambda: returned runnable called synchronously when using ainvoke | ### System Info
langchain on master branch
### Who can help?
_No response_
### Information
- [ ] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [X] Async
### Reproduction
```
from langchain.schema.runnable import RunnableLambda
import asyncio
def idchain_sync(__input):
print(f'sync chain call: {__input}')
return __input
async def idchain_async(__input):
print(f'async chain call: {__input}')
return __input
idchain = RunnableLambda(func=idchain_sync,afunc=idchain_async)
def func(__input):
return idchain
asyncio.run(RunnableLambda(func).ainvoke('toto'))
#printss 'sync chain call: toto' instead of 'async chain call: toto'
```
### Expected behavior
LCEL's route can cause chains to be silently run synchronously, while the user uses ainvoke...
When calling a RunnableLambda A returning a chain B with ainvoke, we would expect the new chain B to be called with ainvoke;
However, if the function provided to RunnableLambda A is not async, then the chain B will be called with invoke, silently causing all the rest of the chain to be called synchronously.
| https://github.com/langchain-ai/langchain/issues/13407 | https://github.com/langchain-ai/langchain/pull/13408 | 391f200eaab9af587eea902b264f2d3af929b268 | e17edc4d0b1dccc98df2a7d1db86bfcc0eb66ca5 | 2023-11-15T17:27:49Z | python | 2023-11-28T11:18:26Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,356 | ["libs/langchain/langchain/document_loaders/notiondb.py"] | Issue: Notion DB loader for doesn't supports some properties | ### Issue you'd like to raise.
notion page properties
https://developers.notion.com/reference/page-property-values
Current version Notion DB loader for doesn't supports following properties for metadata
- `checkbox`
- `email`
- `number`
- `select`
### Suggestion:
I would like to make a PR to fix this issue if it's okay. | https://github.com/langchain-ai/langchain/issues/13356 | https://github.com/langchain-ai/langchain/pull/13358 | c9b9359647f1f1b24f106b93f180509db7932950 | 3b5e8bacfa6d5b7c223cb93f09c6c21d39542b43 | 2023-11-14T17:20:22Z | python | 2023-11-15T04:31:12Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 13,326 | ["libs/langchain/langchain/chat_loaders/imessage.py", "libs/langchain/tests/unit_tests/chat_loaders/data/imessage_chat.db", "libs/langchain/tests/unit_tests/chat_loaders/test_imessage.py"] | Enhancing iMessageChatLoader to prevent skipping messages with extractable content | ### Feature request
Implement extraction of message content whenever iMessageChatLoader skips messages with null `text` field even though the content is present in other fields.
### Motivation
Due to iMessage's database schema change in its new MacOS Ventura, newer messages now have content encoded in the `attributedBody` body, with the `text` field being null.
This issue was originally raised by @idvorkin in Issue #10680.
### Your contribution
We intend to submit a pull request for this issue close to the end of November. | https://github.com/langchain-ai/langchain/issues/13326 | https://github.com/langchain-ai/langchain/pull/13634 | e5256bcb69bde036cd02ca4871333451efc11833 | 32d794f5a3dac334d258f11a1b4b7d727a3549a4 | 2023-11-14T04:08:46Z | python | 2023-11-28T20:45:43Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 12,943 | ["libs/langchain/langchain/embeddings/openai.py", "libs/langchain/tests/integration_tests/embeddings/test_openai.py"] | OpenAIEmbeddings() does not work because of these bugs | ### System Info
Python Version: 3.11
LangChain Version: 0.0.331
OpenAI Version: 1.0.0
### Who can help?
@hwchase17, @agola11, @eyurtsev
### Information
- [ ] The official example notebooks/scripts
- [X] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
The following error has been caused due to the recent change in version of OpenAI to 1.0.0
**Use OpenAI==0.28.1 to fix this error**
With the code:
`embeddings = OpenAIEmbeddings()`
The error produced is:
`AttributeError: module 'openai' has no attribute 'Embedding'. Did you mean: 'embeddings'?`
I went through the `langchain/embeddings/openai.py` file and then changed `value["client"] = openai.Embedding` to `value["client"] = openai.embeddings`, but then I receive this new error:
`AttributeError: module 'openai' has no attribute 'error'` in the same file (`langchain/embeddings/openai.py`)
### Expected behavior
There should be no error when calling this function. | https://github.com/langchain-ai/langchain/issues/12943 | https://github.com/langchain-ai/langchain/pull/12969 | fdbb45d79e69485e0892dadf48b32dc8efadde9b | 0c81cd923e04bb68fdf3ad299946d7fa85a21f9f | 2023-11-06T17:56:29Z | python | 2023-11-07T02:52:33Z |
closed | langchain-ai/langchain | https://github.com/langchain-ai/langchain | 12,068 | ["docs/docs/integrations/document_loaders/pdf-amazonTextractPDFLoader.ipynb", "libs/langchain/langchain/document_loaders/parsers/pdf.py", "libs/langchain/poetry.lock", "libs/langchain/pyproject.toml", "libs/langchain/tests/integration_tests/document_loaders/test_pdf.py"] | feat: Add Linearized output to Textract PDFLoader | ### Feature request
Textract released the [LAYOUT](https://docs.aws.amazon.com/textract/latest/dg/layoutresponse.html) feature, which identifies different layout elements like tables, lists, figures, text-paragraphs and titles. This should be used by the AmazonTextractPDFParser to generate a linearized output to improve downstream LLMs accuracy with those hints.
Text output should render tables and key/value pairs and text in reading order for multi-column text and prefix lists with a *, when features like LAYOUT, TABLES, FORMS are passed to the textract call
### Motivation
Improve downstream LLM accuracy
### Your contribution
I'll submit a PR for this feature. | https://github.com/langchain-ai/langchain/issues/12068 | https://github.com/langchain-ai/langchain/pull/12446 | a7d5e0ce8a30bd81b8f7b544a4859c31d5f25445 | 0c7f1d8b219e87e3ffd14a15a452622c532c7e95 | 2023-10-20T08:28:07Z | python | 2023-10-31T01:02:10Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.