From d98907f7f383241f634db19a02b187ff5e653f3f Mon Sep 17 00:00:00 2001 From: Yassine Zouggari Date: Mon, 21 Jul 2025 17:38:12 +0000 Subject: [PATCH 1/3] Add task for uploading license from variable --- tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 8ac66df0..e9364e83 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -218,6 +218,18 @@ - vault_configure_enterprise_license | bool - vault_license_file | length > 0 +- name: Upload Vault license content to vault_license_path + become: true + copy: + content: "{{ vault_license_content }}" + dest: "{{ vault_license_path }}" + owner: "{{ vault_user }}" + group: "{{ vault_group }}" + mode: "{{ vault_harden_file_perms | ternary('0400', '0644') }}" + when: + - vault_configure_enterprise_license | bool + - vault_license_content | length > 0 + - name: "Set Exec output to log path when enabled log" set_fact: vault_exec_output: ">> {{ vault_log_path }}/vault.log 2>&1" From 3b6c48f165199b2f95254871cd483e8cebd8883b Mon Sep 17 00:00:00 2001 From: Yassine Zouggari Date: Mon, 21 Jul 2025 17:39:58 +0000 Subject: [PATCH 2/3] Delete repeated vault_pkg documentation --- role_variables.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/role_variables.md b/role_variables.md index e0f6630e..d571efdc 100644 --- a/role_variables.md +++ b/role_variables.md @@ -1010,11 +1010,6 @@ differences across distributions: - List of OS packages to install - Default value: list -## `vault_pkg` - -- Vault package filename -- Default value: `"{{ vault_version }}_linux_amd64.zip"` - ## `vault_debian_url` - Vault package download URL From 7f8ecc72c75d208e37d1450c4f111fe94e08fb81 Mon Sep 17 00:00:00 2001 From: Yassine Zouggari Date: Mon, 21 Jul 2025 17:45:05 +0000 Subject: [PATCH 3/3] Update role variables documentation --- role_variables.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/role_variables.md b/role_variables.md index d571efdc..a2f4b04b 100644 --- a/role_variables.md +++ b/role_variables.md @@ -1128,7 +1128,7 @@ The role can configure HSM based instances. Make sure to reference the [HSM supp ## `vault_configure_enterprise_license` -- Manage enterprise license file with this role. Set to `true` to use `vault_license_path` or `vault_license_file`. +- Manage enterprise license file with this role. Set to `true` to use `vault_license_path`, and `vault_license_file` or `vault_license_content`. - Default value: false ## `vault_license_path` @@ -1138,7 +1138,12 @@ The role can configure HSM based instances. Make sure to reference the [HSM supp ## `vault_license_file` -- Path to enterprise license on the Ansible controller (source file for upload). Upload skipped when empty or undefined. Only used if `vault_configure_enterprise_license: true`. +- Path to enterprise license on the Ansible controller (source file for upload). Upload skipped when empty or undefined, if `vault_license_content` is also empty or undefined. Only used if `vault_configure_enterprise_license: true`. +- Default value: "" + +## `vault_license_content` + +- Path to enterprise license on the Ansible controller (source file for upload). Upload skipped when empty or undefined, if `vault_license_file` is also empty or undefined. Only used if `vault_configure_enterprise_license: true`. - Default value: "" ## `vault_hsm_app`