From: Bartek Grzybowski Date: Fri, 5 Feb 2021 12:38:08 +0000 (+0100) Subject: Redirect chartmuseum stdout/stderr to /dev/null X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=77324013ff407183b0d9729bd335d8bf3cc72b79;p=oom%2Foffline-installer.git Redirect chartmuseum stdout/stderr to /dev/null Chartmuseum logs to it's stdout/stderr during it's normal operations and since the shell pipe opened by ansible is gone once playbook finishes this resulted in chartmuseum process crashing with "broken pipe" message. Change-Id: I0e2a5471df23f5881248ecb529a0193505f56cfe Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski --- diff --git a/ansible/roles/chartmuseum/tasks/main.yml b/ansible/roles/chartmuseum/tasks/main.yml index d7121a53..c5d63a5e 100644 --- a/ansible/roles/chartmuseum/tasks/main.yml +++ b/ansible/roles/chartmuseum/tasks/main.yml @@ -12,9 +12,13 @@ state: directory - name: Run Helm chart repository - shell: "{{ helm_bin_dir }}/chartmuseum --storage local --storage-local-rootdir {{ chartmuseum_storage_dir }} -port {{ chartmuseum_port }} &" + shell: "{{ helm_bin_dir }}/chartmuseum --storage local --storage-local-rootdir {{ chartmuseum_storage_dir }} -port {{ chartmuseum_port }} > /dev/null 2>&1 &" async: 10 poll: 3 - register: chart_repository - changed_when: "'address already in use' not in chart_repository.stderr" - failed_when: "'Starting ChartMuseum' not in chart_repository.stderr" + changed_when: false + +- name: Check Helm chart repository is running + command: pgrep chartmuseum + changed_when: false + register: pgrep_out + failed_when: pgrep_out.rc != 0