Cisco CCNP Automation AUTOCOR (350-901) · Domain 2 · 30% of exam

Infrastructure as Code

Drill 20 practice questions focused entirely on Infrastructure as Code for the Cisco 350-901 exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.

Verified answer20 questions
Question 1 of 20

You are building a Cisco Modeling Labs (CML) topology that a GitLab CI pipeline will start via the CML REST API before running automation tests. The tests require each router node to boot with a known baseline configuration (hostname, management IP, and NETCONF/RESTCONF enabled) so the pipeline can reach devices without an interactive console step. What is the correct way to ensure each node comes up with this baseline already applied when the lab is started programmatically?

Reviewed for accuracy · Report an issue
Question 2 of 20

Your team runs a GitLab CE CI/CD pipeline that deploys network automation code. Before pushing configurations to production devices, you want a pipeline stage that spins up a Cisco Modeling Labs (CML) topology, applies the candidate configuration, and runs validation tests against the simulated devices. The GitLab runner is a Docker executor with no direct access to physical lab gear. Which approach correctly integrates CML into the pipeline test stage?

Reviewed for accuracy · Report an issue
Question 3 of 20

You inherit the following docker-compose.yml for a network automation stack: services: nautobot: image: networktocode/nautobot:latest depends_on: - db - redis volumes: - nautobot_media:/opt/nautobot/media networks: - backend ports: - "8080:8080" db: image: postgres:13 volumes: - db_data:/var/lib/postgresql/data networks: - backend redis: image: redis:6 networks: - backend networks: backend: volumes: nautobot_media: db_data: The nautobot container starts but immediately errors with a database connection refused, even though the db container is running. Which statement correctly explains the behavior of this file?

Reviewed for accuracy · Report an issue
Question 4 of 20

A network automation team runs a Docker Compose stack for their CI validation environment. The stack defines a 'postgres' service and a 'nautobot' service, where 'nautobot' has `depends_on: [postgres]`. Engineers report that 'nautobot' intermittently crashes on startup with database connection errors, even though 'postgres' is listed as a dependency. Reviewing the Compose file, they see 'postgres' has no `healthcheck` defined. Which change to the Compose file will most reliably prevent 'nautobot' from starting before the database is ready to accept connections?

Reviewed for accuracy · Report an issue
Question 5 of 20

Your team's network automation stack is defined in a docker-compose.yml. The 'automation' service must reach the 'nautobot' service by hostname for source-of-truth lookups. A colleague wrote the file below, but 'automation' cannot resolve the hostname 'nautobot': services: nautobot: image: networktocode/nautobot:latest networks: - sot-net automation: image: registry.local/automation:1.4 networks: - ci-net links: - nautobot networks: sot-net: ci-net: Why does name resolution fail, and what is the correct fix?

Reviewed for accuracy · Report an issue
Question 6 of 20

Your team runs a self-hosted Nautobot source-of-truth stack using Docker Compose. After running 'docker compose down' and 'docker compose up' to apply an updated image tag, the network engineers report that all previously entered device inventory data is gone. Reviewing the compose file, you see the postgres service defined as: db: image: postgres:14 environment: POSTGRES_DB: nautobot tmpfs: - /var/lib/postgresql/data Which change to the Compose file will ensure the inventory data survives container recreation?

Reviewed for accuracy · Report an issue
Question 7 of 20

A network automation team maintains a long-lived 'release' branch and an active 'develop' branch. During testing on 'develop', an engineer commits a critical fix (commit a1b2c3d) that corrects a Jinja2 template rendering bug affecting production. The 'develop' branch also contains many unfinished features that must NOT be released yet. The team needs the fix deployed from the 'release' branch immediately, without merging any other 'develop' changes. Which Git operation accomplishes this?

Reviewed for accuracy · Report an issue
Question 8 of 20

A network automation engineer checks out a specific commit hash to test an experimental Jinja2 template change: 'git checkout a1b2c3d'. Git warns they are in a 'detached HEAD' state. The engineer makes two commits with the fixed template and validates the config generation successfully. Before returning to work, they run 'git checkout main'. The next day they realize the two commits are gone from the log and want to preserve that work properly. What is the correct sequence to recover and preserve the commits?

Reviewed for accuracy · Report an issue
Question 9 of 20

Two engineers work on the same network automation repo. Engineer A commits a change to inventory/hosts.yaml on the feature branch adding a new leaf switch under the 'access' group. Engineer B, on main, edited the same 'access' group block to change the SNMP community. When you run 'git merge main' into the feature branch, Git reports a conflict in inventory/hosts.yaml. Opening the file you see conflict markers surrounding the 'access' group with both sets of changes. What is the correct way to complete the merge so both changes are preserved?

Reviewed for accuracy · Report an issue
Question 10 of 20

Your team follows a trunk-based workflow where the shared `main` branch is protected and continuously deployed by a GitLab CE pipeline. A merge commit that introduced a broken BGP template was already merged to `main` and deployed to production two hours ago. Several teammates have already pulled the latest `main` and started new work on top of it. You need to undo the effect of the broken merge on `main` while keeping the branch history intact and not disrupting your teammates' local clones. Which Git operation should you use?

Reviewed for accuracy · Report an issue
Question 11 of 20

Your GitLab CE pipeline has three stages: 'render', 'validate', and 'deploy'. In the 'render' stage, a job runs a Jinja2 script that produces device configuration files under ./build/configs/. The 'validate' and 'deploy' jobs in later stages fail because ./build/configs/ is empty when they run — each job starts with a clean checkout of the repository. What is the correct way to make the rendered files available to the downstream jobs?

Reviewed for accuracy · Report an issue
Question 12 of 20

A network automation team runs a GitLab CE pipeline whose 'lint' job intermittently fails with 'nornir: command not found', while the same command succeeds when run locally. The .gitlab-ci.yml declares a global 'before_script' that installs dependencies with 'pip install -r requirements.txt', and the job also defines its own job-level 'before_script' that only runs 'python --version'. What is the most likely cause of the failure?

Reviewed for accuracy · Report an issue
Question 13 of 20

Your team's GitLab CE pipeline installs Python dependencies with pip in a virtual environment during a 'setup' job, but each subsequent job (lint, test, deploy) re-downloads and reinstalls every package from scratch, adding several minutes per run. The dependencies rarely change between commits. You want to speed up the pipeline by reusing the installed packages across jobs and across pipeline runs, without treating them as build outputs to be published or downloaded by later stages. Which GitLab CI/CD configuration should you add?

Reviewed for accuracy · Report an issue
Question 14 of 20

Your team's GitLab CE pipeline builds a Nautobot-driven network automation solution. The 'simulate' stage successfully starts a CML topology and prints the management IPs of two IOS-XE nodes. The next 'deploy' stage runs a Python script that pushes VLAN config over RESTCONF, but every device fails with a connection timeout. The 'simulate' and 'deploy' jobs run on the same GitLab runner but are separate jobs. The CML lab confirms the nodes are reachable from the CML host. What is the MOST likely cause of the deploy-stage failure?

Reviewed for accuracy · Report an issue
Question 15 of 20

Your team's GitLab CE pipeline has a 'simulate' stage that starts a CML topology via the CML REST API, runs pyATS validation, and then must destroy the lab to free the limited node licenses on the shared CML server. Recently, when the pyATS tests fail, the pipeline stops immediately and the CML lab is left running — exhausting node licenses and blocking later pipeline runs. You need to guarantee the lab is stopped and wiped whether tests pass or fail. Which change to the job definition best accomplishes this?

Reviewed for accuracy · Report an issue
Question 16 of 20

Your team maintains a GitLab CE pipeline that builds a CML topology from a YAML definition, boots the lab via the CML REST API, and then runs pyATS tests against the simulated nodes. The pipeline recently began failing at the 'lab-start' stage with the error: 'node definition iosxe-17.03 not found on controller'. The topology YAML was authored months ago and worked previously. The CML server was upgraded last week by the platform team. What is the MOST likely root cause and appropriate fix?

Reviewed for accuracy · Report an issue
Question 17 of 20

Your team maintains a network automation pipeline that spins up a CML topology from a versioned topology.yaml file during the 'test' stage. After a colleague edited the topology file, the pipeline's CML import job fails with an error indicating the referenced node type cannot be resolved on the CML server. The topology previously imported successfully. Inspecting the diff, you notice the 'node_definition' field for a router node was changed from 'iosv' to 'csr1000v'. What is the MOST likely cause of the failure?

Reviewed for accuracy · Report an issue
Question 18 of 20

Your team's GitLab CE pipeline builds a container image for a network automation tool in a job that runs on a Docker-based runner. The job's script calls 'docker build -t automation:latest .', but the job fails with 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?'. Which change to the .gitlab-ci.yml job will correctly enable the image build?

Reviewed for accuracy · Report an issue
Question 19 of 20

Your team stores a device API token in a GitLab CE project CI/CD variable named DEVICE_TOKEN, marked as both 'Masked' and 'Protected'. The deploy job runs correctly on the protected 'main' branch but fails on a feature branch merge request pipeline with an authentication error because DEVICE_TOKEN is empty. The token value itself is a valid 40-character alphanumeric string. What is the most likely cause?

Reviewed for accuracy · Report an issue
Question 20 of 20

Your team's GitLab CE pipeline has four stages executed sequentially: 'lint', 'render', 'simulate', and 'deploy'. The 'render' job (which uses Jinja2 to build device configs) depends only on the 'lint' job's success, but the 'simulate' job that spins up CML must wait for 'render'. Currently, a slow 'ansible-lint' job in the 'lint' stage blocks a completely independent 'yamllint' job, and the whole pipeline is too slow. You want 'render' to start as soon as its specific upstream job finishes rather than waiting for the entire 'lint' stage. Which GitLab CI keyword should you add to build a directed acyclic graph (DAG) and speed up execution?

Reviewed for accuracy · Report an issue

More 350-901 practice

Keep going with the other Cisco CCNP Automation AUTOCOR (350-901) domains, or take a full timed mock exam.

← Back to 350-901 overview