Skip to content

Commit

Permalink
Configurable parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed Feb 2, 2024
1 parent 188ccd2 commit 2d33c4f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ tfe_database_host: "tfe.RaNdOm.eu-west-1.rds.amazonaws.com"
tfe_database_user: "tfe"
tfe_database_password: "my_pass_c0mpl.x"
tfe_database_name: "tfe"
tfe_database_parameters: "sslmode=disable"

# Detail on the object storage. This role does not create the bucket.
tfe_object_storage_s3_bucket: "SomeBucketName"
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ tfe_database_host: "tfe.RaNdOm.eu-west-1.rds.amazonaws.com"
tfe_database_user: "tfe"
tfe_database_password: "my_pass_c0mpl.x"
tfe_database_name: "tfe"
tfe_database_parameters: "sslmode=disable"

# Detail on the object storage. This role does not create the bucket.
tfe_object_storage_s3_bucket: "SomeBucketName"
Expand Down
2 changes: 1 addition & 1 deletion files/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
TFE_DATABASE_PASSWORD: "${TFE_DATABASE_PASSWORD}"
TFE_DATABASE_HOST: "${TFE_DATABASE_HOST}"
TFE_DATABASE_NAME: "${TFE_DATABASE_NAME}"
TFE_DATABASE_PARAMETERS: "sslmode=disable"
TFE_DATABASE_PARAMETERS: "${TFE_DATABASE_PARAMETERS}"
TFE_OBJECT_STORAGE_TYPE: "s3"
TFE_OBJECT_STORAGE_S3_ACCESS_KEY_ID: "${TFE_OBJECT_STORAGE_S3_ACCESS_KEY_ID}"
TFE_OBJECT_STORAGE_S3_SECRET_ACCESS_KEY: "${TFE_OBJECT_STORAGE_S3_SECRET_ACCESS_KEY}"
Expand Down
4 changes: 4 additions & 0 deletions meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ argument_specs:
type: "str"
default: "tfe"
description: "A database name."
tfe_database_parameters:
type: "str"
default: "sslmode=disable"
description: "A database parameter."
tfe_object_storage_s3_bucket:
type: "str"
default: "SomeBucketName"
Expand Down
8 changes: 8 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@
- tfe_database_name is not none
quiet: yes

- name: assert | Test tfe_database_parameters
ansible.builtin.assert:
that:
- tfe_database_parameters is defined
- tfe_database_parameters is string
- tfe_database_parameters is not none
quiet: yes

- name: assert | Test tfe_object_storage_s3_bucket
ansible.builtin.assert:
that:
Expand Down
1 change: 1 addition & 0 deletions templates/docker-compose.env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ TFE_DATABASE_HOST = {{ tfe_database_host }}
TFE_DATABASE_USER = {{ tfe_database_user }}
TFE_DATABASE_PASSWORD = {{ tfe_database_password }}
TFE_DATABASE_NAME = {{ tfe_database_name }}
TFE_DATABASE_PARAMETERS = {{ tfe_database_parameters }}

# Object storage settings.
TFE_OBJECT_STORAGE_S3_BUCKET = {{ tfe_object_storage_s3_bucket }}
Expand Down

0 comments on commit 2d33c4f

Please sign in to comment.