Using python-httplib2 + retries for yum delays
This commit is contained in:
parent
605baf9a96
commit
e3c71a7fd6
3 changed files with 10 additions and 3 deletions
|
|
@ -72,6 +72,7 @@
|
|||
uri:
|
||||
url: http://{{es_api_host}}:{{es_api_port}}/_shield/role
|
||||
method: GET
|
||||
body_format: json
|
||||
user: "{{es_api_basic_auth_username}}"
|
||||
password: "{{es_api_basic_auth_password}}"
|
||||
force_basic_auth: yes
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
apt: name=elasticsearch{% if es_version is defined and es_version != "" %}={{ es_version }}{% endif %} state=present force={{force_install}} cache_valid_time=86400
|
||||
when: es_use_repository
|
||||
register: elasticsearch_install_from_repo
|
||||
until: '"failed" not in result'
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
- name: Debian - Download elasticsearch from url
|
||||
get_url: url={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.deb{% endif %} dest=/tmp/elasticsearch-{{ es_version }}.deb validate_certs=no
|
||||
|
|
@ -29,4 +32,4 @@
|
|||
|
||||
# ansible uri module requires httplib2
|
||||
- name: pip httplib2
|
||||
pip: name=httplib2 extra_args="--user"
|
||||
apt: deb=python-httplib2
|
||||
|
|
@ -15,12 +15,15 @@
|
|||
yum: name=elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %} state=present update_cache=yes
|
||||
when: es_use_repository
|
||||
register: elasticsearch_install_from_repo
|
||||
until: '"failed" not in result'
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
- name: RedHat - Install Elasticsearch from url
|
||||
yum: name={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.noarch.rpm{% endif %} state=present
|
||||
when: not es_use_repository
|
||||
register: elasticsearch_install_from_package
|
||||
|
||||
# ansible uri module requires httplib2
|
||||
# ansible uri module requires python-httplib2
|
||||
- name: pip httplib2
|
||||
pip: name=httplib2 extra_args="--user"
|
||||
yum: name=python-httplib2
|
||||
Loading…
Add table
Add a link
Reference in a new issue