Centos 7.6 Install ansible-playbook mysql 5.7.26 standard

Centos 7.6 Install ansible-playbook mysql 5.7.26 standard_第1张图片

安装ansible

yum install ansible vim net-tools git -y

配置hosts

vim /etc/ansible/hosts
[mysql]
192.168.3.209

上生成秘钥,或者指定他的加密格式,默认就是rsa

ssh-keygen -P ''
ssh-keygen -t rsa
ssh-copy-id -i [email protected]

测试连接终端

ssh [email protected]

下载项目,上传到系统

https://download.csdn.net/download/hanzheng260561728/11637643

解压mysql.ansible

tar -zxvf mysql.ansible.source.5.7.26.tar.gz

拷贝项目到默认目录

mv mysql /etc/ansible/roles

执行安装操作

ansible-playbook /etc/ansible/roles/mysql/mysql_install.yml

你可能感兴趣的:(Centos,Mysql,Ansible)