Files
dev-machine/README.adoc
Felix Nehrke 37364e5204 Fix repos tag and add base tag
The `repos` tag was slightly broken because it was applied to the
include task but not to the included tasks. This is now fixed by simply
adding the necessary tag declaration to the included tasks.

Furthermore, I experienced a bad deadlock when the PGP key for the
Spotify packages expired. Because of that, every APT operation failed
and Ansible was unable to gather the facts required by package-related
tasks. Since the installation of the base utilities was coupled to the
`repos` tag, that tag failed as well. Because I use that tag to update
repository keys, I ended up in a deadlock.

The solution is the new `base` tag, which is only responsible for
installing the base utilities. This allows repository keys to be updated
independently of any preceding APT installations.
2026-07-15 01:42:22 +02:00

84 lines
2.8 KiB
Plaintext

= My dev-machine setup
:source-highlighter: rouge
:icons: font
:experimental: yes
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :point_up:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
ifdef::env-github[]
NOTE: This is only *a mirror* from my https://gitea.nehrke.info/nemoinho/dev-machine[personal git-server].
endif::[]
[abstract]
This ansible-playbook will setup my development machines and prepare them for work.
== Prepararation
The setup is a bit different for linux and macos, since I can use the local package-manager on linux.
Though on macos I need to install `brew` first!
In both cases we need to install `ansible` and `git` though.
.Prepararation on Debian and Ubuntu
[source,bash]
----
sudo apt install ansible git
----
.Prepararation on Macos
[source,bash]
----
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install ansible git
----
== Setup
The setup is very simple, just follow these steps and you're good to go:
[source,bash]
----
git clone https://gitea.nehrke.info/nemoinho/dev-machine.git ~/Development/nemoinho/dev-machine # <1>
cd $_
cp local.config.yml.tpl local.config.yml # <2>
vi $_ # <3>
vi password.txt # <4>
ansible-galaxy install -r requirements.yml --upgrade # <5>
ansible-playbook main.yml # <6>
git remote set-url origin git@gitea.nehrke.info:nemoinho/dev-machine.git # <7>
----
<1> Clone this repo into a suitable local directory (we use http since ssh is not ready yet)
<2> Configure the local environment
<3> Note, that haven't installed anything yet, so use the available tools!
<4> Provide the password for the ansible-vault, make sure the file only has the password inside, nothing else
<5> Install further ansible-requirements
<6> Run the playbook that setup my system
<7> Adjust the git-url of this repo to use ssh, which is way more convenient
[NOTE]
Use a secure password and keep it in a password-manager.
== Available tags
To restrict the scope of execution the playbook uses a couple of tags as described in the following table:
[%autowidth.stretch]
|===
| Tag | Scope description
| base | Install install-utils, needed to make the other installs work
| repos | Install 3rd party apt-repositories (only useful on linux)
| packages | Install system-packages
| dotfiles | Install my dotfiles and apply them
| ssh | Ensure a default SSH-key and provide it to gitea and github
| offlineimap | Setup systemd-service for offlineimap on debian. This needs to be explicitly defined, since Enpass has to be setup first!
| dump | Print out debug information
|===
== Cheat-Sheet
* The shortcut kbd:[Fn+1] toggles fans 100% (http://reddit.com/r/System76/comments/ol9a60[Ref])
* https://schoenwald.aero/posts/2025-01-27_podman-multiarch-image/[Create multiarch images with podman]