Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't print registry password in loop label #255

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/molecule_plugins/docker/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
key_path: "{{ item.key_path | default((lookup('env', 'DOCKER_CERT_PATH') + '/key.pem') if lookup('env', 'DOCKER_CERT_PATH') else omit) }}"
tls_verify: "{{ item.tls_verify | default(lookup('env', 'DOCKER_TLS_VERIFY')) or false }}"
with_items: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.registry.url | default(item.name) }}"
when:
- item.registry is defined
- item.registry.url is defined and item.registry.url
Expand All @@ -38,6 +40,8 @@
ansible.builtin.stat:
path: "{{ molecule_scenario_directory + '/' + (item.dockerfile | default('Dockerfile.j2')) }}"
loop: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
register: dockerfile_stats

- name: Create Dockerfiles from image names
Expand All @@ -52,6 +56,7 @@
mode: "0600"
loop: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
index_var: i
when: not item.pre_build_image | default(false)
register: platforms
Expand All @@ -68,6 +73,7 @@
- "--exclude=molecule.yml"
loop: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
index_var: i
when: not item.pre_build_image | default(false)
delegate_to: localhost
Expand All @@ -81,6 +87,8 @@
key_path: "{{ item.key_path | default((lookup('env', 'DOCKER_CERT_PATH') + '/key.pem') if lookup('env', 'DOCKER_CERT_PATH') else omit) }}"
tls_verify: "{{ item.tls_verify | default(lookup('env', 'DOCKER_TLS_VERIFY')) or false }}"
with_items: "{{ platforms.results }}"
loop_control:
label: "{{ item.item.docker_host | default(lookup('env', 'DOCKER_HOST') or 'unix://var/run/docker.sock') }}"
when:
- not item.pre_build_image | default(false)
register: docker_images
Expand Down Expand Up @@ -128,6 +136,8 @@
combine({item.name: item.command | default('bash -c "while true; do sleep 10000; done"')})
}}
with_items: "{{ molecule_yml.platforms }}"
loop_control:
label: "{{ item.name }}"
when: item.override_command | default(true)

- name: Create molecule instance(s)
Expand Down Expand Up @@ -199,3 +209,5 @@
until: docker_jobs.finished
retries: 300
with_items: "{{ server.results }}"
loop_control:
label: "{{ item.item.name }}"