From fc531935fd17f354300af155c282e5d8dc9a0ea0 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Fri, 16 Feb 2024 00:00:00 +0700 Subject: [PATCH] Update README --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cd63905..a231921 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,41 @@ This is the continuation of [my old dotfiles](/folliehiyuki/dotfiles) without all the Xorg stuff I don't use. -## 🧰 Setup +## 🧰 Usage ```bash -# Install `community.general` for 'apk' and 'doas' module if you only installed ansible-core +# Install non-core Ansible modules if only ansible-core package is installed ansible-galaxy collection install -r requirements/collections.yml + +# Create an encrypted vars file to store secret variables +# (see "Variables" section below) +mkdir -p host_vars/$HOSTNAME +touch host_vars/$HOSTNAME/secrets.yml +ansible-vault encrypt host_vars/$HOSTNAME/secrets.yml +ansible-vault edit host_vars/$HOSTNAME/secrets.yml + # Run the playbook +ansible-playbook playbooks/system.yml ansible-playbook playbooks/dotfiles.yml ``` -`extend.yml` playbook contains tasks unrelated to dotfiles deployment, but useful (for me). +## Variables -Optional variables (not listed inside `group_vars/all/`) as they should be kept confidential: -- `pixiv_refresh_token`: used in gallery-dl config +Beside variables defined in [group_vars/all/](./group_vars/all), these are also available: +- `vault_password` (required): the password of the created user (used by [system.yml](./playbooks/system.yml) playbook) +- `pixiv_refresh_token`: in-browser refresh token used in gallery-dl to access Pixiv - `google_calendar_id`, `google_oauth_client_id`, `google_oauth_client_secret`: used in calcurse CalDAV config - `user_ssh_key_path`: configure Git to sign commits with this SSH key +## Playbooks + +- [system.yml](./playbooks/system.yml) should be the first to be run. Needs to be run as `root`. +- [dotfiles.yml](./playbooks/dotfiles.yml) configures `$HOME` directory. +- [extend.yml](./playbooks/extend.yml) contains additional tasks unrelated to dotfiles and system deployment, but useful (for me). + ## 📓 Notes -The main playbook probably works on whatever Linux distribution you are running (*haven't tested*). - -The additional playbook gears toward my Linux distribution of choice - [Alpine Linux](https://alpinelinux.org). Tasks included in them might not work on other distributions (e.g. `apk` tasks) +The playbooks gear toward my Linux distribution of choice - [Alpine Linux](https://alpinelinux.org). Tasks included in them might not work on other distributions (e.g. `apk` tasks) ## 🌟 Credits