summaryrefslogtreecommitdiffstats
path: root/ansible/roles/chartmuseum/tasks
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-02-05 13:38:08 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-02-05 13:38:08 +0100
commit77324013ff407183b0d9729bd335d8bf3cc72b79 (patch)
tree270397a062e5e268c15535d9846c2bdd6a6883aa /ansible/roles/chartmuseum/tasks
parent9f0255d0406619f570d99eb432096672010c8ff1 (diff)
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 <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/chartmuseum/tasks')
-rw-r--r--ansible/roles/chartmuseum/tasks/main.yml12
1 files changed, 8 insertions, 4 deletions
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