Code Monkey home page Code Monkey logo

Comments (3)

ansibot avatar ansibot commented on June 27, 2024

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

from ansible.

flowerysong avatar flowerysong commented on June 27, 2024

This does not appear to be a bug in Ansible, and I do not believe that you have correctly identified your issue with this task. If the problem was that get_url wasn't following a redirect, the reported error would be the redirect (HTTP 302) rather than Forbidden (HTTP 403).

Rather, the problem appears to be that the remote server is actively denying the request. We can verify this by telling get_url to pretend that it is curl:

    - ansible.builtin.get_url:
        url: https://dev.mysql.com/get/mysql-apt-config_0.8.30-1_all.deb
        dest: /var/tmp/mysql_apt_config.deb
        http_agent: "curl/7.76.1"

Output:

TASK [ansible.builtin.get_url] *************************************************
task path: /home/ec2-user/test.yml:3
changed: [localhost] =>
    changed: true
    checksum_dest: null
    checksum_src: 22f6db31e861987519119b525d13798f8543987b
    dest: /var/tmp/mysql_apt_config.deb
    elapsed: 1
    gid: 0
    group: root
    md5sum: 830ae275a5fdc535f49f6f7c5e438816
    mode: '0644'
    msg: OK (18200 bytes)
    owner: root
    size: 18200
    src: /root/.ansible/tmp/ansible-moduletmp-1718479939.304299-undowb77/tmpa9jc8ev1
    state: file
    status_code: 200
    uid: 0
    url: https://dev.mysql.com/get/mysql-apt-config_0.8.30-1_all.deb

from ansible.

Ronaldr1985 avatar Ronaldr1985 commented on June 27, 2024

Interesting, my mistake, that wasn't something I thought about checking. I realised that I was getting permission denied but I have seen that behavior before with the URI module with follow redirects off.
I'll close the issue.

from ansible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.