aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/snap
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/snap/tasks/main.yml10
1 files changed, 6 insertions, 4 deletions
diff --git a/roles/snap/tasks/main.yml b/roles/snap/tasks/main.yml
index f3be9ba..cce49b0 100644
--- a/roles/snap/tasks/main.yml
+++ b/roles/snap/tasks/main.yml
@@ -1,7 +1,8 @@
-- become: true
+- name: As root user
+ become: true
block:
- name: Check for changes in /etc
- command: git status --porcelain=v1
+ ansible.builtin.command: git status --porcelain=v1
args:
chdir: /etc
register: git_status
@@ -9,7 +10,8 @@
failed_when: false
- name: All changes in /etc are snap changes?
- shell: |
+ ansible.builtin.shell: |
+ set -o pipefail && \
git status --porcelain=v1 \
| cut -c 4- \
| grep -G -v '^systemd/system/' \
@@ -21,5 +23,5 @@
failed_when: false
- name: Commit changes in /etc
- command: etckeeper commit 'after snap run'
+ ansible.builtin.command: etckeeper commit 'after snap run'
when: git_status.stdout and only_snap.rc != 0