diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-09-11 14:51:02 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-09-11 14:51:02 +0200 |
commit | 4410fbcd9a524840b905c783a981afc8d36ce645 (patch) | |
tree | f8a8ca8e9506722c39051307436d2cefc2c7b753 | |
parent | pacman: drop dependency on etckeeper role + refactoring (diff) | |
download | infra-ansible-4410fbcd9a524840b905c783a981afc8d36ce645.tar.gz infra-ansible-4410fbcd9a524840b905c783a981afc8d36ce645.zip |
fix some ansible-lint warnings
-rw-r--r-- | roles/etckeeper/handlers/commit_conf.yml | 8 | ||||
-rw-r--r-- | roles/pacman/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/rate_mirrors/tasks/main.yml | 7 |
3 files changed, 10 insertions, 9 deletions
diff --git a/roles/etckeeper/handlers/commit_conf.yml b/roles/etckeeper/handlers/commit_conf.yml index a9eb409..134e264 100644 --- a/roles/etckeeper/handlers/commit_conf.yml +++ b/roles/etckeeper/handlers/commit_conf.yml @@ -7,16 +7,16 @@ | grep -G -v '^etckeeper/etckeeper.conf' args: chdir: /etc - register: etckeeper_modified_files + register: git_status changed_when: false - failed_when: etckeeper_modified_files.rc not in [0, 1] + failed_when: git_status.rc not in [0, 1] - name: Fail if unexpected files were modified ansible.builtin.fail: msg: | Unexpected files were modified: - {{ etckeeper_modified_files.stdout }} - when: etckeeper_modified_files.rc == 0 + {{ git_status.stdout }} + when: git_status.rc == 0 - name: etckeeper commit become: true diff --git a/roles/pacman/tasks/main.yml b/roles/pacman/tasks/main.yml index 213ef01..5ed782f 100644 --- a/roles/pacman/tasks/main.yml +++ b/roles/pacman/tasks/main.yml @@ -23,8 +23,8 @@ when: not etc_versioned - name: Check for changes in /etc - ansible.builtin.command: git status --porcelain=v1 - args: + ansible.builtin.command: # noqa: command-instead-of-module + cmd: git status --porcelain=v1 chdir: /etc register: git_status changed_when: false diff --git a/roles/rate_mirrors/tasks/main.yml b/roles/rate_mirrors/tasks/main.yml index d000b13..9d40fa2 100644 --- a/roles/rate_mirrors/tasks/main.yml +++ b/roles/rate_mirrors/tasks/main.yml @@ -10,13 +10,14 @@ become: true block: - name: Check for changes in /etc - ansible.builtin.command: git status --porcelain=v1 - args: + ansible.builtin.command: # noqa: command-instead-of-module + cmd: git status --porcelain=v1 chdir: /etc register: git_status changed_when: false - - ansible.builtin.fail: + - name: Fail + ansible.builtin.fail: msg: | There are uncommitted changes in /etc: {{ git_status.stdout }} |