# hashicorp-consul **Repository Path**: bottlelee/hashicorp-consul ## Basic Information - **Project Name**: hashicorp-consul - **Description**: 自动化安装 consul 集群 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-12-07 - **Last Updated**: 2023-08-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 自动化部署 Consul 集群 ## inventory 示例 ``` server0 ansible_host=192.168.56.21 server1 ansible_host=192.168.56.22 server2 ansible_host=192.168.56.23 server3 ansible_host=192.168.56.24 server4 ansible_host=192.168.56.25 [consul_servers] server[0:2] [consul_clients] server[3:4] [consul_cluster:children] consul_servers consul_clients [all:vars] ansible_user=vagrant ansible_pass=vagrant ``` ## 已验证系统 * centos/7 * ubuntu/focal64 * ubuntu/jammy64 * ubuntu/bionic64 # 安装方法 执行以下命令,把 role 安装在你的 ~/.ansible/roles 目录里。 ``` ansible-galaxy install git+https://gitee.com/bottlelee/hashicorp-consul.git ``` 如果你要指定 roles 目录,可加 `-p` 参数,例如: ``` ansible-galaxy install git+https://gitee.com/bottlelee/hashicorp-consul.git -p ./roles/ ```