From 8fcf4f24d902f765c295af052478ecdca6c7da7c Mon Sep 17 00:00:00 2001 From: Mathieu Jourdan Date: Thu, 22 Feb 2024 16:20:26 +0100 Subject: [PATCH] support multiple CA solves #17 --- tasks/configure.yml | 6 +++--- tasks/install.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 18805a7..fa23363 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -1,13 +1,13 @@ --- - name: Initiate PKI - command: easyrsa --batch init-pki + command: easyrsa --pki-dir={{ easyrsa_pki_dir }} --batch init-pki args: creates: "{{ easyrsa_pki_dir }}/private" when: not easyrsa_replace_pki | bool - name: Replace PKI - command: easyrsa init-pki + command: easyrsa --pki-dir={{ easyrsa_pki_dir }} init-pki when: easyrsa_replace_pki | bool changed_when: true @@ -18,7 +18,7 @@ mode: 0o755 - name: Create CA - command: easyrsa build-ca nopass + command: easyrsa --pki-dir={{ easyrsa_pki_dir }} build-ca nopass register: _result failed_when: - _result is failed diff --git a/tasks/install.yml b/tasks/install.yml index b78a44e..dfaea62 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -50,7 +50,7 @@ copy: content: | #!/usr/bin/env bash - /usr/local/lib/easyrsa/easyrsa --batch --pki-dir={{ easyrsa_pki_dir }} "$@" + /usr/local/lib/easyrsa/easyrsa --batch "$@" dest: /usr/local/bin/easyrsa mode: 0o755 owner: root