Playbook para download via web com problema

Good evening everyone, I hope you find it well.
I have a problem creating a playbook to automate. This means downloading via the web through the proxy and installing. Even though I directly copy the Ansible website example, I am unable to validate it. Has anyone gone through the same situation and can give me an idea, I would appreciate it.

Can you post the URL to the example that you are copying and what you have written?

Could you try running yamllint and ansible-lint on the code?

Can you run ansible-playbook using -vvv to get the verbose output in case that has more details regarding the issue?

Could you post any code here using fenced code blocks please as it make it easier to read, thanks!

Hello, of course I leave an example below. Because if you comment out the proxy lines in the file, it doesn’t even go through, I imagine it would be like this because I have an active proxy on my network so I have to make it go through it. And another network off when downloading and installing the .deb file. I hope you understand. Thank you in advance for your attention.

I don’t think there is a ansible.builtin.environment module, where did you get that from, it sounds like an AI hallucination?

Try this:

    - name: Install Google Chrome
      ansible.builtin.apt:
        deb: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
      environment:
        HTTPS_PROXY: http://10.254.0.254:8080

See the documentation — this is a more reliable source than AI!

4 Likes

Good morning. I made the adjustments this morning and it worked. Yes, I ask for your attention and help.

1 Like