I have a task that looks like this:
- name: Download {{ mysql_connector_download_url }}
ansible.builtin.get_url:
url: '{{ mysql_connector_download_url }}'
dest: '{{ mysql_connector_download_dir }}/{{ mysql_connector_download_file }}'
register: jdbc_driver
where mysql_connector_download_url
expands to https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-8.0.31.tar.gz
This has worked for quite a while but for some reason it does not anymore and the error I get is this:
"msg": "Request failed",
"response": "HTTP Error 403: Forbidden",
"status_code": 403,
"url": "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-8.0.31.tar.gz"
The odd thing is that I can type wget
and the same URL on the target machine and that works fine, it is only through ansible this download fails.
I was thinking that perhaps cookies are involved but if that was the case, should not the wget
fail as well?