Interview Prep/Ansible/Security: Vault, Become and Compliance

Compliance requires that all package installs come from an internal mirror.

IntermediateScenarioSecurity: Vault, Become and Compliance
Answer

Situation read → Controlled supply chain.

What I'd do → Manage repo files with Ansible, remove others, and verify GPG.

- ansible.builtin.yum_repository:
    name: internal-base
    description: Internal base
    baseurl: https://mirror.example.com/rhel9/baseos/
    gpgcheck: true
    gpgkey: https://mirror.example.com/RPM-GPG-KEY-internal
- ansible.builtin.file: { path: /etc/yum.repos.d/rocky.repo, state: absent }

Why → Ansible enforces the repo list on every run, so drift is corrected.

Interview tip → Add a firewall rule blocking outbound internet to back it up.

All Ansible questions Roadmap: Ansible

More on Security: Vault, Become and Compliance