mirror of
				https://git.lapiole.org/dani/ansible-roles.git
				synced 2025-10-31 10:51:27 +01:00 
			
		
		
		
	Update to 2022-09-06 18:00
This commit is contained in:
		| @@ -113,38 +113,34 @@ | ||||
|   loop: "{{ nomad_backup_configs.stdout_lines }}" | ||||
|   tags: nomad | ||||
|  | ||||
| - when: nomad_vault_tls.enabled | ||||
|   block: | ||||
|  | ||||
|     - name: Deploy consul-template config | ||||
|       template: src=consul-template.hcl.j2 dest={{ nomad_root_dir }}/consul-template/consul-template.hcl | ||||
|       notify: restart consul-template-nomad | ||||
|  | ||||
|     - name: Deploy consul-template agent cert template | ||||
|       template: src=agent_cert.tpl.j2 dest={{ nomad_root_dir }}/consul-template/{{ item.where }} owner=root group=root | ||||
|       loop: | ||||
|         - what: certificate | ||||
|           where: agent.crt.tpl | ||||
|         - what: private_key | ||||
|           where: agent.key.tpl | ||||
|         - what: issuing_ca | ||||
|           where: ca.crt.tpl | ||||
|       notify: restart consul-template-nomad | ||||
|  | ||||
| - name: Deploy consul-template config | ||||
|   template: src=consul-template.hcl.j2 dest={{ nomad_root_dir }}/consul-template/consul-template.hcl mode=600 owner=root group=root | ||||
|   notify: restart consul-template-nomad | ||||
|   when: nomad_vault_secrets.pki.enabled or nomad_vault_secrets.tokens.enabled | ||||
|   tags: nomad | ||||
|  | ||||
| - when: nomad_vault_tls.enabled and nomad_conf.server.enabled | ||||
|   block: | ||||
|  | ||||
|     - name: Deploy consul-template cli cert template | ||||
|       template: src=cli_cert.tpl.j2 dest={{ nomad_root_dir }}/consul-template/{{ item.where }} owner=root group=root | ||||
|       loop: | ||||
|         - what: certificate | ||||
|           where: cli.crt.tpl | ||||
|         - what: private_key | ||||
|           where: cli.key.tpl | ||||
|       notify: restart consul-template-nomad | ||||
| - name: Deploy consul-template agent cert template | ||||
|   template: src=agent_cert.tpl.j2 dest={{ nomad_root_dir }}/consul-template/{{ item.where }} owner=root group=root | ||||
|   loop: | ||||
|     - what: certificate | ||||
|       where: agent.crt.tpl | ||||
|     - what: private_key | ||||
|       where: agent.key.tpl | ||||
|     - what: issuing_ca | ||||
|       where: ca.crt.tpl | ||||
|   notify: restart consul-template-nomad | ||||
|   when: nomad_vault_secrets.pki.enabled | ||||
|   tags: nomad | ||||
|  | ||||
| - name: Deploy consul-template cli cert template | ||||
|   template: src=cli_cert.tpl.j2 dest={{ nomad_root_dir }}/consul-template/{{ item.where }} owner=root group=root | ||||
|   loop: | ||||
|     - what: certificate | ||||
|       where: cli.crt.tpl | ||||
|     - what: private_key | ||||
|       where: cli.key.tpl | ||||
|   notify: restart consul-template-nomad | ||||
|   when: nomad_vault_secrets.pki.enabled and nomad_conf.server.enabled | ||||
|   tags: nomad | ||||
|  | ||||
| - name: Set ACL on the TLS dir | ||||
| @@ -172,6 +168,6 @@ | ||||
|     - what: issuing_ca | ||||
|       where: consul_ca.crt.tpl | ||||
|   notify: restart consul-template-nomad | ||||
|   when: nomad_conf.client.enabled and nomad_conf.consul.ssl | ||||
|   when: nomad_vault_secrets.consul_pki.enabled and nomad_conf.client.enabled and nomad_conf.consul.ssl | ||||
|   tags: nomad | ||||
|  | ||||
|   | ||||
| @@ -114,6 +114,7 @@ | ||||
|   template: src=consul-template-nomad.service.j2 dest=/etc/systemd/system/consul-template-nomad.service | ||||
|   register: nomad_consul_tpl_unit | ||||
|   notify: restart consul-template-nomad | ||||
|   when: nomad_vault_secrets.pki.enabled or nomad_vault_secrets.consul_pki.enabled | ||||
|   tags: nomad | ||||
|  | ||||
| - name: Reload systemd | ||||
|   | ||||
| @@ -6,5 +6,8 @@ | ||||
|   tags: nomad | ||||
|  | ||||
| - name: Handle consul-template-nomad service | ||||
|   service: name=consul-template-nomad state={{ nomad_vault_tls.enabled | ternary('started', 'stopped') }} enabled={{ nomad_vault_tls.enabled | ternary(True, False) }} | ||||
|   service: | ||||
|     name: consul-template-nomad | ||||
|     state: "{{ (nomad_vault_secrets.pki.enabled or nomad_vault_secrets.consul_pki.enabled or nomad_vault_secrets.tokens.enabled) | ternary('started', 'stopped') }}" | ||||
|     enabled: "{{ (nomad_vault_secrets.pki.enabled or nomad_vault_secrets.consul_pki.enabled or nomad_vault_secrets.tokens.enabled) | ternary(True, False) }}" | ||||
|   tags: nomad | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Berteaud
					Daniel Berteaud