Skip to content
$ lynuxpro

INTERVIEW PREP

Interview questions

570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.

Showing 331–345 of 570 questions

331.How would you speed up a slow playbook?SeniorAnsible

Raise forks, turn on SSH pipelining and connection reuse, cache or skip facts, use the free strategy where safe, run long jobs async, and measure with profile_tasks.

332.How do you test a role?SeniorAnsible

With Molecule: start a disposable container, converge the role, run it again to check idempotence, run verify checks, and destroy the container. Run it in CI on every change.

333.How do you run Ansible safely in CI/CD?SeniorAnsible

Lint and dry-run (--check --diff) on merge requests, deploy from the main branch with a manual gate, keep SSH keys and the vault password in protected variables, and pin versions.

334.What is a collection, and why pin versions?SeniorAnsible

A package of modules, roles and plugins named namespace.collection. Pinning versions in requirements.yml keeps runs the same and stops upstream updates from changing behaviour.

335.When would you write a custom module?SeniorAnsible

Only when no existing module or collection can do the job, such as for an internal API. It must be idempotent, support check mode, return correct JSON and be documented.

336.What does AWX or Ansible Automation Platform add?SeniorAnsible

A web page and API with role-based access, stored credentials, job templates, workflows with approvals, schedules, notifications and an audit trail. Jobs run in execution environments, which are container images with a fixed Ansible and libraries.

337.What are the limits of --check mode?SeniorAnsible

Modules that support it report what they would change, but command, shell and some other tasks are skipped because Ansible cannot predict them. Later tasks that depend on skipped results can also look wrong. Treat a dry run as a good preview, not a guarantee.

338.What do run_once, delegate_to and throttle do?SeniorAnsible

run_once runs a task on only one server of the group, for example a database migration. delegate_to runs a task on a different machine, for example to take a server out of a load balancer. throttle limits how many servers run that one task at the same time.

339.What is the difference between a Region and an Availability Zone?BeginnerAWS

A Region is a geographic area, such as eu-west-1. It has several Availability Zones, which are separate data centers a short distance apart with their own power and network. Spreading across zones keeps your app up if one zone fails.

340.What is the shared responsibility model?BeginnerAWS

AWS secures the cloud itself: buildings, hardware and the base services. You secure what you put in it: your data, access rules, operating system settings and network rules.

341.Why should you not use the root user for daily work?BeginnerAWS

It can do everything and cannot be limited. Protect it with MFA, lock away its keys, and use an IAM Identity Center or IAM user with limited rights every day.

342.What is an IAM role and when do you use it?BeginnerAWS

A role is a set of permissions that something can take on for a short time, without a password or long-term key. Use roles for EC2, Lambda and containers, and for people through SSO.

343.How do S3 storage classes differ?BeginnerAWS

Standard is for frequent access. Infrequent Access is cheaper to store but charges to read. Glacier classes are very cheap for archives but take minutes to hours to get data back. Intelligent-Tiering moves objects for you.

344.What is the difference between a security group and a NACL?MidAWS

A security group belongs to an instance, is stateful and only has allow rules. A NACL belongs to a subnet, is stateless, and has numbered allow and deny rules. Most control is done with security groups.

345.How does a private subnet reach the internet?MidAWS

Through a NAT gateway in a public subnet. The private route table sends 0.0.0.0/0 to the NAT gateway, which sends it on through the internet gateway. Nothing from outside can start a connection in.