You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

54 lines
1.3 KiB

- name: Run pacstrap.
command: >
pacstrap /mnt
base base-devel linux linux-firmware
efibootmgr grub openssh networkmanager btrfs-progs python
vim git zsh
- name: Generate fstab.
shell: genfstab -U /mnt >> /mnt/etc/fstab
- name: Set localtime.
command: arch-chroot /mnt ln -sf /usr/share/zoneinfo/{{ timezone }} /etc/localtime
- name: Sync time to hardware.
command: arch-chroot /mnt hwclock --systohc
- name: Select locales.
lineinfile:
path: /mnt/etc/locale.gen
regexp: '^#en_US\.UTF-8 UTF-8'
line: en_US.UTF-8 UTF-8
- name: Generate locales.
command: arch-chroot /mnt locale-gen
- name: Save locale to /etc/locale.conf.
copy:
dest: /mnt/etc/locale.conf
content: "LANG=en_US.UTF-8"
- name: Save keyboard layout to /etc/vconsole.conf.
copy:
dest: /mnt/etc/vconsole.conf
content: "KEYMAP=us"
- name: Set hostname.
copy:
dest: /mnt/etc/hostname
content: "{{ hostname }}"
- name: Configure /etc/hosts.
copy:
dest: /mnt/etc/hosts
content: |
127.0.0.1 localhost
::1 localhost
127.0.0.1 {{ hostname }}.localdomain {{ hostname }}
- name: Enable important services.
command: "arch-chroot /mnt systemctl enable {{ item }}"
with_items:
- sshd.service
- NetworkManager.service
- fstrim.timer