feat(git): configure local settings
This commit is contained in:
parent
5390e77716
commit
dd14486223
3 changed files with 14 additions and 1 deletions
|
@ -2,19 +2,24 @@
|
|||
|
||||
set -e
|
||||
|
||||
CONFIG_DIR="$HOME/.config/dotfiles"
|
||||
DOTFILES_DIR="$HOME/.dotfiles"
|
||||
|
||||
clone_or_update_dotfiles() {
|
||||
git -C $DOTFILES_DIR pull
|
||||
}
|
||||
|
||||
create_config_dir() {
|
||||
mkdir -p "${CONFIG_DIR}"
|
||||
}
|
||||
|
||||
install_dependencies() {
|
||||
ansible-galaxy install -r "${DOTFILES_DIR}/requirements.yml"
|
||||
}
|
||||
|
||||
run_playbook() {
|
||||
# TODO: automatically skip roles if the playbook is run within WSL.
|
||||
ansible-playbook --diff --ask-become-pass "${DOTFILES_DIR}/main.yaml" "${@}"
|
||||
ansible-playbook --diff --extra-vars "@${CONFIG_DIR}/values.yaml" --ask-become-pass "${DOTFILES_DIR}/main.yaml" "${@}"
|
||||
}
|
||||
|
||||
clone_or_update_dotfiles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue