Closed killermoehre closed 7 months ago
-e is for extra vars. According to https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_environment.html#playbooks-environment we have to use the remove environment.
Something like this:
- name: Download ironic-agent initramfs
ansible.builtin.get_url:
url: "{{ ironic_agent_initramfs_url }}"
dest: "{{ ironic_agent_files_directory }}/ironic/ironic-agent.initramfs"
checksum: "{{ ironic_agent_initramfs_checksum }}"
mode: 0644
when: enable_ironic_agent_download_images | bool
environment:
http_proxy: foo
https_proxy: foo
- name: Download ironic-agent kernel
ansible.builtin.get_url:
url: "{{ ironic_agent_kernel_url }}"
dest: "{{ ironic_agent_files_directory }}/ironic/ironic-agent.kernel"
checksum: "{{ ironic_agent_kernel_checksum }}"
mode: 0644
when: enable_ironic_agent_download_images | bool
environment:
http_proxy: foo
https_proxy: foo
@killermoehre Can you test if it works with the modified play in the PR. The proxy_proxies parameter should be part of your environments/configuration.yml file when you are using HTTP proxies.
LGTM. I tested it with a custom
playbook and the download only, but no error message, it worked as expected.
Hi,
to get into the Internet® at $customer to download the ironic artifacts from opendev.org, we need to use an HTTP proxy. According to ansbile.builtin.get_url, setting the variable
https_proxy=http://some_host:port
in the Ansible environment should be enough.But I can't figure out how to set this. I tried different things:
osism apply ironic -e enable_ironic_agent_download_images=true -e https_proxy=http://some_host:port
osism apply ironic -e enable_ironic_agent_download_images=true -e container_https_proxy=http://some_host:port
docker exec --env 'https_proxy=http://some_host:port' osismclient osism apply ironic -e enable_ironic_agent_download_images=true
Did I miss something? Should I have set this variable via the
host_vars/localhost.yml
?