Ansible Assignment– 6

Ansible for CI/CD & Cloud

Basic Questions

  1. Write a Playbook to install Nginx on a managed node.
  2. Write a Playbook to deploy a static HTML page on Nginx.
  3. Write a Playbook to install MySQL on a managed node.
  4. Write a Playbook to create a database in MySQL.
  5. Write a Playbook to create a database user with a password.
  6. Write a Playbook to install Docker on a managed node.
  7. Write a Playbook to start a Docker container running Nginx.
  8. Write a Playbook to start a Docker container running MySQL.
  9. Write a Playbook to install Kubernetes tools (kubectl, kubeadm).
  10. Write a Playbook to create a Kubernetes pod running Nginx.
  11. Write a Playbook to launch an AWS EC2 instance.
  12. Write a Playbook to create an S3 bucket in AWS.
  13. Write a Playbook to create a VPC in AWS.
  14. Write a Playbook to create a security group in AWS.
  15. Write a Playbook to create an RDS MySQL instance in AWS.
  16. Write a Playbook that integrates with Jenkins using the ansible-playbook command.
  17. Write a Playbook that integrates with GitLab CI using .gitlab-ci.yml.
  18. Write a Playbook to update application code from a Git repository.
  19. Write a Playbook to restart Nginx service after deployment.
  20. Write a Playbook that deploys a simple app stack (Nginx + App + DB).

Intermediate Questions

  1. Write a Playbook that installs and configures Nginx as a reverse proxy for an app.
  2. Write a Playbook that deploys a Dockerized web application.
  3. Write a Playbook that deploys a multi-container application with Docker Compose.
  4. Write a Playbook that deploys an app to Kubernetes using a Deployment.
  5. Write a Playbook that deploys a Kubernetes Service for app access.
  6. Write a Playbook to automate AWS EC2 instance creation with tags.
  7. Write a Playbook to automate S3 bucket creation with versioning enabled.
  8. Write a Playbook to automate VPC creation with subnets.
  9. Write a Playbook to create an RDS database and store credentials in Vault.
  10. Integrate a Playbook with Jenkins pipeline for automated deployment.
  11. Integrate a Playbook with GitLab CI/CD pipeline for automated deployment.
  12. Write a Playbook to deploy a containerized application on a Kubernetes cluster.
  13. Write a Playbook that pulls the latest Docker image from a registry and runs it.
  14. Write a Playbook that configures security groups for web and DB servers in AWS.
  15. Write a Playbook that provisions infrastructure and deploys an application in one run.
  16. Write a Playbook that uses roles for deploying Nginx, App, and DB separately.
  17. Write a Playbook that rolls back to a previous Docker image if the new deployment fails.
  18. Write a Playbook to scale a Kubernetes deployment from 2 pods to 5 pods.
  19. Write a Playbook that provisions EC2, installs Nginx, and deploys a sample app automatically.
  20. Write a Playbook that provisions RDS, configures DB users, and connects the app to the database.

Advanced Questions

  1. Write a Playbook that provisions a complete AWS infrastructure: VPC → EC2 → Security Group → RDS → S3.
  2. Write a Playbook that deploys a Dockerized app to Kubernetes and configures Ingress.
  3. Write a Playbook that automates blue-green deployment for a web application.
  4. Write a Playbook that automates canary deployment for a Kubernetes app.
  5. Write a Playbook that integrates Ansible with Jenkins pipeline to deploy after each commit.
  6. Write a Playbook that integrates Ansible with GitLab CI/CD pipeline to deploy after merge.
  7. Write a Playbook that provisions multi-region AWS EC2 instances and deploys an app.
  8. Write a Playbook that provisions AWS infrastructure and deploys a high-availability DB cluster.
  9. Write a Playbook that deploys a 3-tier application (Frontend on Nginx, Backend App, Database on RDS).
  10. Write a full-stack deployment Playbook: Provision AWS infrastructure → Deploy Dockerized App → Configure Kubernetes → Expose via Nginx → Connect with RDS.