Unify the "update" target

This commit is contained in:
2021-10-07 11:14:29 +02:00
committed by Hannes Körber
parent a9850d527c
commit 0e125af3f7
3 changed files with 7 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ all: | venv $(ansible)
.PHONY: update .PHONY: update
update: $(ansible) update: $(ansible)
$(ansible_run) --tags update_system $(ansible_run) --tags update
.PHONY: reboot .PHONY: reboot
reboot: reboot:

View File

@@ -81,7 +81,7 @@
changed_when: false changed_when: false
when: distro == 'archlinux' when: distro == 'archlinux'
tags: [update_system] tags: [update]
- block: - block:
- name: install sudo - name: install sudo

View File

@@ -314,6 +314,7 @@
register: ycm_before_update register: ycm_before_update
changed_when: false changed_when: false
failed_when: ycm_before_update.rc not in (0, 200) failed_when: ycm_before_update.rc not in (0, 200)
tags: [update]
- name: install vim plugins - name: install vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
@@ -329,10 +330,12 @@
changed_when: false changed_when: false
register: vim_plugin_update register: vim_plugin_update
changed_when: vim_plugin_update.stderr != "" changed_when: vim_plugin_update.stderr != ""
tags: [update]
- name: update go binaries for vim - name: update go binaries for vim
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall' command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
changed_when: false changed_when: false
tags: [update]
- name: get ycm version after update - name: get ycm version after update
shell: | shell: |
@@ -342,6 +345,7 @@
executable: /bin/bash executable: /bin/bash
register: ycm_after_update register: ycm_after_update
changed_when: false changed_when: false
tags: [update]
- name: compile youcompleteme - name: compile youcompleteme
# --force-sudo is required, as the script refuses to run in a sudo # --force-sudo is required, as the script refuses to run in a sudo
@@ -358,6 +362,7 @@
(ycm_before_update.rc == 200) (ycm_before_update.rc == 200)
or or
(ycm_before_update.stdout != ycm_after_update.stdout) (ycm_before_update.stdout != ycm_after_update.stdout)
tags: [update]
tags: [vim-plugins] tags: [vim-plugins]
- block: - block: