Skip to content

Commit

Permalink
Merge pull request #4 from ifalatik/bugfix/3.0.8
Browse files Browse the repository at this point in the history
v3-0-8: fix crashing when single value var is not string
  • Loading branch information
ifalatiksetlog authored Nov 26, 2024
2 parents 708c6cb + aa6ccf4 commit 4f02d29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ a single line list value, if the value is passed to the role as a list
- if the value is a string, nothing changes
- this helps with some YAML string escapes, where it's easier to write the command as a list

## v3.0.8

### project_deployment
- Fix a bug in docker-compose.yml template generation, when a single value variable is not a string, leading to crashes.

## v3.0.7

### project_deployment
Expand Down
2 changes: 1 addition & 1 deletion roles/project_deployment/templates/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
{% if current_service[ variable ] is defined
and current_service[ variable ] is not none
and (variable != "command" or current_service[variable] is string) %}
{% if variable != "image" and ':' in current_service[ variable ] %}
{% if variable != "image" and current_service[ variable ] is string and ':' in current_service[ variable ] %}
{{ variable }}: "{{ current_service[ variable ] }}"
{% else %}
{{ variable }}: {{ current_service[ variable ] }}
Expand Down

0 comments on commit 4f02d29

Please sign in to comment.