gluster-ansible icon indicating copy to clipboard operation
gluster-ansible copied to clipboard

Clarify usage from ansible

Open nicobo opened this issue 4 years ago • 4 comments

Gluster doc directly leads to https://github.com/gluster/gluster-ansible as the preferred way to install and configure glusterfs for ansible users.

However this GitHub project doesn't clearly states how to use it from ansible :

It would be nice to clarify this, thanks!

nicobo avatar Oct 07 '19 11:10 nicobo

@nicobo you can download and install the packages from https://copr.fedorainfracloud.org/coprs/sac/gluster-ansible/packages/ for fedora or rhel.

All of the module used in gluster-ansible are integrated into ansible. You don't have to install any modules separately.

You have to define role variables and write a playbook to be called by ansible-playbook. If you download all the packages and install gluster-ansible it'll take care of installing others since it depends on them.

Examples to writing playbooks and variables can be found here: https://github.com/gluster/gluster-ansible/tree/master/playbooks

sac avatar Oct 07 '19 12:10 sac

Thanks.

Therefore I would suggest to make the Quick Start Guide simply point at the official ansible docs rather than the GitHub repo.

nicobo avatar Oct 11 '19 03:10 nicobo

How to install roles for debian ? Why is this not available on galaxy ?

EDIT : I needed to

git clone https://github.com/gluster/gluster-ansible-cluster roles/gluster.cluster

eoli3n avatar Dec 03 '19 10:12 eoli3n

I too was expecting these to be on Ansible Galaxy.

For anyone interested, you can install these the "Galaxy way" by adding the following to your requirements.yml file:

- name: gluster.infra
  src: https://github.com/gluster/gluster-ansible-infra.git

# .git at end or URL is optional
- name: gluster.cluster
  src: https://github.com/gluster/gluster-ansible-cluster

# the `name` parameter is also optional but then it installs it to gluster-ansible-features
# instead of gluster.features (or whatever you set `name` to)
- src: https://github.com/gluster/gluster-ansible-features

# repeat for each you want to install...

And run with ansible-galaxy install -r requirements.yml as usual. E.g.:

$ ansible-galaxy install -r requirements.yml
- extracting gluster.infra to /home/ollie/.ansible/roles/gluster.infra
- gluster.infra was installed successfully
- extracting gluster.cluster to /home/ollie/.ansible/roles/gluster.cluster
- gluster.cluster was installed successfully
- extracting gluster-ansible-features to /home/ollie/.ansible/roles/gluster-ansible-features
- gluster-ansible-features was installed successfully

outdooracorn avatar May 02 '20 15:05 outdooracorn