diff --git a/ansible/roles/fix_centos_repo/tasks/main.yaml b/ansible/roles/fix_centos_repo/tasks/main.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..07ac57b82fc54caefe8e133cff91a7211dfd3f2e
--- /dev/null
+++ b/ansible/roles/fix_centos_repo/tasks/main.yaml
@@ -0,0 +1,16 @@
+---
+- name: Remove mirrorlist from CentOS repo files
+  ansible.builtin.replace:
+    path: "{{ item }}"
+    regexp: '^mirrorlist'
+    replace: '#mirrorlist'
+    backup: yes
+  with_fileglob: '/etc/yum.repos.d/CentOS-*.repo'
+
+- name: Use vault baseurl to CentOS repo files
+  ansible.builtin.replace:
+    path: "{{ item }}"
+    regexp: '^#baseurl=http://mirror.centos.org'
+    replace: 'baseurl=http://vault.centos.org'
+    backup: yes
+  with_fileglob: '/etc/yum.repos.d/CentOS-*.repo'