Update to 2023-07-03 15:00

This commit is contained in:
Daniel Berteaud
2023-07-03 15:00:09 +02:00
parent 590e8b5d83
commit 91f9384361
44 changed files with 426 additions and 429 deletions

View File

@@ -1,49 +1,5 @@
---
- name: Install needed tools
package:
name:
- tar
- zstd
- unzip
- acl
tags: consul
- when: consul_install_mode != 'none'
block:
- name: Download consul
get_url:
url: "{{ consul_archive_url }}"
dest: "{{ consul_root_dir }}/tmp"
checksum: sha256:{{ consul_archive_sha256 }}
- name: Extract the archive
unarchive:
src: "{{ consul_root_dir }}/tmp/consul_{{ consul_version }}_linux_amd64.zip"
dest: "{{ consul_root_dir }}/tmp"
remote_src: True
- name: Install consul binary
copy:
src: "{{ consul_root_dir }}/tmp/consul"
dest: "{{ consul_root_dir }}/bin/consul"
remote_src: True
mode: 755
notify: restart consul
- name: Link in /usr/local/bin
file: src={{ consul_root_dir }}/bin/consul dest=/usr/local/bin/consul state=link force=True
tags: consul
- name: Install bash completion support
copy:
content: |
complete -C {{ consul_root_dir }}/bin/consul consul
dest: /etc/bash_completion.d/consul
mode: 0644
tags: consul
- name: Deploy systemd service unit
template: src=consul.service.j2 dest=/etc/systemd/system/consul.service
register: consul_unit
@@ -67,3 +23,17 @@
- pre
- post
tags: consul
- name: Create tmpfiles fragment
copy:
content: |
d /run/nomad 770 root {{ consul_user }}
dest: /etc/tmpfiles.d/consul.conf
notify: systemd-tmpfiles
register: consul_tmpfiles
tags: consul
- name: Create tmpfiles
command: systemd-tmpfiles --create
when: consul_tmpfiles.changed
tags: consul