From b70370b2a2da59e0a1645e174ba490878bc8cf70 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 1 Sep 2023 02:07:12 +0200 Subject: my_dotfiles: run setup.sh on updates only --- roles/my_dotfiles/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'roles/my_dotfiles') diff --git a/roles/my_dotfiles/tasks/main.yml b/roles/my_dotfiles/tasks/main.yml index 3ebd011..dd4a664 100644 --- a/roles/my_dotfiles/tasks/main.yml +++ b/roles/my_dotfiles/tasks/main.yml @@ -1,10 +1,12 @@ -- name: Pull repositories +- name: Pull repository ansible.builtin.git: # noqa: latest repo: '{{ my_dotfiles_repo }}' dest: '{{ my_dotfiles_dir }}' accept_hostkey: true + register: repo - name: Run setup.sh ansible.builtin.command: ./setup.sh args: chdir: '{{ my_dotfiles_dir }}' + when: repo.changed -- cgit v1.2.3