Hephaestus is the affectionate name I gave my workstation. Named after the Greek god of engineering, I like to think of this setup as my ultimate project station.
I originally made this repo to not only install my machine from scatch but to configure it and install the packages I use on a daily basis. I have since moved away from using Ansible to configure system and instead have moved to a yaml defined configuration management tool I created called yacm. You can find all of my yacm profiles for all of my machines here.
The playbook in this repo is designed to configure my linux machine from a base system install all the way up. This repo also follow ansible’s idempotent philosophy so this playbook can be run at any point in the machines life to tweak things. This repo was inspired by archer by sudo forge on GitHub.
If you are using this to install the entire system from scratch, simple boot an arch iso and be sure you can ssh to it:
root@archiso ~: passwd
New password:
Retype password:
passwd: password updated successfully
root@archiso ~:
Be sure to grab the ip with:
ip addr
You can then run the base-install.sh script to install a bare arch linux filesystem. This script assumes you know how to partition your machine for your hardware but should support almost any drive partition setup and support both bios and uefi partitioning. If you aren’t 100% certain on partitioning your drive be sure to check out the arch installation guide. If you already have a bare arch linux filesystem installed you can skip this step and run the ansible playbook.
If you used the base-install.sh script it will automatically kick off the ansible playbook for an initial install. This playbook is designed to be idempotent though so you can clone down this repo and run the playbook at anypoint in the machines life. The only prerequiste for running the ansible playbook is to have ansible installed to run the playbook. You will also need git installed to clone this repo. Both of these tasks are handled by the base-install.sh script if you are using this repo to install from scratch.
With ansible installed and the repo cloned you can run the playbook with the following command:
ansible-playbook playbooks/hephaestus.yml
You can provide the following additional variables to your ansible run:
Variable | Values | Description |
---|---|---|
efi | true/false | sets if grub should use efi |
install_grub | true/false | will install or reinstall grub |
remake_grub_config | ture/false | will rebuild grub.cfg |
My bash scripts uses the following commands to run the ansible playbook:
ansible-playbook playbooks/hephaestus.yml -e install_grub=true
Or if EFI install:
ansible-playbook playbooks/hephaestus.yml -e efi=true -e install_grub=true
If you seriously want to know how everything works here is a basic rundown. base-install.sh copies over the other scripts in the install_scripts directory. In that directory you will find the before-install.sh script which will handle the partitioning, formatting, mounting, and install of the arch install guide. After that scripts completes base-install.sh will copy over all of the files needed to run the ansible playbook and will then kick off the after-install.sh script. The after-install.sh script essential just copies the ansible.sh script into the mounted drive and runs the ansible.sh script through arch-chroot. Finally the ansible.sh script does just what it implies and kicks off the ansible playbook. Once all of that is finished the base-install.sh script cleans up any files and scripts it made and then prompts the user to ask if they want to shutdown their newly installed machine.
If you have questions about any of the ansible roles each role has its own README file that should explain a bit about the role.