From 14698f95d60ddda03031ce4a32ab550326fef7f6 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Mon, 3 Jul 2023 19:46:36 +0200 Subject: [PATCH] add a bit more customization to the custom config --- molecule/with_custom_config/group_vars/all.yml | 2 +- molecule/with_custom_config/verify.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/with_custom_config/group_vars/all.yml b/molecule/with_custom_config/group_vars/all.yml index f8f9e11..61ed9ac 100644 --- a/molecule/with_custom_config/group_vars/all.yml +++ b/molecule/with_custom_config/group_vars/all.yml @@ -10,7 +10,7 @@ renew_nomad_certificates_ca_dest: /opt/nomad/tls/ca.pem renew_nomad_certificates_cert_dest: /opt/nomad/tls/cert.pem renew_nomad_certificates_key_dest: /opt/nomad/tls/key.pem renew_nomad_certificates_info: - issuer_path: pki/issue/your-issuer + issuer_path: pki/issue/your-ca-int common_name: nomad01.example.com ttl: 90d is_server: true diff --git a/molecule/with_custom_config/verify.yml b/molecule/with_custom_config/verify.yml index 0b3444b..38cada4 100644 --- a/molecule/with_custom_config/verify.yml +++ b/molecule/with_custom_config/verify.yml @@ -78,7 +78,7 @@ - name: "Verify file /etc/consul-template.d/nomad/templates/nomad_ca.pem.tpl" vars: nomad_ca_file: | - {% raw %}{{ with secret "pki/issue/your-issuer" "common_name=nomad01.example.com" "ttl=90d" "alt_names=localhost,server.dc1.nomad,client.dc1.nomad,nomad.service.nomad" "ip_sans=127.0.0.1" }} + {% raw %}{{ with secret "pki/issue/your-ca-int" "common_name=nomad01.example.com" "ttl=90d" "alt_names=localhost,server.dc1.nomad,client.dc1.nomad,nomad.service.nomad" "ip_sans=127.0.0.1" }} {{ .Data.issuing_ca }} {{ end }}{% endraw %} ansible.builtin.assert: @@ -94,7 +94,7 @@ - name: "Verify file /etc/consul-template.d/nomad/templates/nomad_cert.pem.tpl" vars: nomad_cert_file: | - {% raw %}{{ with secret "pki/issue/your-issuer" "common_name=nomad01.example.com" "ttl=90d" "alt_names=localhost,server.dc1.nomad,client.dc1.nomad,nomad.service.nomad" "ip_sans=127.0.0.1" }} + {% raw %}{{ with secret "pki/issue/your-ca-int" "common_name=nomad01.example.com" "ttl=90d" "alt_names=localhost,server.dc1.nomad,client.dc1.nomad,nomad.service.nomad" "ip_sans=127.0.0.1" }} {{ .Data.certificate }} {{ .Data.issuing_ca }} {{ end }}{% endraw %} @@ -111,7 +111,7 @@ - name: "Verify file /etc/consul-template.d/nomad/templates/nomad_key.pem.tpl" vars: nomad_key_file: | - {% raw %}{{ with secret "pki/issue/your-issuer" "common_name=nomad01.example.com" "ttl=90d" "alt_names=localhost,server.dc1.nomad,client.dc1.nomad,nomad.service.nomad" "ip_sans=127.0.0.1" }} + {% raw %}{{ with secret "pki/issue/your-ca-int" "common_name=nomad01.example.com" "ttl=90d" "alt_names=localhost,server.dc1.nomad,client.dc1.nomad,nomad.service.nomad" "ip_sans=127.0.0.1" }} {{ .Data.private_key }} {{ end }}{% endraw %} ansible.builtin.assert: