From 37821a77ab6b0c72c774f06ff73bb27e4572f866 Mon Sep 17 00:00:00 2001 From: bretello Date: Sun, 11 Apr 2021 20:16:31 +0200 Subject: [PATCH] ansible: add update.yml to perform updates, add vim install step --- ansible/playbooks/setup.yml | 7 +++++-- ansible/playbooks/update.yml | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ansible/playbooks/update.yml diff --git a/ansible/playbooks/setup.yml b/ansible/playbooks/setup.yml index cf81ad6..d0ab1b2 100644 --- a/ansible/playbooks/setup.yml +++ b/ansible/playbooks/setup.yml @@ -71,6 +71,9 @@ command: mv ${HOME}/.vim_runtime/temp_dirs/undodir ${HOME}/.vim/undo when: undodir.stat.exists + - name: vim plugins install + command: DOTFILES={{ DOTFILES }} vim -c 'PlugInstall|qa!' + - name: git config facts community.general.git_config: name: "include.path" @@ -92,14 +95,14 @@ dest: ~/.gitignore owner: root group: root - mode: '0600' + mode: "0600" backup: yes - name: annoyances shell: | ## Fix scrolling in byobu if [[ $(uname) == "Darwin" ]]; then - sed -i '' 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/share/byobu/profiles/tmux + sed -i '' 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/local/share/byobu/profiles/tmux else sed -i 's/set -g terminal-overrides/#set -g terminal-overrides/' /usr/share/byobu/profiles/tmux fi diff --git a/ansible/playbooks/update.yml b/ansible/playbooks/update.yml new file mode 100644 index 0000000..bec2da0 --- /dev/null +++ b/ansible/playbooks/update.yml @@ -0,0 +1,17 @@ +--- +- hosts: all + become: true + vars: + DOTFILES: "$HOME/.dotfiles" + + tasks: + - name: dotfiles + ansible.builtin.command: git pull --rebase --autostash + args: + chdir: "{{ DOTFILES }}" + + - name: antibody + command: antibody update + + - name: vim + ansible.builtin.shell: DOTFILES={{DOTFILES}} vim -c 'PlugUpdate|qa!'