wip glusterfs
This commit is contained in:
29
ansible-5/roles/glusterfs/tasks/install.yaml
Normal file
29
ansible-5/roles/glusterfs/tasks/install.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
# main tasks for installing glusterfs
|
||||
|
||||
|
||||
# install packages
|
||||
- name: Ensure glusterfs server is installed.
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
state: latest
|
||||
with_items:
|
||||
- glusterfs-server
|
||||
- xfsprogs
|
||||
- xfsdump
|
||||
|
||||
- name: Start service k3s, if not started
|
||||
block:
|
||||
- name: start on home
|
||||
ansible.builtin.service:
|
||||
name: glusterd
|
||||
state: started
|
||||
when: "ansible_lsb.major_release >= '20'"
|
||||
|
||||
- name: start on cubox-i
|
||||
ansible.builtin.service:
|
||||
name: glusterfs-server
|
||||
state: started
|
||||
when: "ansible_lsb.major_release < '20'"
|
||||
Reference in New Issue
Block a user