57 lines
1.1 KiB
YAML
57 lines
1.1 KiB
YAML
|
---
|
||
|
- hosts: playgrounds
|
||
|
become: true
|
||
|
become_user: root
|
||
|
|
||
|
tasks:
|
||
|
- name: Copy hosts
|
||
|
template:
|
||
|
src: hosts
|
||
|
dest: /etc/hosts
|
||
|
- name: Copy sudoers
|
||
|
template:
|
||
|
src: sudoers
|
||
|
dest: /etc/sudoers
|
||
|
- name: Copy bashrc
|
||
|
template:
|
||
|
src: bashrc
|
||
|
dest: /home/losted/.bashrc
|
||
|
|
||
|
- name: Install glusterfs
|
||
|
apt:
|
||
|
name: glusterfs-server
|
||
|
state: present
|
||
|
update_cache: yes
|
||
|
- name: Start glusterd
|
||
|
ansible.builtin.systemd:
|
||
|
name: glusterd.service
|
||
|
state: started
|
||
|
enabled: yes
|
||
|
|
||
|
- name: create gluster volume
|
||
|
gluster.gluster.gluster_volume:
|
||
|
state: present
|
||
|
name: gv0
|
||
|
bricks: /gl
|
||
|
#replicas: 2
|
||
|
force: yes
|
||
|
cluster:
|
||
|
- shit1
|
||
|
- shit2
|
||
|
- shit3
|
||
|
- shit4
|
||
|
options:
|
||
|
performance.cache-size: 256MB
|
||
|
#run_once: true
|
||
|
|
||
|
# - name: Tune gluster
|
||
|
# gluster.gluster.gluster_volume:
|
||
|
# state: present
|
||
|
# name: gv0
|
||
|
|
||
|
|
||
|
- name: Start gluster volume
|
||
|
gluster.gluster.gluster_volume:
|
||
|
state: started
|
||
|
name: gv0
|