Last described how to install the Zabbix client (http://www.jb51.net/article/52158.htm) using Ansible playbook, this time describes how to use playbook to install MySQL.
Here is the information for installing MySQL:
Mysql_basedir:/data/mysql/basedir Source directory
mysql_datadir:/data/mysql/datadir Data Directory
mysql_user:mysql MySQL
Official documents See http://docs.ansible.com/ansible/dev_guide/developing_api.htmlTake the official example and revise it as followsImportJSON fromCollectionsImportNamedtuple fromAnsible.parsing.dataloaderImportDataloader fromAnsible.varsImportVariablemanager fromAnsible.inventoryImportInventory fromAnsible.playbook.playImportPlay fromAnsible.executor.task_queue_managerImportTaskqueuemanagerFrom Ansible.e
[Options] [module ...]
The Ansible-doc command follows the [options] parameter or module name to display the module usage instructions, as shown in the following example:
List the supported modules
Ansible-doc-l
Ping Module Feature description
Ansible-doc PingIv.
1.ansible IntroductionAnsible is an automated operations tools, based on Python development, the collection of many operations tools (puppet,cfengine,chef,func,fabric) advantages, the implementation of batch (System configuration, program deployment, Run command) and other functionsAnd Ansible is based on the module work, itself does not have the ability to deplo
framework.
It mainly includes:
(1) connection plugins: communicates with the monitored end;
(2) host inventory: specifies the host for the operation. it is a host defined in the configuration file;
(3) core modules, command modules, and custom modules of various modules;
(4) logging email and other functions are completed by using the plug-in;
(5) playbook: when the script executes multiple tasks, it is no
Scripts that need to be executed (no real parameter is Free_form)
Executable
No
Changing the shell used to execute the command should be the absolute path to the executable file.
Removes
No
If the file corresponding to this parameter does not exist, do not run the command, as opposed to the creates parameter
StdIn (added after 2.4)
environment variable and enter the command line interface to start the conversion.
Note: This tool is executed in java and JRE needs to be installed.
There are three main tools used:
Apk2bar: used to convert an Android apk file to a PlayBook bar file.
Blackberry-signer: used to sign the generated bar File
Blackberry-deploy: Used to deploy bar files and upload bar files to PlayBook.Apk2bar usage:
Apk2bar Ap
applicable. If set to '_ default', it will use the 'USER' portion of the policy if available[Default: None]-StateWhether the line shoshould be there or not.(Choices: present, absent) [Default: present]-Unsafe_writesNormally this module uses atomic operations to prevent data upload uption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. one example are docker mounted files, they ca
Asible is a very good tool in the operation of tools, I personally prefer, can be flexibly configured according to the needs of yml files to achieve different business needs, because do not need to install the client, the start is very easy, In some cases you might want to write ansible as a library component of Python into your own script, and today's script script will show how ansible can be combined wit
One of the most important functions in ansible is the ability to execute AD-HOC commands, and some people may not understand the meaning of the word ad-hoc, which means instant meaning, or arbitrary meaning.In contrast to the Ansible playbook function, playbook is suitable for batch deployment environments and is gener
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 "
Do operation and maintenance of the classmate many have used Ansible bar, open Source Batch deployment tool ranked top three: puppet, Saltstack, Ansible.Ansible is characterized by the absence of agents, the use of SSH protocol to communicate, lightweight, written in Python, can write playbook, can also do some ad-hoc batch command execution operations.The recent
Command ModuleThe command module is the ansible default module, the command module is used when the-m parameter is not specified;Comand modules are simple, common commands can be used, but the execution of their commands is not performed through the shell, so, such as "Example
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.