Sets X11 keymap (default: de), provides a default tmux.conf

This commit is contained in:
Jan Beilicke 2020-11-29 19:57:09 +00:00
parent e19565be83
commit 74b76ff923
4 changed files with 78 additions and 4 deletions

View file

@ -15,11 +15,19 @@
locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}"
when: not ansible_check_mode
- debug:
var: locale_lang
- name: Extract X11 keymap from current locale configuration
set_fact:
locale_x11_keymap: "{{ locale_status.stdout | regex_search('X11 Layout: ([^\n]+)', '\\1') | first }}"
when: not ansible_check_mode
- name: Set default locale
command: localectl set-locale LANG={{ locales_default }}
when:
- not ansible_check_mode
- locale_lang != locales_default
- locale_lang != locales_default
- name: Set default X11 keymap
command: localectl set-keymap {{ x11_keymap }}
when:
- not ansible_check_mode
- locale_x11_keymap != x11_keymap

View file

@ -35,6 +35,7 @@
state: present
key: "{{ lookup('file', 'public_keys/id_{{ item }}.pub') }}"
with_items: "{{ users }}"
ignore_errors: yes
- name: 'Ensure that wheel group is existing'
group:
@ -49,5 +50,10 @@
with_items: "{{ sudoers }}"
- name: Copy tmux config
copy: src=files/tmux.conf dest=/home/{{ item }}/.tmux.conf mode=0644
copy:
src: files/tmux.conf
dest: /home/{{ item }}/.tmux.conf
mode: 0644
owner: "{{ item }}"
group: "{{ item }}"
with_items: "{{ users }}"