mirror of
				https://git.lapiole.org/dani/ansible-roles.git
				synced 2025-10-30 18:31:28 +01:00 
			
		
		
		
	Update to 2023-07-25 10:00
This commit is contained in:
		| @@ -34,7 +34,7 @@ template { | ||||
|   perms           = 0640 | ||||
| {% if vault_agent_nomad.nomad_pki.cli.enabled and vault_agent_nomad.nomad_pki.cli.secret_path is defined %} | ||||
|   exec { | ||||
|     command = ["sh", "-c", "export $(cat /run/nomad/vault.env) && {{ vault_agent_root_dir }}/bin/update_nomad_cert.sh"] | ||||
|     command = ["{{ vault_agent_root_dir }}/bin/update_nomad_cert.sh"] | ||||
|   } | ||||
| {% endif %} | ||||
| } | ||||
|   | ||||
| @@ -13,6 +13,10 @@ elif [ "$(echo ${VAULT_STATUS} | jq .initialized)" != "true" ]; then | ||||
|   echo "Vault is not initialized yet, exiting" | ||||
| else | ||||
|   echo Updating Vault certificate to access Nomad API | ||||
|   if [ -z "${VAULT_TOKEN}" -a -e /run/nomad/vault.env ]; then | ||||
|     echo "Using VAULT_TOKEN from Nomad agent" | ||||
|     export $(cat /run/nomad/vault.env) | ||||
|   fi | ||||
|   vault write {{ vault_agent_nomad.nomad_pki.cli.secret_path | default('nomad') }}/config/access \ | ||||
|     ca_cert="$(cat {{ nomad_root_dir }}/tls/ca.crt)" \ | ||||
|     client_cert="$(cat {{ nomad_root_dir }}/tls/cli.crt)" \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Berteaud
					Daniel Berteaud