wip glusterfs
This commit is contained in:
45
ansible-5/roles/geerlingguy.glusterfs/tasks/setup-Debian.yml
Normal file
45
ansible-5/roles/geerlingguy.glusterfs/tasks/setup-Debian.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
- name: Ensure dependencies are installed.
|
||||
apt:
|
||||
name:
|
||||
- gnupg2
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
state: present
|
||||
|
||||
- name: Ensure repository pubkey for GlusterFS is present.
|
||||
apt_key:
|
||||
url: 'https://download.gluster.org/pub/gluster/glusterfs/{{ glusterfs_gpg_key_version }}/rsa.pub'
|
||||
state: present
|
||||
register: glusterfs_pub_key_added
|
||||
|
||||
- name: Get the DEB architecture.
|
||||
command: dpkg --print-architecture
|
||||
changed_when: false
|
||||
register: deb_architecture
|
||||
|
||||
- name: Ensure debian repo is present.
|
||||
apt_repository:
|
||||
repo: "deb https://download.gluster.org/pub/gluster/glusterfs/{{ glusterfs_deb_version }}/Debian/\
|
||||
{{ ansible_distribution_release }}/{{ deb_architecture.stdout }}/apt {{ ansible_distribution_release }} \
|
||||
main"
|
||||
state: present
|
||||
filename: gluster
|
||||
register: glusterfs_deb_source_added
|
||||
|
||||
- name: Ensure GlusterFS will reinstall if the DEB source was just added.
|
||||
apt:
|
||||
name:
|
||||
- glusterfs-server
|
||||
- glusterfs-client
|
||||
state: absent
|
||||
when: glusterfs_deb_source_added.changed
|
||||
tags: ['skip_ansible_lint']
|
||||
|
||||
- name: Ensure GlusterFS is installed.
|
||||
apt:
|
||||
name:
|
||||
- glusterfs-server
|
||||
- glusterfs-client
|
||||
state: present
|
||||
default_release: "{{ glusterfs_default_release }}"
|
||||
Reference in New Issue
Block a user