From 28562a110d469fb5de90787ab7c1a4da14438fa9 Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 21 Apr 2022 17:09:50 +0200 Subject: [PATCH] use return code for proper continuation --- roles/base/tasks/users/all.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/base/tasks/users/all.yml b/roles/base/tasks/users/all.yml index 58bfffb..210c232 100644 --- a/roles/base/tasks/users/all.yml +++ b/roles/base/tasks/users/all.yml @@ -65,6 +65,7 @@ - { repo: 'ssh://git@gitlab.social.my-wan.de:22422/rene/dotfiles.git', dir: 'dotfiles' } - { repo: 'https://github.com/romkatv/powerlevel10k.git', dir: 'powerlevel10k' } ignore_errors: yes + register: dotfiles - name: users | {{ user }} | link dotfiles become: yes @@ -79,8 +80,12 @@ - { src: 'bash/bashrc', dest: '.bashrc' } - { src: 'zsh/zshrc', dest: '.zshrc' } - { src: 'tmux/tmux.conf', dest: '.tmux.conf' } + when: + - dotfiles.rc == 0 - name: users | {{ user }} | call dotfile install script become: yes become_user: '{{ user }}' - shell: "POWERLINE=n BASHIT=y ZSHCUSTOM=n {{ getent_passwd[user][4] }}/dotfiles/install.sh" \ No newline at end of file + shell: "POWERLINE=n BASHIT=y ZSHCUSTOM=n {{ getent_passwd[user][4] }}/dotfiles/install.sh" + when: + - dotfiles.rc == 0 \ No newline at end of file