diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-09-11 18:01:37 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-09-12 10:17:24 +0200 |
commit | 3b7ba8532f31d221c0708e2d6733bccdd3935f91 (patch) | |
tree | 9ba4be99b8a6589d30f94a9fa029cd8ec56d23ef /roles/rate_mirrors/tasks/main.yml | |
parent | fix some ansible-lint warnings (diff) | |
download | infra-ansible-3b7ba8532f31d221c0708e2d6733bccdd3935f91.tar.gz infra-ansible-3b7ba8532f31d221c0708e2d6733bccdd3935f91.zip |
etckeeper: manage the ignore list
Diffstat (limited to 'roles/rate_mirrors/tasks/main.yml')
-rw-r--r-- | roles/rate_mirrors/tasks/main.yml | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/roles/rate_mirrors/tasks/main.yml b/roles/rate_mirrors/tasks/main.yml index 9d40fa2..4d72a41 100644 --- a/roles/rate_mirrors/tasks/main.yml +++ b/roles/rate_mirrors/tasks/main.yml @@ -1,28 +1,3 @@ -- name: Check if /etc is versioned - become: true - ansible.builtin.file: - path: /etc/.git/config - state: file - register: etc_versioned - -- name: Fail if there're uncommitted changes in /etc - when: etc_versioned - become: true - block: - - name: Check for changes in /etc - ansible.builtin.command: # noqa: command-instead-of-module - cmd: git status --porcelain=v1 - chdir: /etc - register: git_status - changed_when: false - - - name: Fail - ansible.builtin.fail: - msg: | - There are uncommitted changes in /etc: - {{ git_status.stdout }} - when: git_status.stdout - - name: Rate pacman mirrors become: true ansible.builtin.shell: | @@ -31,30 +6,3 @@ --disable-comments \ --save /etc/pacman.d/mirrorlist \ "$ID" - -- name: Commit pacman.d/mirrorlist - when: etc_versioned - become: true - block: - - name: Check for changes in /etc - ansible.builtin.shell: | - set -o pipefail && \ - git status --porcelain=v1 \ - | cut -c 4- \ - | grep -G -v '^pacman.d/mirrorlist' - args: - chdir: /etc - register: git_status - changed_when: false - failed_when: git_status.rc not in [0, 1] - - - name: Fail if there're other uncommitted changes - ansible.builtin.fail: - msg: | - How did this happen? Other files have been modified: - {{ git_status.stdout }} - when: git_status.rc == 0 - - - name: etckeeper commit - ansible.builtin.command: | - etckeeper commit 'rate-mirrors' |