运维自动化之ansible playbook一键化安装mysql主从

运维 系统运维 自动化
使用ansible创建mysql主从的问题

[[128859]]

今天qq群里有朋友讨论使用ansible创建mysql主从的问题,正好我公司之前有需求,我就写了这个模块,现在分享给大家。

一、各软件版本

1、docker版本

  1. Client version: 1.3.2 
  2. Client API version: 1.15 
  3. Go version (client): go1.3.3 
  4. Git commit (client): 39fa2fa/1.3.2 
  5. OS/Arch (client): linux/amd64 
  6. Server version: 1.3.2 
  7. Server API version: 1.15 
  8. Go version (server): go1.3.3 
  9. Git commit (server): 39fa2fa/1.3.2 

2、docker存储

  1. Containers: 2 
  2. Images: 4 
  3. Storage Driver: devicemapper 
  4.  Pool Name: docker-253:1-1430610-pool 
  5.  Pool Blocksize: 65.54 kB 
  6.  Data file: /var/lib/docker/devicemapper/devicemapper/data 
  7.  Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata 
  8.  Data Space Used: 9.855 GB 
  9.  Data Space Total: 107.4 GB 
  10.  Metadata Space Used: 6.095 MB 
  11.  Metadata Space Total: 2.147 GB 
  12.  Library Version: 1.02.84-RHEL7 (2014-03-26
  13. Execution Driver: native-0.2 
  14. Kernel Version: 3.18.3-1.el7.elrepo.x86_64 
  15. Operating System: CentOS Linux 7 (Core) 

二、docker方面

1、新建立2个容器test1(mysql master)与test2(mysql slave)

  1. [root@docker-test3 ~]#  sh create_docker_container_use_static_ip.sh test1 docker.ops-chukong.com:5000/centos6-http:new /usr/bin/supervisord 10 
  2. {'Physics_ip':'10.10.17.3','Container_name':'test1','Container_ip':'172.16.1.2/24','Container_vlan':'10','Container_vlan_gateway':'172.16.1.1/24','Container_create':'2015-03-05 14:49:19','Container_status':'running'
  3. [root@docker-test3 ~]#  sh create_docker_container_use_static_ip.sh test2 docker.ops-chukong.com:5000/centos6-http:new /usr/bin/supervisord 10 
  4. {'Physics_ip':'10.10.17.3','Container_name':'test2','Container_ip':'172.16.1.3/24','Container_vlan':'10','Container_vlan_gateway':'172.16.1.1/24','Container_create':'2015-03-05 14:49:39','Container_status':'running'
  5. [root@docker-test3 ~]# docker ps -a 
  6. CONTAINER ID        IMAGE                                          COMMAND                CREATED              STATUS              PORTS               NAMES 
  7. 36b3b3643097        docker.ops-chukong.com:5000/centos6-http:new   "/usr/bin/supervisor   About a minute ago   Up About a minute                       test2 
  8. 90f8ffc29d41        docker.ops-chukong.com:5000/centos6-http:new   "/usr/bin/supervisor   About a minute ago   Up About a minute                       test1 

已经创建了2个实例,test1的ip是172.16.1.2,test2的ip是172.16.1.3

使用这个创建是使用了持久化固定ip原因,各位使用其他方式创建也可以。

宿主机的ip是10.10.17.3

三、ansible方面

1、添加路由

在ansible里添加一条到这个主机的路由,方便直接ansible对容器的ip进行部署mysql

  1. [root@puppet ansible]# route add -net 172.16.0.0 netmask 255.255.0.0 gw 10.10.17.3 
  2. ping那2个容器ip 
  3. [root@puppet ansible]# ping -c 2 172.16.1.2 
  4. PING 172.16.1.2 (172.16.1.256(84) bytes of data. 
  5. 64 bytes from 172.16.1.2: icmp_seq=1 ttl=63 time=0.846 ms 
  6. 64 bytes from 172.16.1.2: icmp_seq=2 ttl=63 time=0.121 ms 
  7.   
  8. --- 172.16.1.2 ping statistics --- 
  9. 2 packets transmitted, 2 received, 0% packet loss, time 1001ms 
  10. rtt min/avg/max/mdev = 0.121/0.483/0.846/0.363 ms 
  11. You have mail in /var/spool/mail/root 
  12. [root@puppet ansible]# ping -c 2 172.16.1.3 
  13. PING 172.16.1.3 (172.16.1.356(84) bytes of data. 
  14. 64 bytes from 172.16.1.3: icmp_seq=1 ttl=63 time=0.672 ms 
  15. 64 bytes from 172.16.1.3: icmp_seq=2 ttl=63 time=0.111 ms 
  16.   
  17. --- 172.16.1.3 ping statistics --- 
  18. 2 packets transmitted, 2 received, 0% packet loss, time 999ms 
  19. rtt min/avg/max/mdev = 0.111/0.391/0.672/0.281 ms 

可以看到通了,把这2个ip放到ansible的hosts里

2、添加hosts

  1. [root@puppet ansible]# tail -n3 /etc/ansible/hosts 
  2. [container_mysql] 
  3. 172.16.1.2:22 
  4. 172.16.1.3:22 

3、使用ansible部署mysql

A、部署mysql master,在test1节点部署

  1. time ansible-playbook mysql_master_install.yml --extra-vars "host=172.16.1.2 user=root mysql_slave_ip=172.16.1.3"  -k 

mysql_slave_ip是从库的ip,弄这个是在master里给slave进行账号授权

下面开始部署

  1. root@puppet ansible]# time ansible-playbook mysql_master_install.yml --extra-vars "host=172.16.1.2 user=root mysql_slave_ip=172.16.1.3"  -k 
  2. SSH password: 
  3.   
  4. PLAY [172.16.1.2] ************************************************************* 
  5.   
  6. GATHERING FACTS *************************************************************** 
  7. ok: [172.16.1.2
  8.   
  9. TASK: [common | Install initializtion require software] *********************** 
  10. changed: [172.16.1.2
  11.   
  12. TASK: [mysql_master_install | Copy Mysql Software To Redhat Client] *********** 
  13. changed: [172.16.1.2
  14.   
  15. TASK: [mysql_master_install | Create Mysql User In Redhat Client] ************* 
  16. changed: [172.16.1.2
  17.   
  18. TASK: [mysql_master_install | Copy Mysql Start Script To Redhat Client] ******* 
  19. changed: [172.16.1.2
  20.   
  21. TASK: [mysql_master_install | Copy Install Mysql Script  To Redhat Client] **** 
  22. changed: [172.16.1.2
  23.   
  24. TASK: [mysql_master_install | Copy Mysql Config To Redhat Client] ************* 
  25. changed: [172.16.1.2
  26.   
  27. TASK: [mysql_master_install | Copy Mysql Security Script To Redhat Client] **** 
  28. changed: [172.16.1.2
  29.   
  30. TASK: [mysql_master_install | Create Mysql Install Dir] *********************** 
  31. ok: [172.16.1.2
  32.   
  33. TASK: [mysql_master_install | Uncompression Mysql Software To Redhat Client] *** 
  34. changed: [172.16.1.2
  35.   
  36. TASK: [mysql_master_install | Modify Mysql Dir Permission In Redhat Client] *** 
  37. ok: [172.16.1.2] => (item=/data/mysql/datadir) 
  38. ok: [172.16.1.2] => (item=/data/mysql/basedir) 
  39.   
  40. TASK: [mysql_master_install | Install Mysql Script In Redhat Client] ********** 
  41. changed: [172.16.1.2
  42.   
  43. TASK: [mysql_master_install | Wait Untils Mysql Service Avaiable In Redhat Client] *** 
  44. changed: [172.16.1.2
  45.   
  46. TASK: [mysql_master_install | Start Myql Security Script In Redhat Client] **** 
  47. changed: [172.16.1.2
  48.   
  49. TASK: [mysql_master_install | Add Boot Start Mysql Service In Redhat Client] *** 
  50. changed: [172.16.1.2
  51.   
  52. TASK: [mysql_master_install | Copy Mysql Create Slave Script To Redhat Client] *** 
  53. changed: [172.16.1.2
  54.   
  55. TASK: [mysql_master_install | Create Mysql Master And Slave  In redhat Client] *** 
  56. changed: [172.16.1.2
  57.   
  58. TASK: [mysql_master_install | Delete Create Mysql Master And Slave Script  In redhat Client] *** 
  59. changed: [172.16.1.2
  60.   
  61. TASK: [mysql_master_install | Delete Mysql compression Software In Redhat Client] *** 
  62. changed: [172.16.1.2
  63.   
  64. PLAY RECAP ******************************************************************** 
  65. 172.16.1.2                 : ok=19   changed=16   unreachable=0    failed=0 
  66.   
  67.   
  68. real    3m2.646s 
  69. user    0m14.250s 
  70. sys 0m0.854s 

可以看到3分钟部署完成,最浪费时间的是yum安装基础库

现在去test1里查看

  1. [root@puppet ansible]# ssh 172.16.1.2 
  2. root@172.16.1.2's password: 
  3. Last login: Mon Nov 17 14:10:39 2014 from 172.17.42.1 
  4. root@b8d17d0f3941:~ 
  5. 15:02:39 # netstat -tlnp 
  6. Active Internet connections (only servers) 
  7. Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name 
  8. tcp        0      0 172.16.1.2:3306             0.0.0.0:*                   LISTEN      - 
  9. tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      8/sshd 
  10. tcp        0      0 :::80                       :::*                        LISTEN      14/httpd 
  11. tcp        0      0 :::22                       :::*                        LISTEN      8/sshd 
  12. root@b8d17d0f3941:~ 
  13. root@b8d17d0f3941:~ 
  14. 15:03:12 # mysql -h 172.16.1.2 -u root -p 
  15. Enter password: 
  16. Welcome to the MySQL monitor.  Commands end with ; or \g. 
  17. Your MySQL connection id is 12 
  18. Server version: 5.5.21-log Source distribution 
  19.   
  20. Copyright (c) 20002011, Oracle and/or its affiliates. All rights reserved. 
  21.   
  22. Oracle is a registered trademark of Oracle Corporation and/or its 
  23. affiliates. Other names may be trademarks of their respective 
  24. owners. 
  25.   
  26. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
  27.   
  28. mysql> show databases; 
  29. +--------------------+ 
  30. | Database           | 
  31. +--------------------+ 
  32. | information_schema | 
  33. | mysql              | 
  34. | performance_schema | 
  35. +--------------------+ 
  36. 3 rows in set (0.00 sec) 
  37.   
  38. mysql> use mysql 
  39. Reading table information for completion of table and column names 
  40. You can turn off this feature to get a quicker startup with -A 
  41.   
  42. Database changed 
  43. mysql> select host,user,password from user; 
  44. +------------+--------+-------------------------------------------+ 
  45. | host       | user   | password                                  | 
  46. +------------+--------+-------------------------------------------+ 
  47. | localhost  | root   | *BE78618CBAFFF409CE17D81579C1678B94439BE1 | 
  48. 172.16.1.3 | root   | *BE78618CBAFFF409CE17D81579C1678B94439BE1 | 
  49. 172.16.1.2 | root   | *BE78618CBAFFF409CE17D81579C1678B94439BE1 | 
  50. | %          | zabbix | *DEEF4D7D88CD046ECA02A80393B7780A63E7E789 | 
  51. +------------+--------+-------------------------------------------+ 
  52. 4 rows in set (0.00 sec) 
  53.   
  54. mysql> 

可以看到数据库部署成功,并已经给予slave授予了权限。

B、部署从库

在test2节点部署

  1. time ansible-playbook mysql_slave_install.yml --extra-vars "host=172.16.1.3 user=root mysql_master_ip=172.16.1.2 mysql_master_port=3306 mysql_master_user=root mysql_master_passwd=E4yR3WnoluSFTCBAI"  -k 

mysql_master_ip是mysql master的ip

mysql_master_port是mysql master的mysql端口

mysql_master_user是mysql master的mysql用户

mysql_master_passwd是mysql 的密码

如果你使用我模块部署mysql的master了,直接运行命令就行,如果没有,只想单独弄个从库,主库不弄,那么***步创建mysql master就不需要,只需要你在mater里授予slave的权限,然后运行mysql slave的模块就行

下面是运行情况

  1. [root@puppet ansible]# time ansible-playbook mysql_slave_install.yml --extra-vars "host=172.16.1.3 user=root mysql_master_ip=172.16.1.2 mysql_master_port=3306 mysql_master_user=root mysql_master_passwd=E4yR3WnoluSFTCBAI"  -k 
  2. SSH password: 
  3.   
  4. PLAY [172.16.1.3] ************************************************************* 
  5.   
  6. GATHERING FACTS *************************************************************** 
  7. ok: [172.16.1.3
  8.   
  9. TASK: [common | Install initializtion require software] *********************** 
  10. changed: [172.16.1.3
  11.   
  12. TASK: [mysql_slave_install | Copy Mysql Software To Redhat Client] ************ 
  13. changed: [172.16.1.3
  14.   
  15. TASK: [mysql_slave_install | Create Mysql User In Redhat Client] ************** 
  16. changed: [172.16.1.3
  17.   
  18. TASK: [mysql_slave_install | Copy Mysql Start Script To Redhat Client] ******** 
  19. changed: [172.16.1.3
  20.   
  21. TASK: [mysql_slave_install | Copy Install Mysql Script  To Redhat Client] ***** 
  22. changed: [172.16.1.3
  23.   
  24. TASK: [mysql_slave_install | Copy Mysql Config To Redhat Client] ************** 
  25. changed: [172.16.1.3
  26.   
  27. TASK: [mysql_slave_install | Copy Mysql Security Script To Redhat Client] ***** 
  28. changed: [172.16.1.3
  29.   
  30. TASK: [mysql_slave_install | Create Mysql Install Dir] ************************ 
  31. ok: [172.16.1.3
  32.   
  33. TASK: [mysql_slave_install | Uncompression Mysql Software To Redhat Client] *** 
  34. changed: [172.16.1.3
  35.   
  36. TASK: [mysql_slave_install | Modify Mysql Dir Permission In Redhat Client] **** 
  37. ok: [172.16.1.3] => (item=/data/mysql/datadir) 
  38. ok: [172.16.1.3] => (item=/data/mysql/basedir) 
  39.   
  40. TASK: [mysql_slave_install | Install Mysql Script In Redhat Client] *********** 
  41. changed: [172.16.1.3
  42.   
  43. TASK: [mysql_slave_install | Wait Untils Mysql Service Avaiable In Redhat Client] *** 
  44. changed: [172.16.1.3
  45.   
  46. TASK: [mysql_slave_install | Start Myql Security Script In Redhat Client] ***** 
  47. changed: [172.16.1.3
  48.   
  49. TASK: [mysql_slave_install | Add Boot Start Mysql Service In Redhat Client] *** 
  50. changed: [172.16.1.3
  51.   
  52. TASK: [mysql_slave_install | Copy Mysql Create Slave Script To Redhat Client] *** 
  53. changed: [172.16.1.3
  54.   
  55. TASK: [mysql_slave_install | Create Mysql Master And Slave  In redhat Client] *** 
  56. changed: [172.16.1.3
  57.   
  58. TASK: [mysql_slave_install | Delete Create Mysql Master And Slave Script  In redhat Client] *** 
  59. changed: [172.16.1.3
  60.   
  61. TASK: [mysql_slave_install | Delete Mysql compression Software In Redhat Client] *** 
  62. changed: [172.16.1.3
  63.   
  64. PLAY RECAP ******************************************************************** 
  65. 172.16.1.3                 : ok=19   changed=16   unreachable=0    failed=0 
  66.   
  67.   
  68. real    2m59.966s 
  69. user    0m14.413s 
  70. sys 0m0.987s 

部署完成,下面测试一下

  1. 15:26:22 # netstat -tlnp 
  2. Active Internet connections (only servers) 
  3. Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name 
  4. tcp        0      0 172.16.1.3:3306             0.0.0.0:*                   LISTEN      - 
  5. tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      8/sshd 
  6. tcp        0      0 :::80                       :::*                        LISTEN      14/httpd 
  7. tcp        0      0 :::22                       :::*                        LISTEN      8/sshd 
  8. root@4ac2891ba3fd:~ 
  9. 15:26:27 # mysql -h 172.16.1.3 -u root -p 
  10. Enter password: 
  11. Welcome to the MySQL monitor.  Commands end with ; or \g. 
  12. Your MySQL connection id is 16 
  13. Server version: 5.5.21-log Source distribution 
  14.   
  15. Copyright (c) 20002011, Oracle and/or its affiliates. All rights reserved. 
  16.   
  17. Oracle is a registered trademark of Oracle Corporation and/or its 
  18. affiliates. Other names may be trademarks of their respective 
  19. owners. 
  20.   
  21. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
  22. mysql> show databases; 
  23. +--------------------+ 
  24. | Database           | 
  25. +--------------------+ 
  26. | information_schema | 
  27. | mysql              | 
  28. | performance_schema | 
  29. +--------------------+ 
  30. 3 rows in set (0.01 sec) 
  31.   
  32. mysql> show processlist; 
  33. +----+-------------+------------------+------+---------+------+-----------------------------------------------------------------------------+------------------+-----------+---------------+-----------+ 
  34. | Id | User        | Host             | db   | Command | Time | State                                                                       | Info             | Rows_sent | Rows_examined | Rows_read | 
  35. +----+-------------+------------------+------+---------+------+-----------------------------------------------------------------------------+------------------+-----------+---------------+-----------+ 
  36. 11 | system user |                  | NULL | Connect |  192 | Waiting for master to send event                                            | NULL             |         0 |             0 |         1 | 
  37. 12 | system user |                  | NULL | Connect |  192 | Slave has read all relay log; waiting for the slave I/O thread to update it | NULL             |         0 |             0 |         1 | 
  38. 14 | root        | 172.16.1.3:53445 | NULL | Query   |    0 | NULL                                                                        | show processlist |         0 |             0 |         4 | 
  39. +----+-------------+------------------+------+---------+------+-----------------------------------------------------------------------------+------------------+-----------+---------------+-----------+ 
  40. 3 rows in set (0.00 sec) 
  41.   
  42. mysql> show slave status\G 
  43. *************************** 1. row *************************** 
  44.                Slave_IO_State: Waiting for master to send event 
  45.                   Master_Host: 172.16.1.2 
  46.                   Master_User: mysql_sync 
  47.                   Master_Port: 3306 
  48.                 Connect_Retry: 60 
  49.               Master_Log_File: mysql-bin.000003 
  50.           Read_Master_Log_Pos: 1663 
  51.                Relay_Log_File: mysql-relay-bin.000002 
  52.                 Relay_Log_Pos: 253 
  53.         Relay_Master_Log_File: mysql-bin.000003 
  54.              Slave_IO_Running: Yes 
  55.             Slave_SQL_Running: Yes 
  56.               Replicate_Do_DB: 
  57.           Replicate_Ignore_DB: 
  58.            Replicate_Do_Table: 
  59.        Replicate_Ignore_Table: 
  60.       Replicate_Wild_Do_Table: 
  61.   Replicate_Wild_Ignore_Table: 
  62.                    Last_Errno: 0 
  63.                    Last_Error: 
  64.                  Skip_Counter: 0 
  65.           Exec_Master_Log_Pos: 1663 
  66.               Relay_Log_Space: 409 
  67.               Until_Condition: None 
  68.                Until_Log_File: 
  69.                 Until_Log_Pos: 0 
  70.            Master_SSL_Allowed: No 
  71.            Master_SSL_CA_File: 
  72.            Master_SSL_CA_Path: 
  73.               Master_SSL_Cert: 
  74.             Master_SSL_Cipher: 
  75.                Master_SSL_Key: 
  76.         Seconds_Behind_Master: 0 
  77. Master_SSL_Verify_Server_Cert: No 
  78.                 Last_IO_Errno: 0 
  79.                 Last_IO_Error: 
  80.                Last_SQL_Errno: 0 
  81.                Last_SQL_Error: 
  82.   Replicate_Ignore_Server_Ids: 
  83.              Master_Server_Id: 2 
  84. 1 row in set (0.00 sec) 

可以看到从库数据库创建成功,并且主从(sql与i这2个状态也是yes)创建成功。

C、测试主从状态

在master里创建一个数据库mysql_master,并创建表test插入数据

  1. [root@puppet ansible]# ssh 172.16.1.2 
  2. root@172.16.1.2's password: 
  3. Last login: Thu Mar  5 15:02:39 2015 from 10.10.11.125 
  4. root@b8d17d0f3941:~ 
  5. 15:27:20 # mysql -h 172.16.1.2 -u root -p 
  6. Enter password: 
  7. Welcome to the MySQL monitor.  Commands end with ; or \g. 
  8. Your MySQL connection id is 17 
  9. Server version: 5.5.21-log Source distribution 
  10.   
  11. Copyright (c) 20002011, Oracle and/or its affiliates. All rights reserved. 
  12.   
  13. Oracle is a registered trademark of Oracle Corporation and/or its 
  14. affiliates. Other names may be trademarks of their respective 
  15. owners. 
  16.   
  17. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
  18. mysql> create database mysql_master; 
  19. Query OK, 1 row affected (0.00 sec) 
  20.   
  21. mysql> use mysql_master 
  22. Database changed 
  23. mysql> create table test(id int,name varchar(4)); 
  24. Query OK, 0 rows affected (0.03 sec) 
  25.   
  26. mysql> desc test; 
  27. +-------+------------+------+-----+---------+-------+ 
  28. | Field | Type       | Null | Key | Default | Extra | 
  29. +-------+------------+------+-----+---------+-------+ 
  30. | id    | int(11)    | YES  |     | NULL    |       | 
  31. | name  | varchar(4) | YES  |     | NULL    |       | 
  32. +-------+------------+------+-----+---------+-------+ 
  33. 2 rows in set (0.00 sec) 
  34. mysql> insert into test value(1,'test1'); 
  35. Query OK, 1 row affected, 1 warning (0.00 sec) 
  36.   
  37. mysql> insert into test value(2,'test2'); 
  38. Query OK, 1 row affected, 1 warning (0.00 sec) 
  39.   
  40. mysql> select * from test; 
  41. +------+------+ 
  42. | id   | name | 
  43. +------+------+ 
  44. |    1 | test | 
  45. |    2 | test | 
  46. +------+------+ 
  47. 2 rows in set (0.00 sec) 

然后去从库里查看

  1. [root@puppet ansible]# ssh 172.16.1.3 
  2. root@172.16.1.3's password: 
  3. Last login: Thu Mar  5 15:25:06 2015 from 10.10.11.125 
  4. root@4ac2891ba3fd:~ 
  5. 15:31:05 # mysql -h 172.16.1.3 -u root -p 
  6. Enter password: 
  7. Welcome to the MySQL monitor.  Commands end with ; or \g. 
  8. Your MySQL connection id is 17 
  9. Server version: 5.5.21-log Source distribution 
  10.   
  11. Copyright (c) 20002011, Oracle and/or its affiliates. All rights reserved. 
  12.   
  13. Oracle is a registered trademark of Oracle Corporation and/or its 
  14. affiliates. Other names may be trademarks of their respective 
  15. owners. 
  16.   
  17. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
  18.   
  19. mysql> show databases; 
  20. +--------------------+ 
  21. | Database           | 
  22. +--------------------+ 
  23. | information_schema | 
  24. | mysql              | 
  25. | mysql_master       | 
  26. | performance_schema | 
  27. +--------------------+ 
  28. 4 rows in set (0.00 sec) 
  29.   
  30. mysql> use mysql_master 
  31. Reading table information for completion of table and column names 
  32. You can turn off this feature to get a quicker startup with -A 
  33.   
  34. Database changed 
  35. mysql> show tables; 
  36. +------------------------+ 
  37. | Tables_in_mysql_master | 
  38. +------------------------+ 
  39. | test                   | 
  40. +------------------------+ 
  41. 1 row in set (0.00 sec) 
  42.   
  43. mysql> select * from test; 
  44. +------+------+ 
  45. | id   | name | 
  46. +------+------+ 
  47. |    1 | test | 
  48. |    2 | test | 
  49. +------+------+ 
  50. 2 rows in set (0.00 sec) 

可以看到从库也同步了数据,mysql主从创建成功。

四、模块地址

mysql master 地址

  1. https://github.com/dl528888/ansible-examples/tree/master/mysql_master_install 

mysql slave地址

  1. https://github.com/dl528888/ansible-examples/tree/master/mysql_slave_install 

 

责任编辑:chenqingxiang 来源: 51CTO
相关推荐

2014-09-22 11:24:18

运维

2017-03-22 16:31:30

Linux运维自动化ansible

2017-03-22 18:30:44

Linux运维自动化ansible

2015-10-08 10:55:23

云服务自动化运维 ANSIBLE

2022-07-29 14:39:17

Ansible运维工具

2014-08-04 10:10:35

IT运维自动化运维

2020-12-11 10:20:33

Ansible运维软件包

2011-09-01 10:22:03

Cobbler运维自动化

2020-04-30 15:00:17

运维Ansible自动化

2013-04-16 14:55:21

自动化运维Puppet实战

2014-05-16 14:31:55

运维自动化Cobbler

2013-04-17 15:48:51

2012-10-22 14:54:48

2012-05-05 22:27:46

puppet自动化运维

2012-05-05 21:48:43

puppet自动化运维

2010-08-12 17:39:07

网站运维自动化管理

2012-05-05 21:28:44

2013-04-11 17:31:28

运维自动化Cobbler

2015-06-24 10:42:19

云计算运维自动化运维ANSIBLE

2018-06-23 07:31:05

点赞
收藏

51CTO技术栈公众号