does not work
This commit is contained in:
parent
3bf1f537e5
commit
e8c9146692
12 changed files with 91 additions and 1 deletions
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
root: `packer/ansible`
|
||||
|
||||
`ansible-playbook -u root -i inventories/qemu playbook.yml -t windowmanager`
|
||||
`ansible-playbook -u root -i inventories/qemu playbook.yml [-t TAG]`
|
||||
|
|
|
|||
|
|
@ -20,3 +20,27 @@
|
|||
- role: windowmanager
|
||||
tags:
|
||||
- windowmanager
|
||||
- role: localisation
|
||||
tags:
|
||||
- localisation
|
||||
vars:
|
||||
auth:
|
||||
sudo:
|
||||
sudoers:
|
||||
- root
|
||||
|
||||
localisation:
|
||||
keyboard:
|
||||
layout: de
|
||||
variant:
|
||||
model: pc105
|
||||
options: ""
|
||||
locale:
|
||||
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
|
||||
- german
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
- import_tasks: debug.yml
|
||||
- import_tasks: sudo.yml
|
||||
|
|
|
|||
13
packer/ansible/roles/auth/tasks/sudo.yml
Normal file
13
packer/ansible/roles/auth/tasks/sudo.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: install sudo
|
||||
package:
|
||||
name: sudo
|
||||
state: present
|
||||
|
||||
- name: configure sudoers
|
||||
template:
|
||||
src: sudoers.j2
|
||||
dest: "/etc/sudoers"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0440'
|
||||
11
packer/ansible/roles/auth/templates/sudoers.j2
Normal file
11
packer/ansible/roles/auth/templates/sudoers.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# 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 %}
|
||||
3
packer/ansible/roles/localisation/handlers/main.yml
Normal file
3
packer/ansible/roles/localisation/handlers/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: reconfigure locales
|
||||
command: dpkg-reconfigure locales -f noninteractive
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: configure keyboard
|
||||
template:
|
||||
src: keyboard.j2
|
||||
dest: /etc/default/keyboard
|
||||
18
packer/ansible/roles/localisation/tasks/locale.yml
Normal file
18
packer/ansible/roles/localisation/tasks/locale.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
- name: install locales
|
||||
apt:
|
||||
name: locales
|
||||
state: present
|
||||
|
||||
- name: install localisation tasks
|
||||
apt:
|
||||
name: "task-{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ localisation.locale.tasksel }}"
|
||||
|
||||
- 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
|
||||
3
packer/ansible/roles/localisation/tasks/main.yml
Normal file
3
packer/ansible/roles/localisation/tasks/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- import_tasks: keyboard-configuration.yml
|
||||
- import_tasks: locale.yml
|
||||
6
packer/ansible/roles/localisation/templates/keyboard.j2
Normal file
6
packer/ansible/roles/localisation/templates/keyboard.j2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
XKBMODEL="{{ localisation.keyboard.model }}"
|
||||
XKBLAYOUT="{{ localisation.keyboard.layout }}"
|
||||
XKBVARIANT="{{ localisation.keyboard.variant }}"
|
||||
XKBOPTIONS="{{ localisation.keyboard.options }}"
|
||||
|
||||
BACKSPACE="guess"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{% for locale in localisation.locale.generate %}
|
||||
{{ locale }}
|
||||
{% endfor %}
|
||||
3
packer/ansible/roles/readme_roles.md
Normal file
3
packer/ansible/roles/readme_roles.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
* alle „maker-tools“ in fablab
|
||||
* großer Kram in eigene role
|
||||
+ inkscape
|
||||
Loading…
Add table
Add a link
Reference in a new issue