Update dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoiremove, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_tinypng.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl
This commit is contained in:
parent
fc5e81103d
commit
589072562b
4 changed files with 24 additions and 7 deletions
|
@ -171,6 +171,7 @@ data:
|
|||
SNAPCRAFT_EMAIL: "{{ $email }}"
|
||||
TABBY_CONFIG_ID: "{{ $tabbyConfigId }}"
|
||||
TABBY_SYNC_TOKEN: "{{ $tabbySyncToken }}"
|
||||
TINYPNG_API_KEY: "g355tx7dxG5yJfl0RXJnpQlQqk88dJBv"
|
||||
diff:
|
||||
format: "git"
|
||||
pager: "delta"
|
||||
|
|
|
@ -11,15 +11,26 @@ Brewfile
|
|||
.gradle
|
||||
.inputrc
|
||||
.krew
|
||||
.lesshst
|
||||
.m2
|
||||
.npmrc
|
||||
.pip
|
||||
.pnpm-state/
|
||||
.profile
|
||||
.python_history
|
||||
.rustup
|
||||
.subversion
|
||||
.tinypng
|
||||
.tmux.conf
|
||||
.tmux.conf.local
|
||||
.v8flags*
|
||||
.vagrant.d/
|
||||
.viminfo
|
||||
.wgetrc
|
||||
.wget-hsts
|
||||
.zlogin
|
||||
.zlogout
|
||||
.zsh_history
|
||||
.zsh_sessions
|
||||
.zprofile
|
||||
.zshrc.zwc
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
tinypng -k {{ .user.TINYPNG_API_KEY }} $@
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
### Symlink the variables / files / inventories to ~/.config/ansible folders if they are present
|
||||
### i.e. Changes to upstream will not impact the play if your configuration files are stored locally
|
||||
for TARGET of "files" "group_vars" "host_vars" "inventories" "templates"; do
|
||||
for TARGET in "files" "group_vars" "host_vars" "inventories" "templates"; do
|
||||
if [ -d "$HOME/.config/ansible/$TARGET" ] && [ "$(readlink -f "$HOME/.local/share/ansible/$TARGET")" != "$HOME/.config/ansible/$TARGET" ]; then
|
||||
logg 'Symlinking Ansible playbook `'"$TARGET"'` to ~/.config/ansible/$TARGET'
|
||||
rm -f "$HOME/.local/share/ansible/$TARGET"
|
||||
|
@ -13,9 +13,11 @@ done
|
|||
### Symlink tasks as well
|
||||
### Note: Only handles tasks one level deep (i.e. ~/.config/ansible/tasks/my-task.yml will link to the tasks folder
|
||||
### but ~/.config/ansible/tasks/directory/my-other-task.yml will not)
|
||||
find "$HOME/.config/ansible/tasks" -type f | while read TASK_FILE; do
|
||||
TASK_FILE_NAME="$(echo "$TASK_FILE" | sed 's/.*\/\([^\/]*\)$/\1/')"
|
||||
if [ "$(readlink -f "$HOME/.local/share/ansible/tasks/$TASK_FILE_NAME")" != "$TASK_FILE" ]; then
|
||||
ln -s "$TASK_FILE" "$HOME/.local/share/ansible/tasks/$TASK_FILE_NAME"
|
||||
fi
|
||||
done
|
||||
if [ -d "$HOME/.config/ansible/tasks" ]; then
|
||||
find "$HOME/.config/ansible/tasks" -type f | while read TASK_FILE; do
|
||||
TASK_FILE_NAME="$(echo "$TASK_FILE" | sed 's/.*\/\([^\/]*\)$/\1/')"
|
||||
if [ "$(readlink -f "$HOME/.local/share/ansible/tasks/$TASK_FILE_NAME")" != "$TASK_FILE" ]; then
|
||||
ln -s "$TASK_FILE" "$HOME/.local/share/ansible/tasks/$TASK_FILE_NAME"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue