Commit c51d12a0 authored by Pietsch, Martin's avatar Pietsch, Martin

convert loop variable _container to _contreg

parent e7cabb2c
......@@ -2,26 +2,26 @@
- block:
- name: add container to inventory via sshjail connection
add_host:
name: "{{ _container.0 }}_{{ _container.1.name | upper() }}"
ansible_ssh_host: "{{ _container.1.name | replace('.', '_') }}@{{ansible_ssh_host}}"
name: "{{ _contreg.0 }}_{{ _contreg.1.name | upper() }}"
ansible_ssh_host: "{{ _contreg.1.name | replace('.', '_') }}@{{ansible_ssh_host}}"
ansible_python_interpreter: "{{ ansible_python.executable }}"
ansible_connection: "sshjail"
when: (_container.1.container | default(False)) == True
when: (_contreg.1.container | default(False)) == True
loop: "{{ function_hosts | product(function_packages) | list }}"
loop_control:
loop_var: _container
loop_var: _contreg
when: ansible_connection == "ssh" and function_container_used == True
- block:
- name: add container to inventory via jail connection
add_host:
name: "{{ _container.0 }}_{{ _container.1.name | upper() }}"
name: "{{ _contreg.0 }}_{{ _contreg.1.name | upper() }}"
ansible_python_interpreter: "{{ ansible_python.executable }}"
ansible_connection: "jail"
ansible_host: "{{ _container.1.name | replace('.', '_') }}"
when: (_container.1.container | default(False)) == True
ansible_host: "{{ _contreg.1.name | replace('.', '_') }}"
when: (_contreg.1.container | default(False)) == True
loop: "{{ function_hosts | product(function_packages) | list }}"
loop_control:
loop_var: _container
loop_var: _contreg
when: ansible_connection == "local" and function_container_used == True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment