From 2704df494abeb3f8619242df7c0858a53dd664e0 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Tue, 12 Oct 2021 21:09:40 +0200 Subject: [PATCH] dynamic dotfile example in doc --- docs/config-details.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/config-details.md b/docs/config-details.md index 411bac7..25c567f 100644 --- a/docs/config-details.md +++ b/docs/config-details.md @@ -601,6 +601,27 @@ profiles: - f_somefile ``` +Or when you need to select the dotfile to deploy depending on +the profile used (`ssh_config.perso` for the profile `perso` and +`ssh_config.work` for the `work` profile): +```yaml +dotfiles: + f_ssh_config: + src: "{{@@ ssh_config_file @@}}" + dst: ~/.ssh/config +profiles: + perso: + dotfiles: + - f_ssh_config + variables: + - ssh_config_file: "ssh_config.perso" + work: + dotfiles: + - f_ssh_config + variables: + - ssh_config_file: "ssh_config.work" +``` + ## Dynamic dotfile link value Dotfile `link` values can be dynamically constructed using