XK0-006 practice question on Automation and IaC, 2026-11-13
Archived question for 2026-11-13. Domain: Automation, Orchestration, and Scripting. Objective 4.1: Automation and IaC. Original SecLern question, written for practice.
A pipeline file has these jobs. ``` stages: - build - test - deploy deploy-job: stage: deploy script: - ./deploy.sh test-job: stage: test script: - make test build-job: stage: build script: - make ``` In which order do the jobs run, and what happens when test-job fails?
Show the explanation
The stages list sets the order, and a failed stage stops the later stages by default.
Each option
- A (correct). Correct: The stages list sets the order, and a failed stage stops the later stages by default.
- B. The order of job definitions does not decide execution. It would be right for no pipeline rule.
- C. Jobs in different stages run in stage order. It would be right for jobs in one stage.
- D. A failed job stops later stages by default. It would be right only with allow_failure set.
What this question tests
It maps to XK0-006 objective 4.1, Automation and IaC: Automation and infrastructure as code Related ideas: ci cd, stages.
The published topics under this objective, so you can check what you have covered:
- Ansible playbooks
- Puppet manifests
- CI/CD and GitOps
More from the archive
- 2026-11-09: An administrator must allow ssh in the public zone only from 192.0.2.0/24 using a firewalld rich rule. Which rule text does this?
- 2026-11-10: An administrator searches the audit log for changes to the account database. ``` $ sudo ausearch -k identity-file -ts today ---- time->Wed Nov 12 10:22:14 2026 type=SYSCALL msg=audit(1794565334.211:512): arch=c000003e syscall=257 success=yes exit=3 ppid=2301 pid=2330 auid=1001 uid=0 gid=0 euid=0 comm="vipw" exe="/usr/sbin/vipw" key="identity-file" ``` Which field identifies the login user who ran the command through sudo?
- 2026-11-11: A rule that blocks ssh works for IPv4 but a client still connects over IPv6. ``` $ sudo iptables -S INPUT -P INPUT ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j DROP $ sudo ip6tables -S INPUT -P INPUT ACCEPT ``` Why does the IPv6 connection still work?
- 2026-11-12: Which command lists ufw rules with numbers so that one can be deleted by number?
- 2026-11-14: An administrator wants the audit system to record writes and attribute changes to /etc/passwd, tagged with the key identity-file, until the next reboot. Which command does this?
- 2026-11-15: Which command runs an nginx container in the background and publishes host port 8080 to container port 80?
- 2026-11-16: Which command should an administrator use to edit /etc/sudoers so that syntax is checked before the file is saved?
- 2026-11-17: An administrator will enable ufw on a server reached over ssh. Which order avoids losing the session?
Start a daily session
Several questions at a time, aimed at your gaps.