Skip to content

Commit

Permalink
Make timezone variable, default to America/Denver
Browse files Browse the repository at this point in the history
  • Loading branch information
Halfwalker committed Feb 29, 2024
1 parent 9b83966 commit 846f9d8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ force_update: false
# Shall we install drone and drone-runner as well ?
enable_drone: true

# Default timezone - mainly for systemd service files
timezone: 'America/Denver'

# Shall we install the act runner and enable it ?
enable_act: true
# What version to install
Expand Down
2 changes: 1 addition & 1 deletion templates/drone-runner.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ExecStartPre=/usr/bin/docker pull drone/drone-runner-docker:latest
{% endif %}

ExecStart=/usr/bin/docker run --rm --name drone-runner{% if lookup('env', 'MOLECULE_SCENARIO_NAME') %}-ubuntu-{{ ansible_distribution_release }}{% endif%} \
-e TZ=America/New_York \
-e TZ={{ timezone }} \
{% if not lookup('env', 'MOLECULE_SCENARIO_NAME') %}
--env-file "{% for dataset in gitea_datasets %}{% if dataset.name == 'gitea' %}{{ dataset.mountpoint }}{{ gitea_drone_env_file }}{% endif %}{% endfor %}" \
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion templates/drone.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ExecStartPre=/usr/bin/docker pull drone/drone:latest
{% endif %}

ExecStart=/usr/bin/docker run --rm --name drone{% if lookup('env', 'MOLECULE_SCENARIO_NAME') %}-ubuntu-{{ ansible_distribution_release }}{% endif%} \
-e TZ=America/New_York \
-e TZ={{ timezone }} \
{% if not lookup('env', 'MOLECULE_SCENARIO_NAME') %}
--env-file "{% for dataset in gitea_datasets %}{% if dataset.name == 'gitea' %}{{ dataset.mountpoint }}{{ gitea_drone_env_file }}{% endif %}{% endfor %}" \
--env-file "{% for dataset in gitea_datasets %}{% if dataset.name == 'gitea' %}{{ dataset.mountpoint }}{{ gitea_admin_token_file }}{% endif %}{% endfor %}" \
Expand Down
2 changes: 1 addition & 1 deletion templates/gitea.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ExecStartPre=/usr/bin/docker pull gitea/gitea:latest
container.
#}
ExecStart=/usr/bin/docker run --rm --name gitea{% if lookup('env', 'MOLECULE_SCENARIO_NAME') %}-ubuntu-{{ ansible_distribution_release }}{% endif %} \
-e TZ=America/New_York \
-e TZ={{ timezone }}\
-e USER_UID={{ getent_passwd['git'][1] }} \
-e USER_GID={{ getent_passwd['git'][2] }} \
-p {{ gitea_container_port }}:3000 \
Expand Down

0 comments on commit 846f9d8

Please sign in to comment.