The cookbook is now deprecated and will not receive any updates. The keyboard layout received its own cookbook and the others are just oneliners that can be replicated rather easily.
- Debian Stretch
- Chef 13.0+
Add the cookbook to your Berksfile:
cookbook 'codenamephp_system'
Add the cookbook to your runlist, e.g. in a role:
{
"name": "default",
"chef_type": "role",
"json_class": "Chef::Role",
"run_list": [
"recipe[codenamephp_system]"
]
}
default['codenamephp']['system']['keyboardLayout']['XKBMODEL']
: The keyboard model, defaults to'pc105'
default['codenamephp']['system']['keyboardLayout']['XKBLAYOUT']
: The keyboard layout(s)/language(s), can be a CSV list, defaults to'de'
default['codenamephp']['system']['keyboardLayout']['XKBVARIANT']
: The keyboard variant, defaults to''
default['codenamephp']['system']['keyboardLayout']['XKBOPTIONS']
: Additional xkboptions, defaults to''
default['codenamephp']['system']['keyboardLayout']['BACKSPACE']
: How to find the backspace key, defaults to'guess'
default['codenamephp']['system']['locale']
: The system locale to set, defaults to'de_DE.UTF-8'
default['codenamephp']['system']['timezone']
: The system timezone to set, defaults to'Europe/Berlin'
The codenamephp_system_keyboard_layout
sets you default system keyboard layout by replacing /etc/default/keyboard
with a template where the model,
layout and all other XKB settings can be set using attributes. It also sets up monitoring when the template changes during the chef run and informs
all dependent services.
You can also pass your own template and set attributes as you like them.
:update
: Updates the template and restarts services if needed
cookbook
: The name of the cookbook where the template can be found, defaults to'codenamephp_system
template_source
: The name of the template file, defaults to'keyboard_layout.erb'
# Minimal properties
codenamephp_system_keyboard_layout 'Update keyboard layout'
# With custom template
codenamephp_system_keyboard_layout 'Update keyboard layout' do
cookbook 'my_cookbook'
template_source 'my_template.erb'
end
The ::keyboard_layout
recipe is just a shortcut that calls the codenamephp_system_keyboard_layout
without properties
The ::locale
recipe just uses the chef locale
resource with the value from default['codenamephp']['system']['locale']
The ::timezone
recipe just uses the chef timezone
resource with the value from default['codenamephp']['system']['timezone']