sudo and localisation now works (keyboard untested)
This commit is contained in:
parent
e8c9146692
commit
918b2275af
6 changed files with 19 additions and 23 deletions
2
packer/ansible/inventories/teskiste
Normal file
2
packer/ansible/inventories/teskiste
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[default]
|
||||
testkiste ansible_host=10.105.255.154
|
||||
|
|
@ -26,8 +26,7 @@
|
|||
vars:
|
||||
auth:
|
||||
sudo:
|
||||
sudoers:
|
||||
- root
|
||||
group: fablab
|
||||
|
||||
localisation:
|
||||
keyboard:
|
||||
|
|
@ -39,7 +38,6 @@
|
|||
generate:
|
||||
- en_US.UTF-8 UTF-8
|
||||
- de_DE.UTF-8 UTF-8
|
||||
- C.UTF-8 UTF-8
|
||||
default: de_DE.UTF-8
|
||||
tasksel:
|
||||
- english
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
# generated by ansible
|
||||
Defaults env_reset
|
||||
Defaults mail_badpass
|
||||
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
|
||||
root ALL=(ALL:ALL) ALL
|
||||
|
||||
%sudo ALL=(ALL:ALL) ALL
|
||||
{% for user in auth.sudo.sudoers %}
|
||||
{{ user }} ALL=(ALL:ALL) ALL
|
||||
{% endfor %}
|
||||
%fablab ALL=(ALL:ALL) ALL
|
||||
|
|
@ -5,8 +5,8 @@
|
|||
state: present
|
||||
|
||||
- name: configure sudoers
|
||||
template:
|
||||
src: sudoers.j2
|
||||
copy:
|
||||
src: sudoers
|
||||
dest: "/etc/sudoers"
|
||||
owner: root
|
||||
group: root
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: reconfigure locales
|
||||
command: dpkg-reconfigure locales -f noninteractive
|
||||
- name: generate locales
|
||||
command: locale-gen
|
||||
|
||||
|
|
|
|||
|
|
@ -4,15 +4,14 @@
|
|||
name: locales
|
||||
state: present
|
||||
|
||||
- name: install localisation tasks
|
||||
apt:
|
||||
name: "task-{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ localisation.locale.tasksel }}"
|
||||
- name: configure locales to be generated
|
||||
template:
|
||||
src: locale.gen.j2
|
||||
dest: /etc/locale.gen
|
||||
notify: generate locales
|
||||
|
||||
- name: configure locales
|
||||
command: "{{ item }}"
|
||||
with_items:
|
||||
- "echo locales locales/locales_to_be_generated multiselect {% for locale in localisation.locale.generate %}{{ locale }}{% if not loop.last %}, {% endif %}{% endfor %} | debconf-set-selections"
|
||||
- "echo locales locales/default_environment_locale select {{ localisation.locale.default }} | debconf-set-selections"
|
||||
notify: reconfigure locales
|
||||
- name: set default locale
|
||||
lineinfile:
|
||||
path: /etc/default/locale
|
||||
regexp: "^LANG="
|
||||
line: "LANG={{ localisation.locale.default }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue