From f320dc2306a77da017a6bacda733c31d0f32f460 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 9 Aug 2021 14:32:00 +0300 Subject: use "args: chdir=" instead of "cd " --- roles/pacman/tasks/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'roles/pacman/tasks') diff --git a/roles/pacman/tasks/main.yml b/roles/pacman/tasks/main.yml index 31b4352..3f5500f 100644 --- a/roles/pacman/tasks/main.yml +++ b/roles/pacman/tasks/main.yml @@ -22,7 +22,9 @@ when: not etc_versioned - name: There are uncommitted changes - shell: cd /etc && git status --porcelain=v1 + command: git status --porcelain=v1 + args: + chdir: /etc register: git_status changed_when: no @@ -31,7 +33,9 @@ when: not git_status.stdout - name: All changes are pacman.d/gnupg - shell: cd /etc && git status --porcelain=v1 | cut -c 4- | grep -G -v '^pacman.d/gnupg/' + shell: git status --porcelain=v1 | cut -c 4- | grep -G -v '^pacman.d/gnupg/' + args: + chdir: /etc register: only_gnupg changed_when: no ignore_errors: yes -- cgit v1.2.3