This ansible-playbook is being used for installing Arch Linux on a new computer. Please make sure, that you understand the underlaying roles and what they do before following my quickstart guide. I am NOT responsible to anything that might happen by executing my ansible roles. As we are installing a new operating system, ansible-arch-setup is formatting your drive before the install. This leads into dataloss. Don't forget to correctly backup your device!
My arch install is splitted into "pre and postinstall" ansible-playbooks. There is a second playbook I'm using after the first reboot: ansible-arch
To be set in group_vars OR host_vars
Variable | Description | Default |
---|---|---|
ansible_user |
user used for login into archiso | root |
user_name |
name of the user being created | nik |
ansible_host |
ip adress of your computer | <empty> |
user_password |
hashed pw of the user being created | <empty> |
hostname |
hostname that should be set | arch-workstation |
install_drive |
path of the drive being used | /dev/sda |
bios_partition_suffix |
only relevant when changing the whole task by yourself | 1 |
boot_partition_suffix |
efi partion has the partion number 1 | 1 |
root_partition_suffix |
root partion has the partion number 2 | 2 |
bios |
set to true when you want a bios install -> conflicts with efi | false |
efi |
set to true when you want a efi install -> conflicts with bios | false |
intel |
set to true when you want to install intel-ucode & mesa | false |
amd |
set to true when you want to install amd-ucode | false |
nvidia |
set to true when you want to install nvidia & nvidia-settings | false |
bluetooth |
set to true when you want to configure bluetooth | false |
sshd |
set to true when you want a running sshd server | false |
xorg |
set to true when you want to install xorg packages | false |
plasma |
set to true when you want to install plasma & boot into it | false |
- Make sure ansible is on the controller device:
# arch
sudo pacman -S ansible
# debian
sudo apt-get install ansible
# MacOS
brew install ansible
- To install all the roles needed at the same time with one command, run the following:
ansible-galaxy install -r requirements.yml
- Insert variables to your own liking:
vim host_vars/localhost.yml
vim group_vars/localhost.yml
The user_password has to be created by using
mkpasswd --method=sha-512
In case you don't want to install whois/mkpasswd on your system:
docker run --rm -it debian bash
apt update
apt install whois
mkpasswd --method=sha-512
exit
- Boot the archiso
- Set the root password
passwd
- Set ChallengeResponseAuthentication yes
vim /etc/ssh/sshd_config
- Restart SSH
systemctl restart sshd
- Transfer your controllers public key:
ssh-copy-id root@<ip-adress>
- execute the playbook on your controller device
ansible-playbook site.yml