Compare commits
No commits in common. "16a7bb915f721125ab3eab47491b32b4a57b96be" and "f6ac34dfd0d51f4144bbd8769beed4a01677518b" have entirely different histories.
16a7bb915f
...
f6ac34dfd0
3 changed files with 6 additions and 24 deletions
|
@ -1,15 +1,8 @@
|
|||
default_locale = node.metadata.get('locale/default')[0]
|
||||
|
||||
installed_locales = sorted([
|
||||
node.metadata.get('locale/default'),
|
||||
*node.metadata.get('locale/installed'),
|
||||
])
|
||||
locale = node.metadata.get('locale')
|
||||
|
||||
files = {
|
||||
'/etc/locale.gen': {
|
||||
'content': '\n'.join(
|
||||
f'{locale} {type}' for locale, type in installed_locales
|
||||
),
|
||||
'content': f"{locale} {locale.split('.')[1]}\n",
|
||||
'triggers': {
|
||||
'action:locale-gen',
|
||||
},
|
||||
|
@ -22,8 +15,8 @@ actions = {
|
|||
'triggered': True,
|
||||
},
|
||||
'systemd-locale': {
|
||||
'command': f'localectl set-locale LANG="{default_locale}"',
|
||||
'unless': f'localectl | grep -Fi "system locale" | grep -Fi "{default_locale}"',
|
||||
'command': f'localectl set-locale LANG="{locale}"',
|
||||
'unless': f'localectl | grep -Fi "system locale" | grep -Fi "{locale}"',
|
||||
'preceded_by': {
|
||||
'action:locale-gen',
|
||||
},
|
||||
|
|
|
@ -4,16 +4,5 @@ defaults = {
|
|||
'locales': {},
|
||||
},
|
||||
},
|
||||
'locale': {
|
||||
'default': ('en_US.UTF-8', 'UTF-8'),
|
||||
'installed': {
|
||||
('de_AT.UTF-8', 'UTF-8'),
|
||||
('de_CH.UTF-8', 'UTF-8'),
|
||||
('de_DE.UTF-8', 'UTF-8'),
|
||||
('de_LU.UTF-8', 'UTF-8'),
|
||||
('en_CA.UTF-8', 'UTF-8'),
|
||||
('en_GB.UTF-8', 'UTF-8'),
|
||||
('en_US.UTF-8', 'UTF-8'),
|
||||
},
|
||||
},
|
||||
'locale': 'en_US.UTF-8',
|
||||
}
|
||||
|
|
|
@ -17,5 +17,5 @@ PermitTTY yes
|
|||
TCPKeepAlive yes
|
||||
ClientAliveInterval 30
|
||||
ClientAliveCountMax 5
|
||||
AcceptEnv LANG
|
||||
AcceptEnv LANG LC_*
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
|
|
Loading…
Reference in a new issue