interview prep

117 questions from the essential path, shuffled · recall practice, not a test — nothing is scored

  1. 1 Order the five daily precedence levels, lowest to highest.

  2. 2 In an INI inventory, what does [myapp:children] mean — and how does YAML spell the same thing?

  3. 3 A tutorial writes “- copy:” with no dots. Roughly when was it written, and why does it still run?

  4. 4 Why does src: {{ config_file }} fail before Ansible even runs?

  5. 5 How does become fix the double hop without touching AD or the auth transport?

  6. 6 One colleague says the docs bless WSL as a control node; another says the docs ban it for production. Who is right?

  7. 7 What do web:&staging and web:!db each match?

  8. 8 Restart a service on twenty boxes once, versus keep a package installed on every box forever. Which is ad-hoc, which is playbook?

  9. 9 Why does ansible-lint care?

  10. 10 Why does current official guidance no longer point at ConfigureRemotingForAnsible.ps1?

  11. 11 Why is path: "C:\temp\new_build" broken, and what are the two fixes?

  12. 12 A playbook fails somewhere mid-run. Recite the diagnostic order — and where does -vvv sit in it?

  13. 13 A teammate says “it works in my venv but fails in AWX.” Where do you look first, and why?

  14. 14 Why is when: "{{ my_var }}" wrong while msg: "{{ my_var }}" is right?

  15. 15 Where do the SSH key and the vault password live, and what must never happen to them?

  16. 16 Your domain estate mixes Server 2019 and Server 2022. Which connection do you standardize on, and why?

  17. 17 You swap with_items for loop and a task that was fed a list of lists breaks. Why, and what is the fix?

  18. 18 Your command task ran fine, but its output appears nowhere in the run. Why, and what's the fix?

  19. 19 You re-run the play; the config file is unchanged. Does the handler fire? Why not?

  20. 20 Why does the deploy stage run ansible-galaxy install -r requirements.yml before the playbook?

  21. 21 You run an unchanged playbook a second time. What should the recap show, and what would changed=2 tell you?

  22. 22 A playbook that loads vaulted group_vars fails immediately with a decryption error. What is missing?

  23. 23 Your Linux role uses ansible.builtin.copy and ansible.builtin.service. What changes to target Windows?

  24. 24 Where does Ansible run, and what must be installed on a managed node?

  25. 25 Your playbook works, CI fails, a teammate sees a third behavior — all running the same Git commit. What dependency mistake produces this?

  26. 26 Name the two ways a Jenkins pipeline can run a playbook, and one reason to pick each.

  27. 27 Your playbook reports "changed" on every run even though nothing differs. Likely culprit?

  28. 28 One host of twenty fails a task mid-play, no error handling anywhere. What happens to that host, and to the other nineteen?

  29. 29 Why one inventory directory per environment instead of one big inventory holding prod and staging groups?

  30. 30 Why commit an ansible.cfg at the project root?

  31. 31 Where does a module run, and where does a plugin run?

  32. 32 Your config task reported changed, a later task failed, and now re-runs never restart the service. What happened?

  33. 33 A Windows Update task fails over WinRM, but the same install works fine when you RDP in. What is the Ansible-side fix?

  34. 34 You need to re-run only the certificate tasks of a 40-task playbook, on one host. Which flags?

  35. 35 A role you inherited uses with_items everywhere. Is that broken, deprecated, or something else — and what does ansible-lint say about it?

  36. 36 A .j2 file contains {{ lookup('file', 'banner.txt') }}. Which machine's banner.txt gets read, and why?

  37. 37 Which ansible-lint profile do real repos run in CI, and name three things it catches.

  38. 38 Consumers of your role should be able to override its port, but never its internal install path. Which file gets each value, and why?

  39. 39 You write country_code: no and nothing errors. What did you actually store?

  40. 40 A value differs between staging and production. Where does it live, and why not group_vars/all.yml?

  41. 41 A teammate wants CredSSP everywhere “because every column says Yes”. What is the official counterargument?

  42. 42 Where does a role's entry point live, and what else loads automatically when a play applies the role?

  43. 43 When does a value containing {{ }} NOT need quotes?

  44. 44 A playbook run failed on one host. How do you re-run it against just that host without editing anything?

  45. 45 A teammate adds a rule to skip_list with no comment. What happens in review, and why?

  46. 46 ignore_errors and failed_when both keep a run alive — when is each the right tool?

  47. 47 Lint hits a with_items in a role you inherited. Does the build break?

  48. 48 What happens to a module after its task finishes, and what does that mean for state?

  49. 49 A colleague says “the deploy runs from Tower.” What are they most likely actually running?

  50. 50 Why do command and shell tasks skip under --check, and what does that mean for trusting a clean dry run?

  51. 51 How often does the community package move, and how many of its majors stay maintained?

  52. 52 Can your Windows laptop be the control node?

  53. 53 What makes a machine a managed node, as far as Ansible is concerned?

  54. 54 requirements.yml and an EE both “pin versions.” What does each pin, and which pins more?

  55. 55 A value differs per environment; another is a user-tunable knob; a third is an internal constant no one should touch. Where does each live?

  56. 56 Same engine either way — so what does pip install ansible give you that pip install ansible-core doesn’t?

  57. 57 What is the difference between pip install ansible and pip install ansible-core?

  58. 58 A colleague says "the role is in that collection — install it." Untangle the two nouns.

  59. 59 Does this precedence chain decide which value a variable ends up with?

  60. 60 You add a fresh Windows host to inventory and run a ping. It fails with an SSH/port-22 error before you configured anything. Why?

  61. 61 Why one inventory directory per environment instead of one inventory with prod and staging groups?

  62. 62 Which collections ship win_chocolatey and the advanced firewall modules?

  63. 63 A colleague calls Ansible "a nicer way to run scripts". What is wrong with that?

  64. 64 What does runas do about UAC — which token does it ask for?

  65. 65 Your group_vars value isn’t the one showing up at runtime. What do you know so far, and where’s the full answer?

  66. 66 When would you reach for HashiCorp Vault instead of Ansible Vault?

  67. 67 Why does ansible.builtin.command report changed on every run, even when the host is untouched?

  68. 68 You create group_vars/web.yml. What do you have to add elsewhere so Ansible loads it?

  69. 69 A local admin account authenticates over WinRM but then hits access denied on everything, while RDP works fine. Which setup step was skipped?

  70. 70 What is the run-twice test, and what automates it in CI?

  71. 71 Name four things a job template bundles into one clickable object.

  72. 72 An NTP server address differs between staging and production. Where does it belong?

  73. 73 A repo has both collections/requirements.yml and roles/requirements.yml. Why does running only ansible-galaxy collection install -r leave you broken?

  74. 74 Name the three parts of "ansible web -m ansible.builtin.ping".

  75. 75 Name the RHCE exam code, its format, and why it only partially fits this job.

  76. 76 A domain playbook touching \\fileserver\installers fails with Access is denied though your account has full rights. Why, and name two fixes.

  77. 77 Facts and registered variables both survive between tasks. What separates them?

  78. 78 PSRP runs over WinRM anyway — so what does choosing psrp over winrm actually buy you?

  79. 79 A colleague quotes one version number, the docs quote a completely different one. Contradiction?

  80. 80 Why does register need to exist at all — what architectural fact makes it necessary?

  81. 81 Runs feel slow and every play opens with a long Gathering Facts step. Name two fixes.

  82. 82 Lesson 15 registered nginx -t as cfg_check. Write the condition that reloads nginx only on success, and say what the other hosts report.

  83. 83 An interviewer asks how you’d handle variable precedence. What level of answer are they after?

  84. 84 A teammate’s playbook fails with a module-not-found error on ansible.windows.win_service. What do you look for in the repo, and what do you run?

  85. 85 Coming from Terraform: where does Ansible keep its state file?

  86. 86 A colleague says "the role ships in that collection." What is the relationship between the two?

  87. 87 What does a passing ansible.windows.win_ping actually prove?

  88. 88 In lesson 31's auth matrix, which two rows say Yes under Delegation, and what does each cost?

  89. 89 You find a bare include: in an old repo. What happens on a modern control node, and what do you replace it with?

  90. 90 Where is key=value argument shorthand fine, and where does it date you?

  91. 91 Which of the five auth options work with AD domain accounts, and which one does the official guide recommend in a domain?

  92. 92 Day one in an unfamiliar repo: what four things do you read, in what order, and what does each tell you?

  93. 93 Playbook, play, task — how do the three nest, and what does each one do?

  94. 94 What are the three parts of an FQCN, in order?

  95. 95 A play templates ten nginx config files, each with notify: Restart nginx. How many restarts, and when?

  96. 96 What does win_dsc do, and why would a Windows team care?

  97. 97 Recite the pre-prod ritual in order, and what each step catches.

  98. 98 Map block/rescue/always to PowerShell, and name one failure rescue will not catch.

  99. 99 How current does the control node’s Python have to be?

  100. 100 Name the four places Ansible looks for its config, in order.

  101. 101 Why can Kerberos, NTLM and CredSSP run over HTTP port 5985 while Basic and Certificate demand HTTPS?

  102. 102 You want the free option for a homelab. Which product is it, what license, and how does it deploy?

  103. 103 app_port is unset for one group and their config renders with a blank port. Which filter fixes it, and what is its blind spot?

  104. 104 copy and template both put a file at dest. What does template do that copy never will, and where does it happen?

  105. 105 Your playbook writes a report to /tmp on localhost. Fine under ansible-playbook, but after a navigator run the file is gone. Why?

  106. 106 A play has gather_facts: false, and a task reads ansible_facts["os_family"]. What happens and why?

  107. 107 Your when: references a variable that may not exist. What happens without a guard, and what is the fix?

  108. 108 You just edited an inventory file. What one command do you run before trusting it, and why?

  109. 109 Your loop over dicts prints an unreadable wall of keys per item. Which keyword cleans that up?

  110. 110 A task uses lookup('file', 'deploy_key.pub'). Which machine's filesystem gets read?

  111. 111 Why is a vaulted secrets file safe to commit to Git?

  112. 112 A play has include_tasks: "{{ ansible_os_family }}.yml". Could you swap in import_tasks? Why or why not?

  113. 113 You guard a shell task with creates: /opt/app/.installed. What happens on the first run and the second?

  114. 114 Why is -e the wrong way to pass a database password, even though it works?

  115. 115 You registered a command result as cfg_check. Name the three fields you'd read first and what each tells you.

  116. 116 --list-tasks shows the tasks from one of your task files but not the other. What does that tell you?

  117. 117 What decides which actual machines "hosts: web" touches?