Rework ignore_errors to report no reds

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
This commit is contained in:
Bogdan Dobrelya 2016-12-27 12:38:54 +01:00
parent be8e5e1fdc
commit 79996b557b
12 changed files with 16 additions and 16 deletions

View file

@ -2,7 +2,7 @@
- name: Bootstrap | Check if bootstrap is needed
raw: stat /opt/bin/.bootstrapped
register: need_bootstrap
ignore_errors: True
failed_when: false
tags: facts
- name: Bootstrap | Run bootstrap.sh
@ -16,7 +16,7 @@
- name: Bootstrap | Check if we need to install pip
shell: "{{ansible_python_interpreter}} -m pip --version"
register: need_pip
ignore_errors: True
failed_when: false
changed_when: false
when: (need_bootstrap | failed)
tags: facts

View file

@ -4,7 +4,7 @@
- name: Bootstrap | Check if bootstrap is needed
raw: which python
register: need_bootstrap
ignore_errors: True
failed_when: false
tags: facts
- name: Bootstrap | Install python 2.x

View file

@ -53,7 +53,7 @@
raw: sh -c "mkdir -p /opt/bin; ln -sf /usr/bin/python /opt/bin/python"
when: "{{ download_delegate == 'localhost' }}"
delegate_to: localhost
ignore_errors: true
failed_when: false
run_once: true
tags: localhost

View file

@ -10,7 +10,7 @@
- name: Register docker images info
shell: "{% raw %}/usr/bin/docker images -q | xargs /usr/bin/docker inspect -f '{{.RepoTags}},{{.RepoDigests}}'{% endraw %}"
register: docker_images_raw
ignore_errors: true
failed_when: false
when: not download_always_pull|bool
- set_fact: docker_images="{{docker_images_raw.stdout|regex_replace('\[|\]|\\n]','')|regex_replace('\s',',')}}"

View file

@ -2,7 +2,7 @@
- name: Configure | Check if member is in cluster
shell: "{{ bin_dir }}/etcdctl --no-sync --peers={{ etcd_access_addresses }} member list | grep -q {{ etcd_access_address }}"
register: etcd_member_in_cluster
ignore_errors: true
failed_when: false
changed_when: false
when: is_etcd_master
tags: facts

View file

@ -28,7 +28,7 @@
- name: "Pre-upgrade | find etcd-proxy container"
command: docker ps -aq --filter "name=etcd-proxy*"
register: etcd_proxy_container
ignore_errors: true
failed_when: false
- name: "Pre-upgrade | remove etcd-proxy if it exists"
command: "docker rm -f {{item}}"
@ -41,7 +41,7 @@
delay: 3
until: etcd_member_list.rc != 2
run_once: true
ignore_errors: true
failed_when: false
- name: "Pre-upgrade | change peer names to SSL"
shell: >-

View file

@ -2,7 +2,7 @@
- name: Configure | Check if cluster is healthy
shell: "{{ bin_dir }}/etcdctl --peers={{ etcd_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
register: etcd_cluster_is_healthy
ignore_errors: true
failed_when: false
changed_when: false
when: is_etcd_master
tags: facts

View file

@ -2,7 +2,7 @@
- name: check resolvconf
shell: which resolvconf
register: resolvconf
ignore_errors: yes
failed_when: false
changed_when: false
- set_fact:

View file

@ -1,7 +1,7 @@
---
- name: Flannel | delete default docker bridge
command: ip link delete docker0
ignore_errors: yes
failed_when: false
notify: Flannel | restart docker
- name: Flannel | restart docker

View file

@ -89,7 +89,7 @@
- name: Storing commands output
shell: "{{ item.cmd }} 2>&1 | tee {{ item.name }}"
register: output
ignore_errors: true
failed_when: false
with_items: "{{commands}}"
no_log: True

View file

@ -49,7 +49,7 @@
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
CLOUDSDK_INSTALL_DIR: "{{dir}}"
no_log: True
ignore_errors: true
failed_when: false
- name: Apply the lifecycle rules
command: "{{dir}}/google-cloud-sdk/bin/gsutil lifecycle set {{dir}}/gcs_life.json gs://{{test_name}}"
@ -68,7 +68,7 @@
gs_access_key: "{{ gs_key }}"
gs_secret_key: "{{ gs_skey }}"
expiration: "{{expire_days * 36000|int}}"
ignore_errors: true
failed_when: false
no_log: True
- debug:

View file

@ -49,7 +49,7 @@
until: "{{ agents.content|length > 0 and
agents.content[0] == '{' and
agents.content|from_json|length >= groups['kube-node']|length * 2 }}"
ignore_errors: true
failed_when: false
no_log: true
- debug: var=agents.content|from_json
@ -65,7 +65,7 @@
retries: 3
delay: "{{ agent_report_interval }}"
no_log: true
ignore_errors: true
failed_when: false
when: not agents.content=='{}'
- debug: var=result.content|from_json