Question 440
A Linux administrator evaluates: A compliance deployment needs a repeatable service configuration that stays consistent after later reruns. Select TWO complementary answers: the most suitable corrective action AND the evidence proving it worked.
Explanation
Correct Answers
For the specific observation (A compliance deployment needs a repeatable service configuration that stays consistent after later reruns), the acceptance evidence is: A second Ansible run makes no unintended changes and reports the same desired service configuration on all intended hosts. This verifies the action (Use an Ansible inventory and declarative tasks or roles that converge hosts to approved state, with check mode and repeat-run validation.) rather than merely proving that an unrelated Linux tool works. It also addresses the known risk: Ad hoc scripts that repeatedly append configuration can create duplicate entries and uncontrolled drift across servers.
The observed Linux condition is: A compliance deployment needs a repeatable service configuration that stays consistent after later reruns. The recommended direct administrative response is: Use an Ansible inventory and declarative tasks or roles that converge hosts to approved state, with check mode and repeat-run validation. The relevant failure or security risk is: Ad hoc scripts that repeatedly append configuration can create duplicate entries and uncontrolled drift across servers. Validate success with: A second Ansible run makes no unintended changes and reports the same desired service configuration on all intended hosts.
Incorrect Answers
Safe loops and file names in Bash (4.2) would demonstrate or implement: A naïve for loop over command-substitution output can mis-handle filenames with spaces or newlines. This case instead tests Idempotent configuration with Ansible; the choice measures or changes another part of the system.
Safe Bash parameter expansion and quoting (4.2) addresses another technical failure: Unquoted paths with whitespace or empty variables can split arguments, select unintended files or target a dangerous default. The required paired action and test concerns Idempotent configuration with Ansible; a passing result for this alternative could leave that requirement unresolved.
Python JSON data extraction and structured error handling (4.3) would demonstrate or implement: The script returns correct values for normal, missing-key and invalid-JSON fixtures while logging actionable errors. The paired-answer requirement concerns Idempotent configuration with Ansible; this alternative does not provide the matching intervention and separate acceptance evidence.