Red Hat
System replacement
Multiple machines
Share between Work & Home
Cow Photo by Rasmus Andersen on Unsplash
What about pet cows?
Learn a new skill
Share
Cool Factor
https://xkcd.com/1205/
Framing
Photo by Angèle Kamp on Unsplash
Just install and accept defaults.
# update it to do some stuff
$EDITOR tasks/main.yml
# run it - lazy shortcut
ansible -K localhost -c local \
-m include_role -a name=$USER-environment
(and commit/push to a repo for sharing)
Package types:
files/no-passwords.conf
PasswordAuthentication no
Ansible:
- name: Disable ssh password authentication
become: true
ansible.builtin.copy:
src: no-passwords.conf
dest: /etc/ssh/sshd_config.d/no-passwords.conf
mode: '0600'
templates/sudoers-custom.j2
{{ ansible_user_id }} ALL=(ALL) NOPASSWD: ALL
Ansible:
- name: Land sudoers template
ansible.builtin.template:
src: sudoers-custom.j2
dest: /etc/sudoers.d/sudoers-custom
validate: /usr/sbin/visudo -cf %s
ansible-galaxy role install \
--force \
git+https://github.com/$USER/$USER-environment
ansible -K localhost -c local \
-m include_role -a name=$USER-environment
Note
You can apply remotely as well, see docs.
# also pulls dotfiles if you already use chezmoi
sh -c "$(curl -fsLS get.chezmoi.io)" \
-- init \
--apply \
$GITHUB_USERNAME
dot_gitconfig.tmpl
[user]
name = Kevin Howell
email = {{ .email }}
[core]
editor = vim
[diff]
tool = meld
[init]
defaultBranch = main
Useful code that isn’t distro packaged (yet)
GitHub Releases
Python Packages
Node Packages
~/.local/share/chezmoi/ .chezmoiexternal.toml.tmpl
{{ $versions := (fromYaml (include "versions.yaml")) -}}
["bin/ollama"]
type = "file"
executable = true
url = "https://github.com/ollama/ollama/releases/download/{{ $versions.ollama }}/ollama-linux-amd64"
Tip
You can use this with renovate to get automated updates.
~/.local/share/chezmoi/ run_after_poetryinstall.sh
Note
Can follow a similar pattern for npm packages.
Tip
You can use this with renovate/dependabot to get automated updates.
$PATH
)Thanks for attending!