From bf313d7bcf6da08e448805c8a5c70c420b061079 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 4 Mar 2020 19:58:03 +0100 Subject: [PATCH] Update README for deployment with ansible --- README.md | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9fefd28..3fd7285 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,31 @@ # Prerequisites -* [stow][]: for symlinking the dotfiles into the home directory. -* [git-crypt][]: for handling sensitive data in the repo. -* [gpg][]: for decrypting the key used by `git-crypt`. - -[stow]: https://www.gnu.org/software/stow/manual/stow.html -[git-crypt]: https://github.com/AGWA/git-crypt -[gpg]: https://gnupg.org +* [ansible][]: for installing the dofiles. +* [git-crypt][]: for handling sensitive data in the repo + _(installed via ansible cookbook)_. +* [gpg][]: for decrypting the key used by `git-crypt` + _(installed via ansible cookbook)_. # Installation Steps: +1. Install [ansible][]. +1. Create an SSH key with (e.g. with + `ssh-keygen -t ed25519 -C "$(whoami)@$(hostname)"`) and register it. 1. Clone the repo. -2. Stow the files into home dir. -3. Decrypt key & initialize git-crypt to access sensitive data. +1. Play the `dotfiles.yml` ansible playbook. +1. Decrypt key & initialize git-crypt to access sensitive data. Cookbook: ```bash - cd $HOME - git clone git@git.schauenburg.me:fernando/dotfiles.git .dotfiles - cd .dotfiles - stow -v --no-folding dotfiles - gpg -d --output - <(base64 -d .key) | git crypt unlock - +sudo apt-get install ansible +git clone git@git.schauenburg.me:fernando/dotfiles.git $HOME/.dotfiles +cd $HOME/.dotfiles +ansible-playbook -i hosts.ini dotfiles.yml +gpg -d --output - <(base64 -d .key) | git crypt unlock - ``` +[ansible]: https://www.ansible.com +[git-crypt]: https://github.com/AGWA/git-crypt +[gpg]: https://gnupg.org +