ansible role - debian_xkb

main
Badanin Maksim 3 years ago
commit a1f8539e3a

@ -0,0 +1,49 @@
Role Name
=========
Изменяет раскладки клавиатуры в Debian дистрибутивах
Requirements
------------
Отсутствует
Role Variables
--------------
debian_xkb_model - Формат клавиатуры. По умолчанию - pc105
debian_xkb_layout - Раскладки клавиатуры. По умолчанию - us,ru
debian_xkb_switch - Сочетание клавишь, для смены раскладки. По умолчанию - grp:alt_shift_toggle
Dependencies
------------
Отсутствуют
Example Playbook
----------------
Пример использования:
- hosts: servers
roles:
- debian_xkb
- hosts: servers
roles:
- role: debian_xkb
vars:
debian_xkb_model: "pc105"
debian_xkb_layout: "us,ru"
debian_xkb_switch: "grp:alt_shift_toggle"
License
-------
GPLv2 or later
Author Information
------------------
Badanin Maksim

@ -0,0 +1,5 @@
---
# defaults file for debian_xkb
debian_xkb_model: "pc105"
debian_xkb_layout: "us,ru"
debian_xkb_switch: "grp:alt_shift_toggle"

@ -0,0 +1,11 @@
galaxy_info:
author: Badanin Maksim
description: Setup keyboard layout
company: bms
license: GPLv2 or later
min_ansible_version: 2.10
galaxy_tags:
- debian
- keyboard
- layout
dependencies: []

@ -0,0 +1,18 @@
---
- name: Set keyboard model
ansible.builtin.lineinfile:
path: /etc/default/keyboard
search_string: 'XKBMODEL'
line: 'XKBMODEL="{{ debian_xkb_model }}"'
- name: Set keyboard layout
ansible.builtin.lineinfile:
path: /etc/default/keyboard
search_string: 'XKBMODEL'
line: 'XKBMODEL="{{ debian_xkb_layout }}"'
- name: Set keyboard switch
ansible.builtin.lineinfile:
path: /etc/default/keyboard
search_string: 'XKBMODEL'
line: 'XKBMODEL="{{ debian_xkb_switch }}"'
Loading…
Cancel
Save