Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Citi OFN Voucher] Add Activerecord encryption configuration and VINE api config #942

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions inventory/host_vars/_example.com/secrets.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@ smtp_password:
#active_record_encryption_primary_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#active_record_encryption_deterministic_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#active_record_encryption_key_derivation_salt: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# VINE API settings
#vine_api_url: "https://vine-url.com/api/v1"
rioug marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions roles/app/templates/env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,8 @@ ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY="{{ active_record_encryption_determin
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="{{ active_record_encryption_key_derivation_salt }}"
{% endif %}

{% if vine_api_url is defined %}
VINE_API_URL="{{ vine_api_url }}"
{% endif %}
Comment on lines +115 to +117
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that a default would work instead?

Suggested change
{% if vine_api_url is defined %}
VINE_API_URL="{{ vine_api_url }}"
{% endif %}
VINE_API_URL="{{ vine_api_url | default('') }}"

Just a question, not a real suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code handle a missing VINE_API_URL with an error saying the VINE api isn't configured. With an empty string default it would result in a API connection error which could be confusing when the issue is actually a missing configuration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, the code would need to check for the presence of the variable instead.


{{ custom_env_vars | default('') }}
Loading