Batch manage remote servers using AnsibleBackground
Local management of a batch of remote servers is required, mainly to execute the following tasks:
1) Copy local files to all remote servers;2) execute commands on the remote server;
The paths of the remote server are not completely consistent. Generally, access is performed through the variable paths defined in the environment variables;For example, define $ app_path =/opt/app/bin in. bashrc.
Finally, ansib
1. Installing Salt-master and Salt-minionThe installation process is not mentioned, please refer to http://docs.saltstack.com/en/latest/topics/installation/index.html2. Installing Salt-api,cherrypyUsed to communicate with Jenkins and saltEnable Salt-apiIn the Salt master con
Salt and pepper noiseSalt and pepper noise of image noise (salt and Pepper Noise)Overview:Salt and pepper noise (salt pepper noise) is a common noise in digital images, the so-called salt and pepper, the pepper is black, is white, salty noise is the random appearance of black and white pixels on the image.
When deploying Salt-minion, an error[[email protected] ~]#/etc/init.d/salt-minion startStarting Salt-minion Daemon:traceback (most recent):File "/usr/bin/salt-minion", line 6, From salt.scripts import salt_minionImporterror:no module named Salt.scriptsKnow a bit of Python, basically can confirm that Python module impor
First, let Salt-master find our custom script (/etc/salt/master):650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/82/C4/wKioL1dgxeLjfCCkAABKOoWNtAA947.png-wh_500x0-wm_3 -wmp_4-s_942061221.png "title=" 1.png "alt=" Wkiol1dgxeljfcckaabkoowntaa947.png-wh_50 "/>Use Ext_pillar to extend the custom script, Gameinfo is the name of the script, the directory of the script to be placed under the/usr/lib/pyt
execute a copy file using the Salt State1. Edit Top.sls under Master's File_root directory/srv/salt:Base: ' * ' : -Pip2. Create the PIP directory under the/srv/salt directory and edit the Init.sls file:Here is the copy get-pip.py file:pip: file.managed: -source:salt://get-pip.py -Name:/home/cheeron/get-pip.py - user:cheeron - group:cheeron -mode:644Here's the PIP definition, using the
Ansible using advanced steps
Experimental Environment
Group: Srvs
Group member host name, system version, and IP
Node1 centos-7-core 172.16.253.184
node2 centos-7-core 172.16.254.89
node3 centos-7-core 172.16.253.47
Node4 Centos-6-core 172.16.253.30
iterative function of PlaybookSimple item to use
---
-hosts:srvs
remote_user:root
tasks:
-name:copy files
tags:copy
when:ansible_ Distribution_major_version = = "7"
copy:src=/root/
After modifying the salt source code, you want to quickly compile the RPM package, which can be based on the salt src.rpm package.Pre-preparationSALT-2014.7.1-1.EL7.SRC.RPM # Salt Source package and Spec file rpm-build.rpm # tool to compile rpmModify CodeRPM-IVH salt-2014.7.1-1.el7.src.rpm # will generate Rpmbuild dire
Add salt to user passwords
To avoid wasting your time, follow these steps.If you do not know the following details, you can refer to this article: use MD5 to protect the user password stored in the databaseAfter MD5 processing of important data directly, reverse decryption is indeed very difficult, but it can still identify flaws, please refer:If a user named Li Zi can view the database, then he can observe that his or her password is the same as oth
CentOS 5.x/ RHEL 5.x install salt to upgrade ZMQ2.x to ZMQ4.x
RHEL5.8 install salt-minion through the EPEL source. When starting, the log reports an error: [WARNING] You have a version of ZMQ less than ZMQ 3.2! There are known connection keep-alive issues with ZMQ
The reason is that the salt-master version uses ZMQ3, the sal
It turns out that this technology is called salt, which we often use in the past. ========================================================== ========================================================== ==== We know that if the password is hashed directly, hackers can obtain the hash value of the password, and then query the hash value Dictionary (for example, MD5 password cracking website ), obtain the password of a user. Add
Build Configuration Reference https://www.cnblogs.com/nmap/p/6219816.html2 kinds of storage mode Minion Terminal configuration Direct storage and master-side event monitoring storageThe third Way master-side direct configuration file parameters in the library, this is relatively simple. http://blog.51cto.com/tianruyun/1795687Simply say the third method step:1. Create a databaseCREATE DATABASEsaltDEFAULT CHARACTER SET UTF8DEFAULT COLLATE utf8_general_ci;2. Create a database tableUse
First, IntroductionAnsible, an open source platform for integrated IT system configuration management, application deployment, and execution-specific tasks, is a project owned by Ansibleworks Company, founded in 2012 by the authors of Cobbler and Func.Ansible is based on the Python language, and is built from two key modules of Paramiko and Pyyaml.Ansible Features:>> deployment is simple, just deploy the Ansible environment on the host side, and no ac
Common ansible Commands
Use Ansible-doc-l to see how specific modules are used, here are examples of common ansible simple usage Execution system commands
[Root@ansible ~]# ansible pinpoint-m shell-a ' hostname '-o # Execute system command
192.168.0.102 | SUCCESS | rc=0 |
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.