Use a more modern style for gluster/client yaml
Use pkg rather than yum, for future proofing with dnf
This commit is contained in:
parent
96787cc4be
commit
8b36a77515
1 changed files with 17 additions and 8 deletions
|
@ -1,24 +1,33 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: install needed packages
|
- name: install needed packages
|
||||||
yum: pkg={{ item }} state=present
|
pkg:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- glusterfs-fuse
|
- glusterfs-fuse
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
- name: make the mountdir
|
- name: make the mountdir
|
||||||
file: state=directory path={{ mountdir }} owner={{ owner }} group={{ group }}
|
file:
|
||||||
|
state: directory
|
||||||
|
path: "{{ mountdir }}"
|
||||||
|
owner: "{{ owner }}"
|
||||||
|
group: "{{ group }}"
|
||||||
|
|
||||||
- name: copy over the client config
|
- name: copy over the client config
|
||||||
template: src=client.config dest=/etc/glusterfs/glusterfs.{{name}}.vol mode=0640
|
template:
|
||||||
|
src: client.config
|
||||||
|
dest: /etc/glusterfs/glusterfs.{{name}}.vol
|
||||||
|
mode: 0640
|
||||||
#notify:
|
#notify:
|
||||||
#- remount? no idea...
|
#- remount? no idea...
|
||||||
|
|
||||||
- name: mount it up
|
- name: mount it up
|
||||||
mount: >
|
mount:
|
||||||
src=/etc/glusterfs/glusterfs.{{name}}.vol
|
src: /etc/glusterfs/glusterfs.{{name}}.vol
|
||||||
state=mounted
|
state: mounted
|
||||||
fstype=glusterfs
|
fstype: glusterfs
|
||||||
name={{mountdir}}
|
name: "{{mountdir}}"
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue