diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-18 16:59:01 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-18 16:59:01 +0300 |
commit | 17cc8d8ed9ef0b3ded2f2b176b1a77ae321f160f (patch) | |
tree | 83e57a78c9aa4355c27988fe7c2258e5f44a4fa3 | |
parent | 01606f5378a4976982deadf50e2900b7979b9f3e (diff) | |
download | v-i-17cc8d8ed9ef0b3ded2f2b176b1a77ae321f160f.tar.gz |
Add: Ansible playbook for x220 installation
-rw-r--r-- | x220.vmdb | 4 | ||||
-rw-r--r-- | x220.yml | 52 |
2 files changed, 54 insertions, 2 deletions
@@ -50,8 +50,8 @@ steps: - ifupdown fs-tag: root-fs - # - ansible: root-fs - # playbook: x220.yml + - ansible: root-fs + playbook: x220.yml - grub: uefi root-fs: root-fs diff --git a/x220.yml b/x220.yml new file mode 100644 index 0000000..abc9685 --- /dev/null +++ b/x220.yml @@ -0,0 +1,52 @@ +# Ansible playbook to install stuff on my Thinkpad X220. +# TODO: +# - maybe install iwlwifi firmware? +# - install liw-openpgp.pub and a gpg config to use my Yubikey + + +- hosts: image + tasks: + + - name: "set /etc/hostname" + shell: | + echo "{{ hostname }}" > /etc/hostname + + - name: "unset root password" + shell: | + sed -i '/^root:[^:]*:/s//root::/' /etc/passwd + + - name: "configure keyboard layout" + copy: + content: | + XKBMODEL="pc105" + XKBLAYOUT="fi" + XKBVARIANT="" + XKBOPTIONS="" + BACKSPACE="guess" + dest: /etc/default/keyboard + + - name: "configure console" + copy: + content: | + ACTIVE_CONSOLES="/dev/tty[1-6]" + CHARMAP="UTF-8" + CODESET="Lat15" + FONTFACE="Fixed" + FONTSIZE="8x16" + VIDEOMODE= + dest: /etc/default/console-setup + + - name: "set default LC_TYPE for all users" + shell: + echo export LC_CTYPE=fi_FI.UTF8 >> /etc/profile.d/finnish.sh + + - name: "configure networking" + copy: + content: | + auto eth0 + iface eth0 inet dhcp + iface eth0 inet6 auto + dest: /etc/network/interfaces.d/wired + + vars: + hostname: exolobe1 |