bundles/basic: ensure a proper locale is installed

This commit is contained in:
Franzi 2021-01-23 12:05:59 +01:00
parent a160e7cf46
commit 4a9463db5f
Signed by: kunsi
GPG key ID: 12E3D2136B818350
9 changed files with 34 additions and 10 deletions

12
bundles/basic/files/hosts Normal file
View file

@ -0,0 +1,12 @@
127.0.0.1 localhost ${node.name} ${node.metadata['hostname']}
::1 ip6-localhost
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
% for ip, entries in sorted(node.metadata.get('hosts', {}).get('entries', {}).items()):
${ip} ${' '.join(sorted(entries))}
% endfor

View file

@ -0,0 +1 @@
LANG=${node.metadata['locale']}

View file

@ -0,0 +1 @@
${node.metadata['locale']}

1
bundles/basic/files/motd Normal file
View file

@ -0,0 +1 @@
This system is managed using bundlewrap.

27
bundles/basic/items.py Normal file
View file

@ -0,0 +1,27 @@
# TODO support non-systemd systems
files = {
'/etc/default/locale': {
'content_type': 'mako',
'triggers': {
'action:locale-gen',
},
},
'/etc/hosts': {
'content_type': 'mako',
},
'/etc/locale.gen': {
'content_type': 'mako',
'triggers': {
'action:locale-gen',
},
},
'/etc/motd': {},
}
actions = {
'locale-gen': {
'triggered': True,
'command': 'locale-gen',
},
}

View file

@ -0,0 +1,3 @@
defaults = {
'locale': 'en_US.UTF-8',
}