Merge "Gate: force use of bash for ansible script module use"
This commit is contained in:
commit
e3327455c7
@ -12,9 +12,11 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: check if correct version of helm client already installed
|
- 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:
|
environment:
|
||||||
HELM_VERSION: "{{ version.helm }}"
|
HELM_VERSION: "{{ version.helm }}"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: need_helm
|
register: need_helm
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
- name: install helm client
|
- name: install helm client
|
||||||
@ -22,22 +24,32 @@
|
|||||||
become_user: root
|
become_user: root
|
||||||
shell: |
|
shell: |
|
||||||
TMP_DIR=$(mktemp -d)
|
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
|
sudo mv ${TMP_DIR}/helm /usr/bin/helm
|
||||||
rm -rf ${TMP_DIR}
|
rm -rf ${TMP_DIR}
|
||||||
|
environment:
|
||||||
|
HELM_VERSION: "{{ version.helm }}"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
- name: setting up helm client
|
- name: setting up helm client
|
||||||
command: helm init --client-only
|
command: helm init --client-only
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: checking if local helm server is running
|
- name: checking if local helm server is running
|
||||||
shell: curl -s 127.0.0.1:8879 | grep -q 'Helm Repository'
|
shell: curl -s 127.0.0.1:8879 | grep -q 'Helm Repository'
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: helm_server_running
|
register: helm_server_running
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
- name: launching local helm server via shell
|
- name: launching local helm server via shell
|
||||||
when: helm_server_running | failed
|
when: helm_server_running | failed
|
||||||
shell: helm serve &
|
shell: helm serve &
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
- name: wait for helm server to be ready
|
- name: wait for helm server to be ready
|
||||||
shell: curl -s 127.0.0.1:8879 | grep -q 'Helm Repository'
|
shell: curl -s 127.0.0.1:8879 | grep -q 'Helm Repository'
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: wait_for_helm_server
|
register: wait_for_helm_server
|
||||||
until: wait_for_helm_server.rc == 0
|
until: wait_for_helm_server.rc == 0
|
||||||
retries: 120
|
retries: 120
|
||||||
@ -46,6 +58,8 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: checking if helm 'stable' repo is present
|
- name: checking if helm 'stable' repo is present
|
||||||
shell: helm repo list | grep -q "^stable"
|
shell: helm repo list | grep -q "^stable"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: helm_stable_repo_present
|
register: helm_stable_repo_present
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
- name: checking if helm 'stable' repo is present
|
- name: checking if helm 'stable' repo is present
|
||||||
|
Loading…
Reference in New Issue
Block a user