From a79efba42589d206b765ebfa924cb4d04539452a Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 14 Dec 2020 20:23:01 +0100 Subject: [PATCH] configure arch mirror client --- defaults/main.yml | 2 +- tasks/pacman.yml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3f30753..c38ea3a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -82,5 +82,5 @@ system_base_softwares_debian: - 'traceroute' system_upgrade: false - +system_arch_local_mirror: keystodeploy: [] \ No newline at end of file diff --git a/tasks/pacman.yml b/tasks/pacman.yml index 07ea5b5..f74684e 100644 --- a/tasks/pacman.yml +++ b/tasks/pacman.yml @@ -13,6 +13,15 @@ notify: Update_pacman_repos when: ansible_architecture == "x86_64" +- name: add local repo to mirrorlist + become: yes + lineinfile: + path: /etc/pacman.d/mirrorlist + line: "Server= {{system_arch_local_mirror}}/$repo/os/$arch" + state: present + insertbefore: BOF + when: system_arch_local_mirror is defined + - name: stat ca-certificates stat: path: "/etc/ssl/certs/ca-certificates.crt" # required. The full path of the file/object to get the facts of.