Ansible can be automatically managed using the command line, and Ansible's command-line management tools are supported by a series of modules and parameters, and we can view the module's help information through the Ansible-doc tool. This post will detail the functions and operations of the Ansible module.ansible Command parameters:
-V: Output details (m
The previous study Saltstack installation and basic configuration, you can execute system commands through Saltstack, including system reboot, view system load, add/remove users, etc. can also be installed on the line Web,db,bbs and configuration of the same or similar servers into a group, through the Saltstack Group function batch execution management. The foll
I. Overview of Saltstack Architecture
Saltstack is based on the C/S architecture, Server master and client minions, which consists of the following parts:
Second, the installation configuration of Saltstack
1. master installation
The code is as follows
Copy Code
RPM-IVH http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-
Salt ' * ' saltutil.refresh_pillarThe official website example really did not understand, the English dish. In fact, a simple step.Reference documentsHttps://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mysql.htmlhttps://z900collector.wordpress.com/linux/using-the-saltstack-mysql-module/Salt-master is mainly looking for/usr/lib/python2.6/site-packages/salt/modules/test.py.[Email protected] salt]# cat/etc/salt/minionmaster:172.1.1.1Id:cm1M
Ansible through the way of the module to complete some remote management work. You can view all modules through ansible-doc-l, you can use Ansible-doc-s module to view the parameters of a module, or you can use Ansible-doc Help module to view more detailed information about the module. The default module location is/us
First, host planning
Create 4 virtual machines as a demo ansible environment, install the operating system as CentOS 7.4. 1 of them as management host, the other 3 as the managed host. IP and host name are: IP host name note 192.168.128.10 Ansible-manager Management host 192.168.128.11 Ansible-demo1 managed host 1 192.168.128.12
Ansible Problems
Developed based on paramiko. What is this paramiko? It is a python-Only SSH protocol library. Therefore, fabric and ansible do not need to install client/agents on a remote host because they communicate with remote hosts Based on SSH.
The inventory file is used to define the host to be managed. The default location is/etc/ansible/hosts.
Saltstack is a new basic setup management approach that is easy to deploy, works in minutes, scales well, and easily manages tens of thousands of servers, fast enough, and second-level communication between servers. By deploying the Saltstack environment, we can execute batch commands on thousands of servers, configure centralized management according to different business characteristics, distribute files,
recently studied Saltstack, first contact, found him good strong, how strong? Well, I've only touched the tip of the iceberg, but it's enough for me to drink a pot. Next, will explore the world of saltstack, can discover how many new continent, see own ability!
Saltstack Introduction:
Salt, a new infrastructure management approach that is easy to
This is a creation in
Article, where the information may have evolved or changed.
Containers are an increasingly popular development environment. As a developer, you can choose from a variety of tools to manage your containers. This article will introduce you to Ansible Container and show you how to run and test your application in a similar production environment.
Entry
This example uses a simple Flask Hello world program. This program is served by A
into the machine, with "ssh ‘-o StrictHostKeyChecking=no [emailprotected]‘",and check in:.ssh/authorized_keysto make sure we haven‘t added extra keys that you weren‘t expecting.??[[emailprotected] ~]# sshpass -p123456 ssh-copy-id -i /root/.ssh/id_dsa.pub "-o StrictHostKeyChecking=no [emailprotected]"Now try logging into the machine, with "ssh ‘-o StrictHostKeyChecking=no [emailprotected]‘",and check in:.ssh/authorized_keysto make sure we haven‘t added extra keys that you weren‘t expecting.??[[e
Ansible automated O M tool learning Manual
1. Introduction to ansibleCommon automated O M tools
Puppet-developed based on Ruby and adopts a C/S architecture. It is highly scalable and SSL-based, and remote command execution is relatively weak.SaltStack-developed based on Python and adopts the C/S architecture. It is more lightweight than puppet. The configuration syntax uses YMAL to make the configuration script simpler.
Ansible is an automated operations tools, based on the development of Python, the collection of many operations tools (puppet, Cfengine, Chef, func, fabric) The advantages of the implementation of batch system configuration, batch program deployment, batch Run command and other functions.Ansible is a module-based capability that does not have the ability to deploy in batches. The real batch deployment is the module that
1th ChapterThinking1.1How to use one clickAnsibleBuild1.1.1First Step goalThe first thing we want to make clear is that we need to implement a one-click Automation script that executes a script and then automates the installation of Nfs+rsync+sersync andthen lets web01 automatically mount the NFS shared directory. 1.1.2Second step relationship clear and sequentialNow that we have a goal, what we need to do is we need to understand the sequencing of automated installations.
since we n
I. Preparation of the first order
Ansible installation is complete, below learn how to use ansible.Just like learning a programming language, first write a Hello World sample program. We also write a ansible "Hello World":
Ansible 192.168.128.83-m Ping
This command means ping 192.168.128.83 through the admin hostThe "-M ping" in the command indicates that the pi
First, Ansible Basic installationInstall RPM using Yum with epel6,7 and more. However, you must install Python2.4 or a later version of Python.Add Source:Wget-o/etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repoYum Install Ansible-ySecond, ansible configuration1. SSH face key login settings# #生成公钥/Private keySSH-KEYGEN-T RSASsh-copy-id-i ~/.ssh/
Tags: Linux automated operation and maintenance ansibleObjectiveThe development direction of operations, centralization, automation, standardization, virtualization, distributed.This article shows a tool for automating the development of operations: Ansible. Ansible has many advantages, only need ssh and Python can be used, do not need the client, powerful, module rich, easy to get started low threshold, ba
Manually record the hardware information of each server and it has already passed. You can write and capture the information everywhere through scripts or automated tools. This article mainly uses saltstack as a tool, then, you can use the APIS provided to compile the required Python script SaltStack, which is a centralized management platform for server infrastructure and provides configuration management,
Point I began to study:Http://edu.51cto.com/course/course_id-2354.html1Training ObjectivesThe objective of this course is to enable all participants to participate in the training Saltstack Server Management, skilled use of remote execution of the function of the bulk operation of the server, using configuration management for automated installation, deployment and management. At the same time, according to the production needs of enterprises to custo
What is mine doing? Is that you define the collection module in mine, he will collect the data, where it is stored, do not know, but certainly the client Minino Local. Interested friends can check Saltstack code.Paste it down here first, official DOC usage:
The code is as follows
Copy Code
Mine.delete: Remove specific function contents of minion. Returns True on success. CLI Example: Salt ' * ' mine.delete ' network.interfa
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.