Skip to content

AT0-001 CompTIA AutoOps+ Practice Questions

Prepare for AT0-001 with more than an answer.

150 questions in the full set20 sample questionsUpdated Jul 3, 2026
Time limit
60 minutes
Questions on the exam
Maximum of 60
Passing score
600 (scale 100-900)
Level
Expansion Series (augments core IT certifications)
Domains covered on the exam 4
  1. Automation Coding Concepts31%
  2. System Configuration25%
  3. Continuous Integration24%
  4. Continuous Delivery20%
  1. 1

    A syntax error prevents an automation script from executing at all, whereas a runtime error occurs while the script is already running and encounters an unexpected condition.

    Show answer details

    Correct answer: A

    True. Syntax errors are parsing errors where the code violates the rules of the programming language, preventing it from starting. Runtime errors occur during execution when structurally correct code attempts an impossible operation (like dividing by zero or accessing an unreachable endpoint).

  2. 2

    A cloud operations team manages AWS infrastructure using Terraform. A junior administrator received an urgent request to increase the storage capacity of a production RDS database. Instead of updating the Terraform code, the administrator manually logged into the AWS Management Console and increased the storage from 100GB to 200GB.

    The next day, a senior engineer runs terraform plan as part of a routine deployment for a completely unrelated networking change.

    What will Terraform's output indicate, and what is the best practice to resolve this situation without causing downtime to the database?

    Show answer details

    Correct answer: D

    This is a classic example of configuration drift. Terraform compares the actual cloud resources with the local state and configuration. Because the config still says 100GB, Terraform will attempt to revert the change to match the declarative code. To resolve this without destroying or downsizing the DB, the engineer must update the Terraform code to match the new reality (200GB) so that the desired state aligns with the actual state.

    stateDiagram-v2 State1: Code (100GB) State2: AWS Console (200GB) State3: Drift Detected! State4: Code Updated (200GB) State5: Infrastructure Synced State1 --> State2: Manual Change State2 --> State3: terraform plan State3 --> State4: Engineer Fixes Code State4 --> State5: terraform apply

  3. 3

    Which of the following is the PRIMARY purpose of using state management files in configuration management tools like Terraform?

    Show answer details

    Correct answer: C

    State files (like terraform.tfstate) act as a database mapping the real-world provisioned resources (via their provider IDs) to the resources declared in the configuration files. This mapping is crucial for the tool to know what to update, delete, or leave alone during subsequent runs.

  4. 4

    When an IT environment's actual configuration deviates from the baseline configuration defined in the organization's automation code, this phenomenon is known as:

    Show answer details

    Correct answer: D

    Configuration drift occurs when ad-hoc changes (such as manual hotfixes or manual console edits) cause the actual state of systems to diverge from the desired state codified in configuration management tools.

  5. 5

    An engineer is evaluating automation tools. Tool A requires the engineer to write a script detailing the exact step-by-step commands to install Apache, configure the firewall, and start the service. Tool B allows the engineer to simply state 'Apache must be installed and running' and handles the execution logic internally.

    Which automation approach models do Tool A and Tool B represent, respectively?

    Show answer details

    Correct answer: D

    Imperative automation (Tool A) focuses on 'how' to achieve a result, requiring explicit step-by-step commands (like Bash scripts). Declarative automation (Tool B) focuses on 'what' the desired state is (like Terraform or Kubernetes manifests), leaving the underlying tool to figure out how to achieve that state.

  6. 6

    A systems engineer is writing a Python script to automate the cleanup of temporary files across several Linux servers. The engineer defines a variable max_age_days = 30 at the very beginning of the script, outside of any functions. Inside a function named clean_temp_files(), the engineer attempts to reassign max_age_days = 15 without any additional keywords. What is the result of this action in Python?

    Show answer details

    Correct answer: A

    In Python, assigning a value to a variable inside a function creates a new local variable by default. To modify the global variable, the engineer would need to explicitly declare global max_age_days inside the function before assignment.

  7. 7

    When writing a Bash script to iterate over a list of server IP addresses stored in a text file, which loop construct is most appropriate for reading the file line by line? Select the correct keyword to fill in the blank.

    _____ line in $(cat servers.txt); do
    ping -c 1 $line
    done

    Show answer details

    Correct answer: C

    The for loop is used in Bash to iterate over a sequence of items, such as the output of a command substitution like $(cat servers.txt). A while read loop is another valid approach, but the syntax provided specifically matches the for loop structure.

  8. 8

    An automation engineer is refactoring a monolithic PowerShell script into modular functions. The engineer wants to ensure that a custom function accepts parameters explicitly by name and enforces data typing. Which TWO of the following approaches can be used to define parameters for a PowerShell function? (Select TWO)

    Show answer details

    Correct answer: A, D

    PowerShell also allows defining parameters in parentheses immediately after the function name, similar to languages like C# or Python (e.g., function My-Func($param1) { }).

    In PowerShell, you can define parameters using the Param() block directly inside the function's curly braces. This is a best practice for advanced functions.

  9. 9

    A DevOps team uses a Python automation script to restart critical production services via a third-party REST API. During automated testing in the CI pipeline, the team wants to ensure the script's logic is tested without actually sending HTTP requests to the live production API. Which of the following is the BEST approach to achieve this?

    Show answer details

    Correct answer: A

    Mocking is the standard practice for testing code that interacts with external systems. By using a library like unittest.mock (specifically @patch), the team can simulate the API's responses (success, timeout, error codes) without making actual network calls, ensuring the script's logic is fully tested safely.

  10. 10

    A junior administrator has finished editing a Terraform configuration file locally and wants to save this snapshot of the work to their local Git repository history. However, they are not yet ready to share this code with the rest of the team. Which Git command accomplishes this?

    Show answer details

    Correct answer: B

    The git commit command saves a snapshot of the staged changes to the local repository history. Because git push is not used, the changes remain local and are not shared with the remote repository.

Create an account to continue.