Automation
Ansible and Infrastructure as Code: the agentless model, idempotency, playbooks, roles, IaC.
Ansible
Agentless automation: ad hoc commands, idempotency, playbooks, roles.
Agentless push model, control node and managed nodes over SSH. Why you need it and what to install.
Inventory in ini and yaml, host groups, ad-hoc commands with -m, the ping/command/shell/copy modules.
Where ansible.cfg lives and the search order. host_key_checking, inventory, remote_user, become.
A managed node usually needs Python. The raw module, gather_facts: no, bootstrapping Python, and the script module.
changed vs ok, why command/shell aren't idempotent, creates/removes, changed_when, --check and --diff.
The structure of a YAML playbook: hosts, become, tasks, handlers, notify, vars, when, loop, Jinja2 templates, and block/rescue/always. Running ansible-playbook.
tasks/handlers/templates/files/vars/defaults/meta, autoloading main.yml, ansible-galaxy init, defaults vs vars.
Where to declare variables, what facts are (ansible_facts), register, set_fact, and how Ansible resolves conflicts by precedence.
Dry run with --check and --diff, narrowing with --limit, tags, and a gradual rolling update with serial. How to ship changes without taking down production.
Static inventory doesn't scale in the cloud. Inventory plugins (AWS, Yandex Cloud), grouping by tags, and collections from Galaxy.
Passwords and keys can't go into git in plaintext. ansible-vault encrypts whole files or single values, and in CI the password comes from a protected variable.
Ten questions: the agentless model, idempotency, ad-hoc commands, playbooks, roles, rolling updates, and dynamic inventory. You can retake it.
Infrastructure as Code
The idea behind IaC, Terraform, GitOps, modules, remote state.
Why servers and networks get described as code in git: declarativity, reproducibility, review, and drift.
Providers, resources, plan and apply, the state file. How Terraform brings the cloud in line with the description.
Pull deploys from git, an in-cluster agent, drift detection, and how GitOps differs from plain push-based CI.
How to reuse infrastructure: variables as input, outputs on the way out, and modules as functions for resources.
Why local state breaks teamwork, how to move it into a shared backend, and why locking matters.