use become: yes when root is needed
This commit is contained in:
parent
3621561473
commit
024e6caa4b
16 changed files with 69 additions and 5 deletions
|
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
- name: Ensure libselinux-python on CentOS 6.x
|
||||
become: yes
|
||||
yum: name=libselinux-python state=present update_cache=yes
|
||||
when: ( ansible_distribution == "CentOS" ) and ( ansible_distribution_major_version == "6" )
|
||||
|
||||
- name: RedHat - add Elasticsearch repo
|
||||
become: yes
|
||||
template: src=elasticsearch.repo dest=/etc/yum.repos.d/elasticsearch-{{ es_major_version }}.repo
|
||||
when: es_use_repository
|
||||
|
||||
|
|
@ -12,6 +14,7 @@
|
|||
when: es_version_lock
|
||||
|
||||
- name: RedHat - Install Elasticsearch
|
||||
become: yes
|
||||
yum: name=elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %} state=present update_cache=yes
|
||||
when: es_use_repository
|
||||
register: redhat_elasticsearch_install_from_repo
|
||||
|
|
@ -20,6 +23,7 @@
|
|||
delay: 10
|
||||
|
||||
- name: RedHat - Install Elasticsearch from url
|
||||
become: yes
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue