Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction of Ansible tools in CentOS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

About Ansible

Ansible is a new automated operation and maintenance tool. It is based on Python development and integrates the advantages of many operation and maintenance tools (puppet, chef, func, fabric) to realize batch system configuration, batch program deployment, batch command execution and other functions.

Ansible was developed based on paramiko and is based on modular work, with no volume deployment capability of its own. What really has mass deployment is the modules ansible runs, ansible just provides a framework. Ansible does not require client/agents to be installed on remote hosts because they are based on ssh to communicate with remote hosts. Ansible has been officially acquired by Red Hat. It is the most recognized automation operation and maintenance tool, and it is easy to learn and learn. It is one of the skills that every operations engineer must master.

functional properties

1. Deployment is simple, just deploy Ansible environment on the master side, and the controlled side does not need to do anything.

2. By default, SSH is used to manage devices.

3. There are a large number of routine operation and maintenance modules, which can realize most daily operations.

4. Simple configuration, powerful function and strong expandability;

5. API and custom modules are supported and can be easily extended via Python.

6. Customize powerful configuration and status management through Playbooks.

7. Lightweight, no need to install agent on the client, update, only need to update once on the operating machine.

8. AWX platform provides a powerful and operational Web management interface and REST API interface.

9. Support non-root user management operations, support sudo.

Comparison of Operation Tools

Advantages and disadvantages of operation and maintenance tools

Deployment Process 1. Installation

yum install -y epel-release //install epel source

yum install ansible -y

ansible --version //View ansible version

2. Configure Host List

vim /etc/ansible/hosts

[web] #Custom group name 192.168.200.129 #Add IP of managed host [abc] 192.168.200.1303. Set SSH passwordless login

ssh-keygen -t rsa

4. Configure key pair verification

ssh-copy-id root@192.168.0.100

ssh-copy-id root@192.168.0.115

5. Interaction-free proxy

ssh-agent bash

ssh-add

6. verification

ansible web -m command -a 'date'

ansible abc -m command -a 'date'

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report