linux - Disable repo which is matching the value via ansible ...
unix.stackexchange.com › questions › 637580Mar 04, 2021 · Show activity on this post. This is written incorrectly. we want to disable all repos except the rhel & epel one. - name: yum-clean-metadata command: yum clean metadata args: warn: no - name: Repos disabled if not rhel.repo debug: msg= { { lookup ('fileglob', '/etc/yum.repo.d/rhel.repo') }} yum: name: disablerepo: "ora,ol7_latest" - name: Ensure the yum package index is up to Date yum: update_cache: yes name: '*' state: latest.