Skip to content
Snippets Groups Projects
main.yaml 482 B
Newer Older
---
- 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'