Merge "Gate: force use of bash for ansible script module use"
This commit is contained in:
commit
e3327455c7
@ -12,9 +12,11 @@
|
||||
|
||||
- block:
|
||||
- name: check if correct version of helm client already installed
|
||||
shell: "[ \"x$($(type -p helm) version --client --short | awk '{ print $NF }' | awk -F '+' '{ print $1 }')\" == \"x${HELM_VERSION}\" ] || exit 1"
|
||||
shell: "set -e; [ \"x$($(type -p helm) version --client --short | awk '{ print $NF }' | awk -F '+' '{ print $1 }')\" == \"x${HELM_VERSION}\" ] || exit 1"
|
||||
environment:
|
||||
HELM_VERSION: "{{ version.helm }}"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: need_helm
|
||||
ignore_errors: True
|
||||
- name: install helm client
|
||||
@ -22,22 +24,32 @@
|
||||
become_user: root
|
||||
shell: |
|
||||
TMP_DIR=$(mktemp -d)
|
||||
curl -sSL https://storage.googleapis.com/kubernetes-helm/helm-{{ version.helm }}-linux-amd64.tar.gz | tar -zxv --strip-components=1 -C ${TMP_DIR}
|
||||
curl -sSL https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar -zxv --strip-components=1 -C ${TMP_DIR}
|
||||
sudo mv ${TMP_DIR}/helm /usr/bin/helm
|
||||
rm -rf ${TMP_DIR}
|
||||
environment:
|
||||
HELM_VERSION: "{{ version.helm }}"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
- name: setting up helm client
|
||||
command: helm init --client-only
|
||||
|
||||
- block:
|
||||
- name: checking if local helm server is running
|
||||
shell: curl -s 127.0.0.1:8879 | grep -q 'Helm Repository'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: helm_server_running
|
||||
ignore_errors: True
|
||||
- name: launching local helm server via shell
|
||||
when: helm_server_running | failed
|
||||
shell: helm serve &
|
||||
args:
|
||||
executable: /bin/bash
|
||||
- name: wait for helm server to be ready
|
||||
shell: curl -s 127.0.0.1:8879 | grep -q 'Helm Repository'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: wait_for_helm_server
|
||||
until: wait_for_helm_server.rc == 0
|
||||
retries: 120
|
||||
@ -46,6 +58,8 @@
|
||||
- block:
|
||||
- name: checking if helm 'stable' repo is present
|
||||
shell: helm repo list | grep -q "^stable"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: helm_stable_repo_present
|
||||
ignore_errors: True
|
||||
- name: checking if helm 'stable' repo is present
|
||||
|
Loading…
Reference in New Issue
Block a user