Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
common
Commits
27ea6bba
Commit
27ea6bba
authored
7 years ago
by
Lars Beckers
Browse files
Options
Downloads
Patches
Plain Diff
localization: timezone management is complicated
parent
2e3467b8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
localization/defaults/main.yml
+2
-0
2 additions, 0 deletions
localization/defaults/main.yml
localization/tasks/main.yml
+4
-13
4 additions, 13 deletions
localization/tasks/main.yml
localization/tasks/timezone.yml
+42
-0
42 additions, 0 deletions
localization/tasks/timezone.yml
with
48 additions
and
13 deletions
localization/defaults/main.yml
+
2
−
0
View file @
27ea6bba
...
@@ -8,3 +8,5 @@ localization_locale: locales/en
...
@@ -8,3 +8,5 @@ localization_locale: locales/en
localization_vconsole
:
vconsole.conf
localization_vconsole
:
vconsole.conf
localization_prefer_timesyncd
:
False
localization_prefer_timesyncd
:
False
localization_timezone
:
Europe/Berlin
This diff is collapsed.
Click to expand it.
localization/tasks/main.yml
+
4
−
13
View file @
27ea6bba
...
@@ -3,22 +3,13 @@
...
@@ -3,22 +3,13 @@
-
include
:
locale.yml
-
include
:
locale.yml
-
meta
:
flush_handlers
-
meta
:
flush_handlers
-
name
:
ensure correct timezone setting
-
include
:
timezone.yml
debconf
:
-
meta
:
flush_handlers
name
:
tzdata
question
:
"
{{
item.0
}}"
value
:
"
{{
item.1
}}"
vtype
:
select
with_together
:
-
"
{{
['tzdata/Zones/Europe',
'tzdata/Areas']
}}"
-
"
{{
['Berlin',
'Europe']
}}"
notify
:
-
update timezone
tags
:
-
timezone
-
include
:
ntpd.yml
-
include
:
ntpd.yml
when
:
not localization_prefer_timesyncd
when
:
not localization_prefer_timesyncd
-
include
:
timesyncd.yml
-
include
:
timesyncd.yml
when
:
localization_prefer_timesyncd
when
:
localization_prefer_timesyncd
-
meta
:
flush_handlers
-
meta
:
flush_handlers
This diff is collapsed.
Click to expand it.
localization/tasks/timezone.yml
0 → 100644
+
42
−
0
View file @
27ea6bba
---
-
name
:
ensure correct timezone setting
debconf
:
name
:
tzdata
question
:
"
{{
item.0
}}"
value
:
"
{{
item.1
}}"
vtype
:
select
with_together
:
-
"
{{
['tzdata/Areas',
'tzdata/Zones/'~localization_timezone.split('/')[0]]
}}"
-
"
{{
localization_timezone.split('/')
}}"
notify
:
-
update timezone
tags
:
-
timezone
## see: https://github.com/debops/ansible-ntp/blob/master/tasks/timezone.yml
# tzdata ignores debconf answers when configured non-interactively
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704089
-
name
:
ensure correct timezone setting in /etc/timezone
copy
:
content
:
"
{{
localization_timezone
}}
\n
"
dest
:
/etc/timezone
owner
:
root
group
:
root
mode
:
0644
notify
:
-
update timezone
tags
:
-
timezone
-
name
:
ensure correct timezone link by /etc/localtime
file
:
path
:
/etc/localtime
src
:
"
/usr/share/zoneinfo/{{
localization_timezone
}}"
state
:
link
notify
:
-
update timezone
tags
:
-
timezone
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment