summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application/tasks/install.yml
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-04-17 19:42:59 +0300
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-05-16 11:39:26 +0000
commit8fd23141ffc7dd2f3c02b62e8fed1ff8364319b0 (patch)
tree0e3a9df5693f50f0cee9e10d406a75ce7fa0ba72 /ansible/roles/application/tasks/install.yml
parent0b66903e11a12cbdaf8db9f03fa3da96c375a0af (diff)
Molecule tests for application role.
Issue-ID: OOM-1812 Change-Id: Ifb6f5a10afb4014b20be77a4141371e561d346ce Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/roles/application/tasks/install.yml')
-rw-r--r--ansible/roles/application/tasks/install.yml16
1 files changed, 8 insertions, 8 deletions
diff --git a/ansible/roles/application/tasks/install.yml b/ansible/roles/application/tasks/install.yml
index 103ecc8b..cdc7ced0 100644
--- a/ansible/roles/application/tasks/install.yml
+++ b/ansible/roles/application/tasks/install.yml
@@ -4,7 +4,7 @@
{{ helm_bin_dir }}/helm init
--upgrade
--skip-refresh
- changed_when: true # init is always changed type of action
+ changed_when: true # init is always changed type of action
# A correct way to implement this would be using --wait option in helm init invocation.
# However, it does not work due to https://github.com/helm/helm/issues/4031 (fixed in newer helm release)
@@ -14,29 +14,29 @@
until: result.rc == 0
delay: 10
retries: 12
- changed_when: false # for idempotency
+ changed_when: false # for idempotency
- name: Get all helm repos
command: "{{ helm_bin_dir }}/helm repo list"
register: repos
- changed_when: false # for idempotency
+ changed_when: false # for idempotency
- name: Remove stable repo
command: "{{ helm_bin_dir }}/helm repo remove stable"
- changed_when: true # when executed its a changed type of action
+ changed_when: true # when executed its a changed type of action
when: "'stable' in repos.stdout"
- name: Helm Serve
shell: "{{ helm_bin_dir }}/helm serve &"
async: 45
- poll: 3 # wait 3sec to get a chance for some stderr
+ poll: 3 # wait 3sec to get a chance for some stderr
register: helm_serve
changed_when: "'address already in use' not in helm_serve.stderr"
- name: List helm repos
command: "{{ helm_bin_dir }}/helm repo list"
register: helm_repo_list
- changed_when: false # for idempotency
+ changed_when: false # for idempotency
failed_when:
- helm_repo_list.rc > 0
- "'Error: no repositories to show' not in helm_repo_list.stderr"
@@ -44,7 +44,7 @@
- name: Helm Add Repo
command: "{{ helm_bin_dir }}/helm repo add {{ helm_repository_name | mandatory }} {{ helm_repository_url | mandatory }}"
when: "'local' not in helm_repo_list.stdout"
- changed_when: true # when executed its a changed type of action
+ changed_when: true # when executed its a changed type of action
- name: Build local helm repository
make:
@@ -72,6 +72,6 @@
{{ helm_repository_name }}/{{ app_helm_chart_name }}
--namespace {{ app_kubernetes_namespace }}
{{ '' if app_skip_helm_override else '-f ' + app_helm_override_file }}
- changed_when: true # when executed its a changed type of action
+ changed_when: true # when executed its a changed type of action
register: helm_install
failed_when: helm_install.stderr