Ansible Assignment– 6
Ansible for CI/CD & Cloud
Basic Questions
- Write a Playbook to install Nginx on a managed node.
- Write a Playbook to deploy a static HTML page on Nginx.
- Write a Playbook to install MySQL on a managed node.
- Write a Playbook to create a database in MySQL.
- Write a Playbook to create a database user with a password.
- Write a Playbook to install Docker on a managed node.
- Write a Playbook to start a Docker container running Nginx.
- Write a Playbook to start a Docker container running MySQL.
- Write a Playbook to install Kubernetes tools (kubectl, kubeadm).
- Write a Playbook to create a Kubernetes pod running Nginx.
- Write a Playbook to launch an AWS EC2 instance.
- Write a Playbook to create an S3 bucket in AWS.
- Write a Playbook to create a VPC in AWS.
- Write a Playbook to create a security group in AWS.
- Write a Playbook to create an RDS MySQL instance in AWS.
- Write a Playbook that integrates with Jenkins using the ansible-playbook command.
- Write a Playbook that integrates with GitLab CI using .gitlab-ci.yml.
- Write a Playbook to update application code from a Git repository.
- Write a Playbook to restart Nginx service after deployment.
- Write a Playbook that deploys a simple app stack (Nginx + App + DB).
Intermediate Questions
- Write a Playbook that installs and configures Nginx as a reverse proxy for an app.
- Write a Playbook that deploys a Dockerized web application.
- Write a Playbook that deploys a multi-container application with Docker Compose.
- Write a Playbook that deploys an app to Kubernetes using a Deployment.
- Write a Playbook that deploys a Kubernetes Service for app access.
- Write a Playbook to automate AWS EC2 instance creation with tags.
- Write a Playbook to automate S3 bucket creation with versioning enabled.
- Write a Playbook to automate VPC creation with subnets.
- Write a Playbook to create an RDS database and store credentials in Vault.
- Integrate a Playbook with Jenkins pipeline for automated deployment.
- Integrate a Playbook with GitLab CI/CD pipeline for automated deployment.
- Write a Playbook to deploy a containerized application on a Kubernetes cluster.
- Write a Playbook that pulls the latest Docker image from a registry and runs it.
- Write a Playbook that configures security groups for web and DB servers in AWS.
- Write a Playbook that provisions infrastructure and deploys an application in one run.
- Write a Playbook that uses roles for deploying Nginx, App, and DB separately.
- Write a Playbook that rolls back to a previous Docker image if the new deployment fails.
- Write a Playbook to scale a Kubernetes deployment from 2 pods to 5 pods.
- Write a Playbook that provisions EC2, installs Nginx, and deploys a sample app automatically.
- Write a Playbook that provisions RDS, configures DB users, and connects the app to the database.
Advanced Questions
- Write a Playbook that provisions a complete AWS infrastructure: VPC → EC2 → Security Group → RDS → S3.
- Write a Playbook that deploys a Dockerized app to Kubernetes and configures Ingress.
- Write a Playbook that automates blue-green deployment for a web application.
- Write a Playbook that automates canary deployment for a Kubernetes app.
- Write a Playbook that integrates Ansible with Jenkins pipeline to deploy after each commit.
- Write a Playbook that integrates Ansible with GitLab CI/CD pipeline to deploy after merge.
- Write a Playbook that provisions multi-region AWS EC2 instances and deploys an app.
- Write a Playbook that provisions AWS infrastructure and deploys a high-availability DB cluster.
- Write a Playbook that deploys a 3-tier application (Frontend on Nginx, Backend App, Database on RDS).
- Write a full-stack deployment Playbook: Provision AWS infrastructure → Deploy Dockerized App → Configure Kubernetes → Expose via Nginx → Connect with RDS.