diff --git a/README.md b/README.md index 5bb03e0..9b83328 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ The default values for the variables are set in [`defaults/main.yml`](https://gi tfe_image: "images.releases.hashicorp.com/hashicorp/terraform-enterprise:v202309-1" # Paste the license of Terraform Enterprise here. It's a long string. -# If the license is not set, may tasks will be skipped, resulting in a non-working +# If the license is not set or empty, may tasks will be skipped, resulting in a non-working # Terraform Enterprise instance. Not setting a license can help with testing. -# tfe_license: "XYZ123" +tfe_license: "" # Configure a hostname, used to redirect HTTP(S) requests. tfe_hostname: "tfe.example.com" diff --git a/defaults/main.yml b/defaults/main.yml index 7111488..18d06d4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,9 +6,9 @@ tfe_image: "images.releases.hashicorp.com/hashicorp/terraform-enterprise:v202309-1" # Paste the license of Terraform Enterprise here. It's a long string. -# If the license is not set, may tasks will be skipped, resulting in a non-working +# If the license is not set or empty, may tasks will be skipped, resulting in a non-working # Terraform Enterprise instance. Not setting a license can help with testing. -# tfe_license: "XYZ123" +tfe_license: "" # Configure a hostname, used to redirect HTTP(S) requests. tfe_hostname: "tfe.example.com" diff --git a/handlers/main.yml b/handlers/main.yml index a0c1356..6076cb3 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -12,3 +12,4 @@ state: restarted when: - tfe_license is defined + - tfe_license != "" diff --git a/tasks/main.yml b/tasks/main.yml index b72f04a..b65c31d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -14,6 +14,7 @@ password: "{{ tfe_license }}" when: - tfe_license is defined + - tfe_license != "" - name: Create /etc/terraform-enterprise/certs ansible.builtin.file: @@ -69,6 +70,7 @@ mode: '0400' when: - tfe_license is defined + - tfe_license != "" notify: - Restart terraform-enterprise @@ -92,3 +94,4 @@ enabled: true when: - tfe_license is defined + - tfe_license != ""