Adds glusterfs client role for systems where glusterfs-client needs to be installed.
This commit is contained in:
parent
8454af55dd
commit
668ba6b6e0
13 changed files with 91 additions and 0 deletions
16
roles/glusterfs/client/tasks/main.yml
Normal file
16
roles/glusterfs/client/tasks/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
# This is meant for Ubuntu and RedHat installations, where apparently the glusterfs-client is not used from inside
|
||||||
|
# hyperkube and needs to be installed as part of the system.
|
||||||
|
|
||||||
|
# Setup/install tasks.
|
||||||
|
- include: setup-RedHat.yml
|
||||||
|
when: ansible_os_family == 'RedHat' and groups['gfs-cluster'] is defined
|
||||||
|
|
||||||
|
- include: setup-Debian.yml
|
||||||
|
when: ansible_os_family == 'Debian' and groups['gfs-cluster'] is defined
|
||||||
|
|
||||||
|
- name: Ensure Gluster mount directories exist.
|
||||||
|
file: "path={{ item }} state=directory mode=0775"
|
||||||
|
with_items:
|
||||||
|
- "{{ gluster_mount_dir }}"
|
||||||
|
when: ansible_os_family in ["Debian","RedHat"] and groups['gfs-cluster'] is defined
|
24
roles/glusterfs/client/tasks/setup-Debian.yml
Normal file
24
roles/glusterfs/client/tasks/setup-Debian.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: Add PPA for GlusterFS.
|
||||||
|
apt_repository:
|
||||||
|
repo: 'ppa:gluster/glusterfs-{{ glusterfs_ppa_version }}'
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
register: glusterfs_ppa_added
|
||||||
|
when: glusterfs_ppa_use
|
||||||
|
|
||||||
|
- name: Ensure GlusterFS client will reinstall if the PPA was just added.
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- glusterfs-client
|
||||||
|
when: glusterfs_ppa_added.changed
|
||||||
|
|
||||||
|
- name: Ensure GlusterFS client is installed.
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: installed
|
||||||
|
default_release: "{{ glusterfs_default_release }}"
|
||||||
|
with_items:
|
||||||
|
- glusterfs-client
|
10
roles/glusterfs/client/tasks/setup-RedHat.yml
Normal file
10
roles/glusterfs/client/tasks/setup-RedHat.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Install Prerequisites
|
||||||
|
yum: name={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- "centos-release-gluster{{ glusterfs_default_release }}"
|
||||||
|
|
||||||
|
- name: Install Packages
|
||||||
|
yum: name={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- glusterfs-client
|
11
roles/glusterfs/server/defaults/main.yml
Normal file
11
roles/glusterfs/server/defaults/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
# For Ubuntu.
|
||||||
|
glusterfs_default_release: ""
|
||||||
|
glusterfs_ppa_use: yes
|
||||||
|
glusterfs_ppa_version: "3.5"
|
||||||
|
|
||||||
|
# Gluster configuration.
|
||||||
|
gluster_mount_dir: /mnt/gluster
|
||||||
|
gluster_volume_node_mount_dir: /mnt/xfs-drive-gluster
|
||||||
|
gluster_brick_dir: "{{ gluster_volume_node_mount_dir }}/brick"
|
||||||
|
gluster_brick_name: gluster
|
30
roles/glusterfs/server/meta/main.yml
Normal file
30
roles/glusterfs/server/meta/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
|
galaxy_info:
|
||||||
|
author: geerlingguy
|
||||||
|
description: GlusterFS installation for Linux.
|
||||||
|
company: "Midwestern Mac, LLC"
|
||||||
|
license: "license (BSD, MIT)"
|
||||||
|
min_ansible_version: 2.0
|
||||||
|
platforms:
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- 6
|
||||||
|
- 7
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- precise
|
||||||
|
- trusty
|
||||||
|
- xenial
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- wheezy
|
||||||
|
- jessie
|
||||||
|
galaxy_tags:
|
||||||
|
- system
|
||||||
|
- networking
|
||||||
|
- cloud
|
||||||
|
- clustering
|
||||||
|
- files
|
||||||
|
- sharing
|
Loading…
Reference in a new issue