Update to 2022-09-04 18:00

This commit is contained in:
Daniel Berteaud
2022-09-04 18:00:17 +02:00
parent c36a80b596
commit e084a5f0b2
10 changed files with 124 additions and 9 deletions

View File

@@ -19,6 +19,27 @@
when: not nomad_ca_file.stat.exists
tags: nomad
- when: nomad_conf.consul.ca_file is defined
block:
- name: Generate self-signed certificate
import_tasks: ../includes/create_selfsigned_cert.yml
vars:
cert_path: "{{ nomad_conf.consul.cert_file }}"
cert_key_path: "{{ nomad_conf.consul.key_file }}"
cert_key_group: "{{ nomad_user }}"
cert_key_mode: 640
tags: nomad
- name: Check if CA exists
stat: path={{ nomad_conf.tls.ca_file }}
register: nomad_consul_ca_file
tags: nomad
- name: Copy consul cert as consul CA
copy: src={{ nomad_conf.consul.cert_file }} dest={{ nomad_conf.consul.ca_file }} remote_src=True
when: nomad_conf.consul.ca_file is defined and not nomad_consul_ca_file.stat.exists
tags: nomad
- name: Deploy nomad configuration
block:
- name: Deploy nomad configuration
@@ -140,3 +161,17 @@
- name: Deploy profile script
template: src=profile.sh.j2 dest=/etc/profile.d/nomad.sh
tags: nomad
- name: Deploy consul-template consul cert templates
template: src=consul_cert.tpl.j2 dest={{ nomad_root_dir }}/consul-template/{{ item.where }} owner=root group=root
loop:
- what: certificate
where: consul.crt.tpl
- what: private_key
where: consul.key.tpl
- what: issuing_ca
where: consul_ca.crt.tpl
notify: restart consul-template-nomad
when: nomad_conf.client.enabled and nomad_conf.consul.ssl
tags: nomad

View File

@@ -6,6 +6,7 @@
- tar
- zstd
- unzip
- acl
tags: nomad
- name: Install task driver packages