mirror of
https://gitea.0xace.cc/ansible-galaxy/consul.git
synced 2024-11-25 06:37:18 +00:00
36 lines
954 B
YAML
36 lines
954 B
YAML
|
- name: Add Hashicorp repository
|
||
|
yum_repository:
|
||
|
name: hashicorp
|
||
|
description: Hashicorp Stable - $basearch
|
||
|
file: hashicorp
|
||
|
baseurl: https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable
|
||
|
enabled: no
|
||
|
gpgcheck: yes
|
||
|
gpgkey: https://rpm.releases.hashicorp.com/gpg
|
||
|
when: consul_install_repo
|
||
|
|
||
|
- name: "Install {{ consul_package_name }}-{{ consul_version }} from official repository"
|
||
|
dnf:
|
||
|
name: "{{ consul_package }}"
|
||
|
state: present
|
||
|
disable_gpg_check: yes
|
||
|
enablerepo: hashicorp
|
||
|
update_cache: yes
|
||
|
register: consul_setup
|
||
|
when: consul_install_repo
|
||
|
|
||
|
- name: "Install {{ consul_package_name }}-{{ consul_version }}"
|
||
|
dnf:
|
||
|
name: "{{ consul_package }}"
|
||
|
state: present
|
||
|
disable_gpg_check: yes
|
||
|
register: consul_setup
|
||
|
when: not consul_install_repo
|
||
|
|
||
|
- name: Fix "/etc/consul.d/consul.env"
|
||
|
copy:
|
||
|
content: ""
|
||
|
dest: /etc/consul.d/consul.env
|
||
|
owner: consul
|
||
|
group: consul
|