Merge pull request #827 from bogdando/noreds

Rework ignore_errors to report no reds
This commit is contained in:
Bogdan Dobrelya 2016-12-27 14:37:38 +01:00 committed by GitHub
commit 9169f840c2
12 changed files with 16 additions and 16 deletions

View file

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

View file

@ -4,7 +4,7 @@
- name: Bootstrap | Check if bootstrap is needed - name: Bootstrap | Check if bootstrap is needed
raw: which python raw: which python
register: need_bootstrap register: need_bootstrap
ignore_errors: True failed_when: false
tags: facts tags: facts
- name: Bootstrap | Install python 2.x - 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" raw: sh -c "mkdir -p /opt/bin; ln -sf /usr/bin/python /opt/bin/python"
when: "{{ download_delegate == 'localhost' }}" when: "{{ download_delegate == 'localhost' }}"
delegate_to: localhost delegate_to: localhost
ignore_errors: true failed_when: false
run_once: true run_once: true
tags: localhost tags: localhost

View file

@ -10,7 +10,7 @@
- name: Register docker images info - name: Register docker images info
shell: "{% raw %}/usr/bin/docker images -q | xargs /usr/bin/docker inspect -f '{{.RepoTags}},{{.RepoDigests}}'{% endraw %}" shell: "{% raw %}/usr/bin/docker images -q | xargs /usr/bin/docker inspect -f '{{.RepoTags}},{{.RepoDigests}}'{% endraw %}"
register: docker_images_raw register: docker_images_raw
ignore_errors: true failed_when: false
when: not download_always_pull|bool when: not download_always_pull|bool
- set_fact: docker_images="{{docker_images_raw.stdout|regex_replace('\[|\]|\\n]','')|regex_replace('\s',',')}}" - 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 - 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 }}" shell: "{{ bin_dir }}/etcdctl --no-sync --peers={{ etcd_access_addresses }} member list | grep -q {{ etcd_access_address }}"
register: etcd_member_in_cluster register: etcd_member_in_cluster
ignore_errors: true failed_when: false
changed_when: false changed_when: false
when: is_etcd_master when: is_etcd_master
tags: facts tags: facts

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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