Skip to content

General Ansible-playbook for installing arch from the live iso - pre install

Notifications You must be signed in to change notification settings

MayNiklas/ansible-arch-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-arch-install

Lines Of Code Lines Of Code Lines Of Code

Intro

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!

Post install

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

Roles used

Role Variables:

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

Quick start

  1. Make sure ansible is on the controller device:
# arch
sudo pacman -S ansible
# debian
sudo apt-get install ansible
# MacOS
brew install ansible
  1. To install all the roles needed at the same time with one command, run the following:
ansible-galaxy install -r requirements.yml
  1. 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
  1. Boot the archiso
  2. Set the root password
passwd
  1. Set ChallengeResponseAuthentication yes
vim /etc/ssh/sshd_config
  1. Restart SSH
systemctl restart sshd
  1. Transfer your controllers public key:
ssh-copy-id root@<ip-adress>
  1. execute the playbook on your controller device
ansible-playbook site.yml

About

General Ansible-playbook for installing arch from the live iso - pre install

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published