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

Update ansible variable templates to allow for envsubst #85

Closed
slifty opened this issue Jan 20, 2021 · 1 comment
Closed

Update ansible variable templates to allow for envsubst #85

slifty opened this issue Jan 20, 2021 · 1 comment
Assignees

Comments

@slifty
Copy link
Contributor

slifty commented Jan 20, 2021

The various ansible variable templates use the format ___VARIABLE_NAME___ to indicate placeholder values that need to be populated. This makes sense, BUT, if we swap that to ${VARIABLE_NAME} it allows us to use the envsubst utility to more easily generate populated templates.

This will make it easier for us to script the creation of new machines (for the purposes of virtual machine based development environment at first, but eventually maybe for containers too). Since it's just the template file and these values get replaced this shouldn't have any impact on functionality.

@slifty slifty self-assigned this Jan 20, 2021
slifty added a commit that referenced this issue Jan 25, 2021
The base ansible scripts have variable templates for local setup.  The
templates allow the user to specify various settings.

This commit changes the way the placeholder values are represented in
these templates, specifically to allow scripts to leverage envsubst in
certain circumstances (e.g. when using vagrant to set up a virtual
machine for local development)

Issue #85
slifty added a commit that referenced this issue Jan 25, 2021
This continues the change where we replace template placeholder values
in ansible variable templates with a placeholder format that can work
with `envsubst` to insert environment variables.

Since this is just a modification to the template placeholders this should
have no impact on installation steps (as those values would be replaced
by hand anyway).  All this does is make it possible for a script to
populate a template more easily.

Issue #85
slifty added a commit that referenced this issue Jan 25, 2021
The simplesaml ansible tasks require a populated `mysql_root_password`
to be set; this adds that to the local template.

Issue #85
slifty added a commit that referenced this issue Jan 25, 2021
Older versions of ansible have a bug related to mysql permission
granting causing weird syntax errors in some cases. We now guide
users to the version without this so they don't face that bug.

Issue #85
@slifty
Copy link
Contributor Author

slifty commented Jan 25, 2021

Resolved by #86

@slifty slifty closed this as completed Jan 25, 2021
slifty added a commit that referenced this issue Feb 8, 2021
Ansible will, by default, overwrite permissions for a mysql user when
setting new permissions.  This modifies the task so that it enables
`append` mode. That way if you are re-using names you won't find
yourself unhappily and unexpectedly lacking permissions.

Issue #85
frankduncan pushed a commit that referenced this issue Apr 7, 2021
The base ansible scripts have variable templates for local setup.  The
templates allow the user to specify various settings.

This commit changes the way the placeholder values are represented in
these templates, specifically to allow scripts to leverage envsubst in
certain circumstances (e.g. when using vagrant to set up a virtual
machine for local development)

Issue #85
frankduncan pushed a commit that referenced this issue Apr 7, 2021
This continues the change where we replace template placeholder values
in ansible variable templates with a placeholder format that can work
with `envsubst` to insert environment variables.

Since this is just a modification to the template placeholders this should
have no impact on installation steps (as those values would be replaced
by hand anyway).  All this does is make it possible for a script to
populate a template more easily.

Issue #85
frankduncan pushed a commit that referenced this issue Apr 7, 2021
The simplesaml ansible tasks require a populated `mysql_root_password`
to be set; this adds that to the local template.

Issue #85
frankduncan pushed a commit that referenced this issue Apr 7, 2021
Older versions of ansible have a bug related to mysql permission
granting causing weird syntax errors in some cases. We now guide
users to the version without this so they don't face that bug.

Issue #85
frankduncan pushed a commit that referenced this issue Apr 7, 2021
Ansible will, by default, overwrite permissions for a mysql user when
setting new permissions.  This modifies the task so that it enables
`append` mode. That way if you are re-using names you won't find
yourself unhappily and unexpectedly lacking permissions.

Issue #85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant