ansible 自动化安装安装redis 架构

自动安装redis

[root@ansible ~]# cat /etc/ansible/ansible.cfg 
[defaults]
inventory      = /etc/ansible/inventory
roles_path     = /etc/ansible/roles
host_key_checking = False
log_path = /var/log/ansible.log

[root@ansible ~]# cat /etc/ansible/inventory
[redis_cluster]
node01
node02
node03

[pxc]
node01 server_id=11 roles=bootstrap
node02 server_id=22 roles=mysql
node03 server_id=33 roles=mysql

[webservers]
node04

[ha]
ha01 state=MASTER priority=116
ha02 state=BACKUP priority=96

[mha]
node01 server_id=101 role=master
node02 server_id=102 role=slave
node03 server_id=103 role=slave
node05 role=manager

[root@ansible ~]# cat /etc/ansible/deploy_redis_cluster_roles.yml 
- name: install and configure redis_cluster
  hosts: redis_cluster
  roles:
    - redis_cluster

你可能感兴趣的:(redis,自动化,架构)