devops-shit/ansible/trash/gluster-ansible/playme.yml

57 lines
1.1 KiB
YAML
Raw Normal View History

2021-08-19 17:24:46 +03:00
---
- 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