mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 00:05:44 +02:00
Update to 2022-09-04 18:00
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -6,6 +6,7 @@
|
||||
- tar
|
||||
- zstd
|
||||
- unzip
|
||||
- acl
|
||||
tags: nomad
|
||||
|
||||
- name: Install task driver packages
|
||||
|
Reference in New Issue
Block a user