You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the maven_artifact module to download artifacts from Azure DevOps Maven feed with the default verify_checksum option: download , the module fails with:
"msg": "Cannot retrieve the artifact to destination: Checksum does not match: we computed cd24c3cdc2d7bff332c4ccb9205af867but the repository states CD24C3CDC2D7BFF332C4CCB9205AF867"
As can be seen in the message above, the md5 hashes are exactly the same, only one is in upper case and the other in lower case. This shouldn't matter for the checksum verification so the code should do the comparison forcing either lower case or upper case for the local and the remote md5 checksums.
Moreover, there's a missing space in the error message "cd24c3cdc2d7bff332c4ccb9205af867but"
I would expect the artifacts to be downloaded successfully.
ACTUAL RESULTS
ansible-playbook 2.9.2
config file = /home/xjood/.ansible.cfg
configured module search path = ['/home/xjood/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
Using /home/xjood/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.6/dist-packages/ansible/plugins/callback/default.pyLoading callback plugin profile_tasks of type aggregate, v2.0 from /usr/local/lib/python3.6/dist-packages/ansible/plugins/callback/profile_tasks.py
PLAYBOOK: _test_playbook.yml *******************************************************************************************************Positional arguments: _test_playbook.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 100
1 plays in _test_playbook.yml
PLAY [TEST] ************************************************************************************************META: ran handlers
Wednesday 15 April 2020 12:56:08 +0200 (0:00:00.081) 0:00:00.081 *******
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: xjood
<127.0.0.1> EXEC /bin/sh -c 'echo ~xjood && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723 `" && echo ansible-tmp-1586948169.0758207-28476717278723="` echo /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723 `" ) && sleep 0'
Using module file /usr/local/lib/python3.6/dist-packages/ansible/modules/packaging/language/maven_artifact.py
<127.0.0.1> PUT /home/xjood/.ansible/tmp/ansible-local-6242catc6jti/tmpomgs2pa5 TO /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/AnsiballZ_maven_artifact.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/ /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/AnsiballZ_maven_artifact.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/AnsiballZ_maven_artifact.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/xjood/.ansible/tmp/ansible-tmp-1586948169.0758207-28476717278723/ > /dev/null 2>&1 && sleep 0'
TASK [Get artifacts] ***************************************************************************************************************task path: /mnt/c/Users/.../_test_playbook.yml:46
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"artifact_id": "...",
"attributes": null,
"backup": null,
"classifier": "",
"content": null,
"delimiter": null,
"dest": "/tmp/",
"directory_mode": null,
"extension": "jar",
"follow": false,
"force": null,
"group": null,
"group_id": "com...",
"headers": {
"Authorization": "Basic <base64 encoded username:password>"
},
"http_agent": "Ansible 2.9.2 maven_artifact",
"keep_name": true,
"mode": null,
"owner": null,
"password": null,
"regexp": null,
"remote_src": null,
"repository_url": "https://pkgs.dev.azure.com/...",
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"state": "present",
"timeout": 10,
"unsafe_writes": null,
"url_password": null,
"url_username": null,
"username": null,
"validate_certs": true,
"verify_checksum": "download",
"version": "1.0.3"
}
},
"msg": "Cannot retrieve the artifact to destination: Checksum does not match: we computed 21c1dfd2f1a3aa74e24220d1c8ac0582but the repository states 21C1DFD2F1A3AA74E24220D1C8AC0582"
}
PLAY RECAP *************************************************************************************************************************localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Wednesday 15 April 2020 12:56:11 +0200 (0:00:02.956) 0:00:03.037 *******
===============================================================================
Get artifacts --------------------------------------------------------------------------------------------------------------- 2.96s
The text was updated successfully, but these errors were encountered:
SUMMARY
When using the maven_artifact module to download artifacts from Azure DevOps Maven feed with the default
verify_checksum
option:download
, the module fails with:As can be seen in the message above, the md5 hashes are exactly the same, only one is in upper case and the other in lower case. This shouldn't matter for the checksum verification so the code should do the comparison forcing either lower case or upper case for the local and the remote md5 checksums.
Moreover, there's a missing space in the error message "cd24c3cdc2d7bff332c4ccb9205af867but"
ISSUE TYPE
COMPONENT NAME
maven_artifact
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
I'm using the module in the following way, locally:
EXPECTED RESULTS
I would expect the artifacts to be downloaded successfully.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: