ansible-playbook to configure a new machine
- Ubuntu : YES
- MacOS : NO
- Manjaro: YES
- install nix
- https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#the-determinate-nix-installer
- enable flakes
- run
nix develop
, this will put you into a shell with the tools required to run this ansible playbook installed. - clone this repo via https
git clone https://github.com/pitoniak32/.ansible.git
- update the
./bootstrap.sh
file with the tags you want to run. - for work use
- need to run run
./bootstrap.sh
to get personal ssh key git submodule init && git submodule update
- update the file removing skip-tags for
gpg-work
, andssh-work
.- work gpg is still a work in progress due to yubi key gpg.
- run
./bootstrap.sh
Once you have your ssh key setup switch the remote so changes can be make via ssh:
git remote set-url origin git@github.com:pitoniak32/.ansible.git
Unlock individual vars
ansible-vault edit --vault-id vault@prompt file.yml
Manjaro:
docker build -f Dockerfile.manjaro . -t ansible-manjaro && \
docker run --entrypoint=/bin/bash -it ansible-manjaro
Ubuntu:
docker build -f Dockerfile.ubuntu . -t ansible-ubuntu && \
docker run --entrypoint=/bin/bash -it ansible-ubuntu
To only run tasks that would add personal ssh keys:
ansible-playbook playbook.yml -Kvv --tags "ssh-personal"