Skip to content

Ansible Simple IT Automation Engine Quick Start #

Find similar titles

5회 업데이트 됨.

Edit
  • 최초 작성자
    Sardor
  • 최근 업데이트
    JehongLee

Structured data

Category
Management

Introduction #

Software deployment is always complex due to different OS existence and dependencies. Ansible is simple IT automation system, configuration management and provisioning tool. Let's assume that you have just deployed your application to server. And, you have quiet big infrastructure with many WAS, DB and load balancer nodes. And if you are responsible for managing servers you could handle all these server management tasks easily with this tool without manual SSH access to server and do all by hand. All you need is Ansible.

Why Ansible? #

Why we need to use configuration management tool at all?

Installation #

Installation is simple on OSX. If you are using Homebrew you can install it:

$ brew update
$ brew install ansible

Inventory file #

Inventory file must contain list of hostnames and IP addresses on each line. For example:

10.0.1.1 mongo_node_111.intranet.insilicogen.com
10.0.1.2 mongo_node_112.intranet.insilicogen.com
10.0.1.3 mongo_node_113.intranet.insilicogen.com
10.0.1.4 mongo_node_114.intranet.insilicogen.com
10.0.1.254 firewall_node_0.intranet.insilicogen.com
10.0.1.88 lb_master.intranet.insilicogen.com

By default, Ansible looks for an inventory file at /etc/ansible/hosts.

Connection #

Let’s verify we have everything setup correctly and we can connect to our host(s).

$ ansible all --inventory-file=insilicogen.hosts --module-name ping -u root

Modules #

There is a large catalog of modules available for Ansible out of the box. Here are just a very small sample of some things that can be managed with Ansible modules:

  1. users
  2. groups
  3. packages
  4. ACLs
  5. files
  6. apache modules
  7. firewall rules
  8. ruby gems
  9. git repositories
  10. mysql and postgresql databases
  11. docker images
  12. AWS / Rackspace / Digital Ocean instances
  13. Campfire or Slack notifications

and a whole lot more.

Playbooks #

Playbooks allow you to organize your configuration and management tasks in simple, human-readable files. Each playbook contains a list of tasks (‘plays’ in Ansible parlance) and are defined in a YAML file.

0.0.1_20230725_7_v68