Add retries to all tasks with external deps
The tasks with external deps should all have a retry so to cater for cases of intermittent service interruptions. This change adds retires and tags to of the tasks with external deps. Change-Id: Icd0a8143347bcbffc2a1e0a02da92091b59ed483 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
778002714c
commit
cf78fd744d
@ -17,15 +17,33 @@
|
||||
apt_key:
|
||||
url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch"
|
||||
state: "{{ ((elk_package_state | default('present')) == 'absent') | ternary('absent', 'present') }}"
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: enable apt-transport-https
|
||||
apt:
|
||||
name: apt-transport-https
|
||||
state: present
|
||||
update_cache: yes
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: add elk repo to apt sources list
|
||||
apt_repository:
|
||||
repo: "{{ elk_repo.repo }}"
|
||||
state: "{{ elk_repo.state }}"
|
||||
filename: "{{ elk_repo.filename | default(omit) }}"
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
@ -25,6 +25,12 @@
|
||||
url: "https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz"
|
||||
dest: "/opt/go1.10.1.linux-amd64.tar.gz"
|
||||
checksum: "sha256:72d820dec546752e5a8303b33b009079c15c2390ce76d67cf514991646c6127b"
|
||||
register: _get_task
|
||||
until: _get_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: Create go directory
|
||||
file:
|
||||
|
@ -23,6 +23,10 @@
|
||||
update_cache: true
|
||||
with_items:
|
||||
- apm-server
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
|
@ -24,6 +24,10 @@
|
||||
with_items:
|
||||
- audispd-plugins
|
||||
- auditbeat
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
|
@ -41,6 +41,12 @@
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
extra_args: --isolated
|
||||
virtualenv: /opt/elasticsearch-curator
|
||||
register: _pip_task
|
||||
until: _pip_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: exit playbook after uninstall
|
||||
meta: end_play
|
||||
|
@ -71,6 +71,12 @@
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
install_recommends: yes
|
||||
update_cache: yes
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- include_tasks: common_task_install_elk_repo.yml
|
||||
|
||||
@ -79,6 +85,12 @@
|
||||
name: elasticsearch
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
update_cache: yes
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: Drop elasticsearch conf file
|
||||
template:
|
||||
|
@ -23,6 +23,10 @@
|
||||
update_cache: true
|
||||
with_items:
|
||||
- filebeat
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
|
@ -21,6 +21,10 @@
|
||||
name: "heartbeat-elastic"
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
update_cache: true
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
|
@ -35,6 +35,10 @@
|
||||
name: "{{ item }}"
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
update_cache: true
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
with_items:
|
||||
- git
|
||||
- libsystemd-dev
|
||||
|
@ -19,6 +19,12 @@
|
||||
- nginx
|
||||
- apache2-utils
|
||||
- python-passlib
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: create kibana user to access web interface
|
||||
htpasswd:
|
||||
@ -44,6 +50,12 @@
|
||||
name: kibana
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
update_cache: yes
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: Drop kibana conf file
|
||||
template:
|
||||
|
@ -59,12 +59,24 @@
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
install_recommends: yes
|
||||
update_cache: yes
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: Ensure Logstash is installed
|
||||
apt:
|
||||
name: logstash
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
update_cache: yes
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
- name: Drop Logstash conf for beats input
|
||||
template:
|
||||
|
@ -21,6 +21,10 @@
|
||||
name: metricbeat
|
||||
state: "{{ elk_package_state | default('present') }}"
|
||||
update_cache: true
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
|
@ -24,6 +24,10 @@
|
||||
with_items:
|
||||
- tcpdump
|
||||
- packetbeat
|
||||
register: _apt_task
|
||||
until: _apt_task is success
|
||||
retries: 3
|
||||
delay: 2
|
||||
tags:
|
||||
- package_install
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user