Contents

Day 17: Ansible - Installation and configuration

Content

Part 1: Introduction to DevOps

Part 2: Version Control Systems

Part 3: Continuous Integration and Continuous Deployment (CI/CD)

Part 4: Configuration Management

Part 5: Infrastructure as Code

  • Day 21: Introduction to Infrastructure as Code (IaC)
  • Day 22: Terraform - Installation and configuration
  • Day 23: Terraform - Writing and applying configuration files
  • Day 24: Terraform - Modules and best practices
  • Day 25: CloudFormation (AWS) - Overview and comparison

Part 6: Containerization

  • Day 26: Introduction to containerization
  • Day 27: Docker - Installation and configuration
  • Day 28: Docker - Building and managing images
  • Day 29: Docker - Running and managing containers
  • Day 30: Docker Compose and best practices

Part 7: Container Orchestration

  • Day 31: Introduction to container orchestration
  • Day 32: Kubernetes - Architecture and components
  • Day 33: Kubernetes - Deployments, services, and storage
  • Day 34: Kubernetes - ConfigMaps and secrets
  • Day 35: Kubernetes - Best practices and Helm

Part 8: Monitoring and Logging

  • Day 36: Introduction to monitoring and logging
  • Day 37: Prometheus - Installation and configuration
  • Day 38: Prometheus - Querying and alerting
  • Day 39: Grafana - Installation and configuration
  • Day 40: ELK Stack (Elasticsearch, Logstash, Kibana) - Overview and comparison

Part 9: Cloud Platforms

  • Day 41: Introduction to cloud platforms
  • Day 42: AWS - EC2, S3, and RDS
  • Day 43: AWS - IAM, VPC, and ELB
  • Day 44: Azure - Virtual Machines, Storage, and SQL Database
  • Day 45: Google Cloud Platform - Compute Engine, Storage, and Cloud SQL

Part 10: DevOps Security

  • Day 46: Introduction to DevOps security
  • Day 47: Security best practices for CI/CD pipelines
  • Day 48: Infrastructure and application security
  • Day 49: Container and Kubernetes security
  • Day 50: Cloud security and compliance

Ansible can only be installed in Linux system. Although we can connect Windows machine in Ansible inventory.

Update System

Debian-Based System (Ubuntu, Debian)

sudo apt-get update
sudo apt-get-upgrade

RHEL-Based system (CentOS, RGEL, Fedora)"

If you are using RHEL-Based system then the command will be

sudo yum update

Install Python

Debian-Based System (Ubuntu, Debian)

sudo apt-get install python3

RHEL-Based system (CentOS, RGEL, Fedora)"

If you are using RHEL-Based system then the command will be

sudo yum install python3

Install Ansible

Debian-Based System (Ubuntu, Debian)

sudo apt-get install ansible

RHEL-Based system (CentOS, RGEL, Fedora)"

If you are using RHEL-Based system then the command will be

sudo yum install ansible

Verify the version

ansible --version

Configure Ansible

Generally we will be modifying /etc/ansible/ansible.cfg file change/update any Ansible configuration. We can also add inventory file in /etc/ansible location. To start with we can add a file name hosts in the /etc/ansible folder. Content of the file may look something like this:

[webserver]
192.168.1.0
196.168.1.11

And then update the /etc/ansible/ansible.cfg file:

inventory = /etc/ansible/hosts

Now ansible is installed and ready to use.