CentOS 6.7 Installation Configuration Ansible

Source: Internet
Author: User

1. Prepare for the CentOS environment

Yum Yum Upgrade

2. Control server and managed server requirements

Master:python 2.6+

Slave:python 2.4+, preferably also 2.6+ (CentOS 6.7 comes with)

3, configure SSH automatic login

Configure Master to login to each slave ssh without password (use Ssh-keygen on master to generate key pair and add id_rsa.pub to Authorized_keys of each slave)

4. Install ansible with Yum

Yum Install ansible

5. Configure Host

By default in/etc/ansible/hosts, add the slave IP address, for example

[Web] 192.168. 1.101 192.168. 1.102 192.168. 1.103

6. Testing

Ping

Successful ping with back display

192.168.1.101 | Success >> {    "changed": false,    "ping": "Pong"}192.168.1.102 | success >> {    "changed": false,< c12/> "ping": "Pong"}192.168.1.103 | Success >> {    "changed": false,    "ping": "Pong"}

Basic View command:

' Uptime '  'free-m'

CentOS 6.7 Installation Configuration Ansible

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.