InterviewStack.io LogoInterviewStack.io

Automation and Scripting Questions

Covers practical and architectural skills for writing production safe automation and operational scripts as well as building reusable automation systems. Topics include designing idempotent automation, safe retries, robust error handling, structured logging and observability, argument parsing and command line interface design, configuration management, and secure credential handling. Emphasis on testing and validation of scripts and automation code, packaging, documentation, deployment, and maintainability so automation can be operated by other team members. Includes integration with schedulers such as cron and systemd timers, continuous integration and continuous delivery pipelines, orchestration and configuration management systems, and common operational patterns such as log processing, backups, polling, multi step orchestration, provisioning, configuration changes, and routine maintenance. Also assesses language selection and trade offs among Python, Go, Bash and other tooling, concurrency and performance considerations, and at senior levels the design and architecture of reusable automation frameworks and strategies for scaling automation to reduce toil.

MediumTechnical
92 practiced
Design a polling system in Python to poll 1,000 endpoints every 10 seconds while respecting per-host rate limits and avoiding resource exhaustion. Discuss whether to use asyncio or threads, how to implement per-host token buckets, backpressure when downstream processors are slow, error handling for slow/unresponsive hosts, and how you'd test and monitor the system.
EasyTechnical
69 practiced
As a DevOps Engineer, explain what idempotent automation means for operational scripts and small automation tools. Describe at least three concrete patterns to make scripts idempotent (for example, check-and-create, use-state-markers, and transaction-style updates). For two real operations — package installation and user account creation — give short pseudo-code examples and list common pitfalls that break idempotency (race conditions, partial failures, destructive cleanup).
MediumTechnical
70 practiced
Write a small Python 3 script outline (you may provide key functions and pseudo-code rather than a full program) that atomically deploys a rendered configuration file to `/etc/myapp/config.yaml`. Requirements: 1) read a Jinja2 template at `/srv/templates/myapp.conf.j2`, 2) render with JSON config from `/etc/myapp/config.json`, 3) write the file atomically (safe replace), 4) create a timestamped backup only when content changes, 5) log actions with structured JSON. Describe how you'd make the script idempotent and safe across parallel runs.
MediumSystem Design
87 practiced
Compare using template-driven configuration (Jinja2 + config files) vs a declarative configuration management tool (e.g., Ansible) for preventing configuration drift across 500 servers. Provide a migration plan from ad-hoc scripts to a declarative approach that includes testing, gradual rollout, and rollback options.
EasyTechnical
90 practiced
Explain the differences between logs, metrics, and traces and give concrete examples of what each should capture for a daily backup automation job. For each type, suggest retention strategies and discuss cost versus value trade-offs when instrumenting high-frequency automation.

Unlock Full Question Bank

Get access to hundreds of Automation and Scripting interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.