From 3cc33de63d8d1a4a1bf6e1d4733b07ae5211ac2c Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Tue, 23 Aug 2016 19:55:18 +0900 Subject: [PATCH] Repo moved. Use Storage SIG Yum Repos. Default to version 3.8 --- README.md | 1 + defaults/main.yml | 1 + meta/main.yml | 8 -------- tasks/centos.yml | 25 ++++++++++++++++++++++++- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d60112d..1f33841 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Variables * `gluster_volumes` is a list of the volumes you want to create. * `glusterfs_cluster_name` must be set to the name of the group containing all the nodes of the GlusterFS cluster. +* `glusterfs_version` is the Gluster version. Choices are '36', '37 or '38' which provides 3.6, 3.7 or 3.8, respectively. Default is '38'. See also -------- diff --git a/defaults/main.yml b/defaults/main.yml index 06b3d87..b096b7d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1 +1,2 @@ gluster_volumes: [] +gluster_version: 38 diff --git a/meta/main.yml b/meta/main.yml index ae37527..4df2a71 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -12,13 +12,5 @@ galaxy_info: categories: - system dependencies: - - role: AerisCloud.repos - remote_repositories: - centos6: - - http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo - centos7: - - http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo - tags: - - glusterfs - role: AerisCloud.yum diff --git a/tasks/centos.yml b/tasks/centos.yml index 6794711..b98e767 100644 --- a/tasks/centos.yml +++ b/tasks/centos.yml @@ -1,13 +1,36 @@ +- name: "Install Storage SIG Yum Repos" + yum: > + name="centos-release-gluster{{ gluster_version }}" + tags: + - glusterfs + +- name: "Install GlusterFS" + yum: > + name={{ item }} + state=present + enablerepo=centos-gluster{{ gluster_version }} + disablerepo=base + with_items: + - glusterfs + - glusterfs-cli + - glusterfs-server + - glusterfs-fuse + - glusterfs-geo-replication + when: ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 6 + tags: + - glusterfs + - name: "Install GlusterFS" yum: > name={{ item }} state=present - enablerepo=glusterfs-epel + enablerepo=centos-gluster{{ gluster_version }} with_items: - glusterfs - glusterfs-cli - glusterfs-server - glusterfs-fuse - glusterfs-geo-replication + when: ansible_distribution == 'CentOS' and ansible_distribution_major_version|int >= 7 tags: - glusterfs