diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-21 19:01:59 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-21 19:01:59 +0200 |
commit | f20e3bf3557451047a3ab035de503cd2ce35a550 (patch) | |
tree | aee99bb289cf4ca1a85ac983e8148f2eb1b8d82c /roles/snap | |
parent | my_server: update docker-compose flags (diff) | |
download | maintenance-f20e3bf3557451047a3ab035de503cd2ce35a550.tar.gz maintenance-f20e3bf3557451047a3ab035de503cd2ce35a550.zip |
fix some ansible-lint warnings
Diffstat (limited to 'roles/snap')
-rw-r--r-- | roles/snap/tasks/main.yml | 10 |
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 |