diff --git a/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml b/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml index cc63d86..62fbae4 100644 --- a/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml +++ b/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml @@ -1,6 +1,11 @@ --- - name: Converge hosts: all + + environment: + http_proxy: "{{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}" + https_proxy: "{{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}" + tasks: - name: "Include {{ cookiecutter.role_name }}" ansible.builtin.include_role: diff --git a/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/prepare.yml b/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/prepare.yml index 9a6673d..db0d725 100644 --- a/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/prepare.yml +++ b/molecule_qemu/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/prepare.yml @@ -2,4 +2,9 @@ - name: Prepare hosts: all become: true + + environment: + http_proxy: "{{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}" + https_proxy: "{{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}" + tasks: [] diff --git a/molecule_qemu/playbooks/create.yml b/molecule_qemu/playbooks/create.yml index bcc9565..3e4d4fd 100644 --- a/molecule_qemu/playbooks/create.yml +++ b/molecule_qemu/playbooks/create.yml @@ -17,6 +17,10 @@ qemu_vm_disk: "4G" qemu_vm_network: "user" + environment: + http_proxy: "{{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}" + https_proxy: "{{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}" + tasks: ### configuration ######################################################### diff --git a/molecule_qemu/playbooks/destroy.yml b/molecule_qemu/playbooks/destroy.yml index 57a2c8a..4a83fd3 100644 --- a/molecule_qemu/playbooks/destroy.yml +++ b/molecule_qemu/playbooks/destroy.yml @@ -4,6 +4,10 @@ gather_facts: false no_log: "{{ molecule_no_log }}" + environment: + http_proxy: "{{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}" + https_proxy: "{{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}" + tasks: - name: Prepare VMs config block: