--- - name: Configure base repositories yum_repository: file: CentOS-{{ item.repo }} description: "Centos - {{ item.repo }}" name: "{{ item.repo }}" baseurl: http://mirror.centos.org/$contentdir/$releasever/{{ item.repo }}/$basearch/os/ gpgcheck: True gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial enabled: "{{ item.enabled | default(True) }}" loop: - repo: BaseOS - repo: AppStream - repo: Extras - repo: cr enabled: False - repo: centosplus enabled: False - repo: PowerTools enabled: False - repo: fasttrack enabled: False tags: repo - name: Remove Base file file: path=/etc/yum.repos.d/{{ item }}.repo state=absent loop: - CentOS-Base # Replaced with CentOS-BaseOS - CentOS-CR # Replaced with CentOS-cr tags: repo