diff options
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | archlinux.md | 19 | ||||
| -rw-r--r-- | ubuntu.md | 24 |
3 files changed, 59 insertions, 1 deletions
@@ -21,16 +21,31 @@ Ex. `rm .gitattributes && cp host_vars/ubuntuiso.local.yml.example host_vars/ubu ## Boot distro live image +- [Arch Linux](./archlinux.md) +- [Debian Ubuntu](./ubuntu.md) + ## Playbook: distro-install +- Optional: Clone the [`distro-configure`](https://git.sr.ht/~a14m/ansible-distro-configure) playbook +- Optional: Configure the desired `host_vars` in the `distro-configure` playbook - Follow the pre-install guides for desired distro in "Boot distro live image" - Install ansible required dependencies +- Configure the desired `host_vars` in this playbook - Run the playbook +**Example**: + ```bash +git clone https://git.sr.ht/~a14m/ansible-distro-configure /opt/distro-configure +cp /opt/distro-configure/host_vars/${DISTRO}.local.yml.example /opt/distro-configure/host_vars/${DISTRO}.local.yml + +git clone https://git.sr.ht/~a14m/ansible-distro-install /opt/distro-install +cp /opt/distro-install/host_vars/${DISTRO}iso.local.yml.example /opt/distro-install/host_vars/${DISTRO}iso.local.yml + ansible-galaxy install -r requirements.yml +cd /opt/distro-install -ansible-playbook site.yml --ask-pass +ansible-playbook site.yml --ask-pass --extra-vars '{"configure_playbook_dir":"/opt/distro-configure"}' ``` ## Special Thanks to diff --git a/archlinux.md b/archlinux.md new file mode 100644 index 0000000..7c44d72 --- /dev/null +++ b/archlinux.md @@ -0,0 +1,19 @@ +# Install ArchLinux + +- Download [archlinux](https://archlinux.org/releng/releases/) +- Format a USB +- Unmount disk (on MacOS ex. `diskutil unmountDisk /dev/diskX`) +- Create bootable image from iso `sudo dd if=/path/to/image.iso of=/dev/diskX bs=4M status=progress` +- Boot the `archiso` live image from a bootable USB. +- Connect to wireless network (if not connected via LAN). +- Set root password (which will be asked to run the install playbook). +- `cp host_vars/archiso.local.example host_vars/archiso.local` +- Update the `host_vars/archiso.local` file +- Run the playbook on the ansible controller + +**Example:** + +```bash +passwd +iwctl --passphrase <PASSPHRASE> station wlan0 connect <SSID> +``` diff --git a/ubuntu.md b/ubuntu.md new file mode 100644 index 0000000..646a2fa --- /dev/null +++ b/ubuntu.md @@ -0,0 +1,24 @@ +# Install Ubuntu + +- Download [ubuntu](https://ubuntu.com/download/alternative-downloads) +- Format a USB +- Unmount disk (on MacOS ex. `diskutil unmountDisk /dev/diskX`) +- Create bootable image from iso `sudo dd if=/path/to/image.iso of=/dev/diskX bs=4M status=progress` +- Boot the `ubuntu` live image from a bootable USB +- Connect to wireless network (if not connected via LAN) +- Set root password (which will be asked to run the install playbook) +- Set the hostname to `ubuntuiso.local` +- Install and configure ssh +- `cp host_vars/ubuntuiso.local.example host_vars/ubuntuiso.local` +- Update the `host_vars/ubuntuiso.local` file +- Run the playbook on the ansible controller + +**Example:** + +```bash +nmcli dev wifi connect <SSID> password <PASSPHRASE> +sudo hostnamectl set-hostname ubuntuiso.local +sudo apt update +sudo DEBIAN_FRONTEND=noninteractive apt install -y openssh-server +sudo systemctl restart ssh avahi-daemon +``` |
