Browse Source

Add more basic setup steps

master
Sebastian Wiesner 2 months ago
parent
commit
4d04d048fa
2 changed files with 56 additions and 40 deletions
  1. +1
    -0
      inventory/my-systems.yaml
  2. +55
    -40
      roles/arch-base/tasks/main.yml

+ 1
- 0
inventory/my-systems.yaml View File

@@ -1,6 +1,7 @@
my_systems:
hosts:
kasterl:
ansible_host: kasterl
ansible_connection: local
ansible_user: basti
ansible_python_interpreter: /usr/bin/python

+ 55
- 40
roles/arch-base/tasks/main.yml View File

@@ -6,6 +6,61 @@
name: pcspkr
state: absent

- name: Set hostname
hostname:
# Configure the host name as set in inventory (for localhost connections)
name: "{{ ansible_host }}"

- name: Configure static hosts
lineinfile:
path: /etc/hosts
line: "{{ item }}"
loop:
# See <https://wiki.archlinux.org/index.php/Installation_guide#Network_configuration>
- "127.0.0.1 localhost"
- "::1 localhost"
- "127.0.1.1 {{ ansible_host }}.localdomain {{ ansible_host }}"

- name: Enable locales
locale_gen:
name: "{{ item }}"
loop:
- "de_DE.UTF-8"
- "en_GB.UTF-8"
- "en_US.UTF-8"

- name: Use terminus as console font
copy:
dest: /etc/vconsole.conf
content: |
KEYMAP=us
FONT=ter-v24n
mode: "0644"
notify:
- mkinitcpio

- name: Set system locale to de_DE.utf8
copy:
dest: /etc/locale.conf
content: |
LANG=de_DE.UTF-8
mode: "0644"
- name: Set timezone
timezone:
name: "{{ timezone }}"

- name: Install packages for early boot
pacman:
state: present
name:
- base
- intel-ucode
- btrfs-progs
# EFI boot loaders
- efibootmgr
notify:
- mkinitcpio

- name: "Configure kernel module options"
copy:
dest: /etc/modprobe.d/ansible-{{ item.key }}.conf
@@ -110,46 +165,6 @@
notify:
- mkinitcpio

- name: Enable locales
locale_gen:
name: "{{ item }}"
loop:
- "de_DE.UTF-8"
- "en_GB.UTF-8"
- "en_US.UTF-8"

- name: Use terminus as console font
copy:
dest: /etc/vconsole.conf
content: |
KEYMAP=us
FONT=ter-v24n
mode: "0644"
notify:
- mkinitcpio

- name: Set system locale to de_DE.utf8
copy:
dest: /etc/locale.conf
content: |
LANG=de_DE.UTF-8
mode: "0644"
- name: Set timezone
timezone:
name: "{{ timezone }}"

- name: Install packages for early boot
pacman:
state: present
name:
- base
- intel-ucode
- btrfs-progs
# EFI boot loaders
- efibootmgr
notify:
- mkinitcpio

- name: Install basic packages
pacman:
state: present


Loading…
Cancel
Save