Interview Prep/Ansible/AWX, Cloud and Large-Scale Operations

How would you use Ansible to patch Linux servers monthly?

AdvancedScenarioAWX, Cloud and Large-Scale Operations
Answer

Situation read → Patch management.

What I'd do →

- hosts: all
  serial: "20%"
  tasks:
    - ansible.builtin.dnf: { name: "*", state: latest, security: true }
      register: upd
    - ansible.builtin.reboot:
      when: upd is changed

Schedule in AWX, patch non-prod a week earlier, and skip hosts in maintenance.

Why → Rings and batches catch issues early.

Interview tip → needs-restarting -r decides if a reboot is really required.

All Ansible questions Roadmap: Ansible

More on AWX, Cloud and Large-Scale Operations