Browse Source

Switch podman actions to use label

We don't have to use no_log if we use label to prevent all the info from
being outputed during execution.

Change-Id: I084c7e933a024b76f4d6fa6ac000c58b6b3c7acf
(cherry picked from commit 5c880c0f61)
changes/81/745681/7
Alex Schultz 1 month ago
committed by Emilien Macchi
parent
commit
86c9580459
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      tripleo_ansible/roles/tripleo-container-manage/tasks/podman/create.yml
  2. +2
    -2
      tripleo_ansible/roles/tripleo-container-manage/tasks/podman/exec.yml

+ 2
- 2
tripleo_ansible/roles/tripleo-container-manage/tasks/podman/create.yml View File

@@ -27,12 +27,12 @@
config_id=tripleo_container_manage_config_id, clean_orphans=False) }}

- name: "Async container create/run"
no_log: "{{ not tripleo_container_manage_debug }}"
async: "{{ (not ansible_check_mode | bool) | ternary('600', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: create_async_results
loop: "{{ batched_container_data | haskey(attribute='action', reverse=True) }}"
loop_control:
label: "{{ lookup('dict', container_data).key }}"
loop_var: container_data
podman_container:
annotation: "{{ lookup('dict', container_data).value.annotation | default(omit) }}"
@@ -82,11 +82,11 @@
volumes_from: "{{ lookup('dict', container_data).value.volumes_from | default([]) }}"

- name: "Check podman create status"
no_log: "{{ not tripleo_container_manage_debug }}"
async_status:
jid: "{{ create_async_result_item.ansible_job_id }}"
loop: "{{ create_async_results.results }}"
loop_control:
label: "{{ lookup('dict', create_async_result_item.container_data).key }}"
loop_var: "create_async_result_item"
register: create_async_poll_results
until: create_async_poll_results.finished


+ 2
- 2
tripleo_ansible/roles/tripleo-container-manage/tasks/podman/exec.yml View File

@@ -24,7 +24,6 @@
when: not ansible_check_mode|bool

- name: "Async container exec"
no_log: "{{ not tripleo_container_manage_debug }}"
command:
argv: "{{ lookup('dict', container_exec_data).value | container_exec_cmd(cli=tripleo_container_manage_cli) }}"
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
@@ -32,15 +31,16 @@
register: exec_async_results
loop: "{{ batched_container_data | haskey(attribute='action', value='exec') }}"
loop_control:
label: "{{ lookup('dict', container_exec_data).key }}"
loop_var: container_exec_data
when: not ansible_check_mode|bool

- name: "Check podman exec status"
no_log: "{{ not tripleo_container_manage_debug }}"
async_status:
jid: "{{ exec_async_result_item.ansible_job_id }}"
loop: "{{ exec_async_results.results }}"
loop_control:
label: "{{ lookup('dict', exec_async_result_item.container_exec_data).key }}"
loop_var: "exec_async_result_item"
register: exec_async_poll_results
until: exec_async_poll_results.finished


Loading…
Cancel
Save