From 727ab17a644d52105746e18c301cf733b1181507 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 31 Jul 2023 23:44:54 +0200 Subject: move Ansible files to src/ --- roles/rate_mirrors/meta/main.yml | 3 --- roles/rate_mirrors/tasks/main.yml | 45 --------------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 roles/rate_mirrors/meta/main.yml delete mode 100644 roles/rate_mirrors/tasks/main.yml (limited to 'roles/rate_mirrors') diff --git a/roles/rate_mirrors/meta/main.yml b/roles/rate_mirrors/meta/main.yml deleted file mode 100644 index 4516fa1..0000000 --- a/roles/rate_mirrors/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - - role: common - - {role: etckeeper, when: etc_versioned} diff --git a/roles/rate_mirrors/tasks/main.yml b/roles/rate_mirrors/tasks/main.yml deleted file mode 100644 index 9cdab0d..0000000 --- a/roles/rate_mirrors/tasks/main.yml +++ /dev/null @@ -1,45 +0,0 @@ -- name: As root user - become: true - block: - - name: Fail if there're uncommitted changes in /etc - when: etc_versioned - block: - - name: Check for changes in /etc - ansible.builtin.command: git status --porcelain=v1 - args: - chdir: /etc - register: git_status - changed_when: false - failed_when: false - - - ansible.builtin.fail: - msg: There are uncommitted changes in /etc - when: git_status.stdout - - - name: Rate pacman mirrors - ansible.builtin.shell: | - . /etc/os-release && rate-mirrors \ - --allow-root \ - --disable-comments \ - --save-to-file /etc/pacman.d/mirrorlist \ - "$ID" - - - name: Commit pacman.d/mirrorlist - when: etc_versioned - block: - - name: Check for changes in /etc - ansible.builtin.command: git status --porcelain=v1 - args: - chdir: /etc - register: git_status - changed_when: false - failed_when: false - - - name: Fail if there're other uncommitted changes - ansible.builtin.fail: - msg: How did this happen? - when: git_status.stdout != ' M pacman.d/mirrorlist' - - - name: Commit changes in /etc/pacman.d/mirrorlist - ansible.builtin.command: | - etckeeper commit 'rate-mirrors' -- cgit v1.2.3