ansible中的Gluster_体积模块

ansible中的Gluster_体积模块,ansible,Ansible,请您在以下问题上帮助我 我正在用ansible(在我的家庭实验室)在Ubuntu14.04上编写一个高可用的LAMPAPP。在安装glusterfs之前,所有的任务都变得非常繁重,但是从一周以来,创建glusterfs卷对我来说是一个挑战。如果使用moudle命令,则将创建glusterfs卷 - name: Creating the Gluster Volume command: sudo gluster volume create var-www replica 2 tran

请您在以下问题上帮助我

我正在用ansible(在我的家庭实验室)在Ubuntu14.04上编写一个高可用的LAMPAPP。在安装glusterfs之前,所有的任务都变得非常繁重,但是从一周以来,创建glusterfs卷对我来说是一个挑战。如果使用moudle命令,则将创建glusterfs卷

  - name: Creating the Gluster Volume
      command: sudo gluster volume create var-www replica 2 transport tcp server01-private:/data/glusterfs/var-www/brick01/brick server02-private:/data/glusterfs/var-www/brick02/brick
但是如果我使用GLUSTER_音量模块,我会得到错误

- name: Creating the Gluster Volume
  gluster_volume:
      state: present
      name: var-www
      bricks: /server01-private:/data/glusterfs/var-www/brick01/brick,/server02-private:/data/glusterfs/var-www/brick02/brick
      replicas: 2
      transport: tcp
      cluster:
         - server01-private
         - server02-private
      force: yes
  run_once: true
错误是

"msg": "error running gluster (/usr/sbin/gluster --mode=script volume add-brick var-www replica 2 server01-private:/server01-private:/data/glusterfs/var-www/brick01/brick server01-private:/server02-private:/data/glusterfs/var-www/brick02/brick server02-private:/server01-private:/data/glusterfs/var-www/brick01/brick server02-private:/server02-private:/data/glusterfs/var-www/brick02/brick force) command (rc=1): internet address 'server01-private:/server01-private' does not conform to standards\ninternet address 'server01-private:/server02-private' does not conform to standards\ninternet address 'server02-private:/server01-private' does not conform to standards\ninternet address 'server02-private:/server02-private' does not conform to standards\nvolume add-brick: failed: Host server01-private:/server01-private is not in 'Peer in Cluster' state\n"
}


我可以知道我犯的错误吗?

砖块:Ansible
gluster\u卷声明
模块只需要砖块的路径。参与卷的节点标识为
群集:

gluster
命令行需要
格式。但是,在使用时,这不是必需的

因此,您的任务应该是:

-名称:创建Gluster卷
gluster_体积:
名称:'var www'
砖块:'/data/glusterfs/var www/brick01/brick,/data/glusterfs/var www/brick02/brick'
副本:“2”
集群:
-“server01专用”
-“server02专用”
传输:“tcp”
陈述:“现在”