# Install and Configure Gluster File System

**URL:** <https://forum.ansible.com/t/install-and-configure-gluster-file-system/29603>\
**Category:** Ansible Project\
**Created:** [February 3, 2019, 12:16pm UTC](https://forum.ansible.com/t/install-and-configure-gluster-file-system/29603 "2019-02-03T12:16:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ameya\_Agashe](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Post date:** [February 3, 2019, 12:16pm UTC](https://forum.ansible.com/t/install-and-configure-gluster-file-system/29603/1 "2019-02-03T12:16:40Z")

</div>

Hi Guys,

I’m not sure why the below yaml gives me an error ?

- name: Install Gluster and create file system on Cluster  
hosts: localhost  
connection: local  
tasks:
- name: create gluster volume  
gluster\_volume:  
state: present  
name: gluster\_vol1  
bricks: /bricks/brick1/g1  
rebalance: yes  
cluster:
- 192.168.1.9
- 192.168.1.7  
run\_once: true

Error message below:

TASK [create gluster volume] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: None  
fatal: [localhost]: FAILED! =\> {“changed”: false, “msg”: “error running gluster (/usr/sbin/gluster --mode=script peer status) command (rc=255): ERROR: failed to create logfile "/var/log/glusterfs/cli.log" (Permission denied)\nERROR: failed to open logfile /var/log/glusterfs/cli.log\n”}

Any assistance would be appreciated.

Thanks and Regards,  
Ameya Agashe

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [February 3, 2019, 1:18pm UTC](https://forum.ansible.com/t/install-and-configure-gluster-file-system/29603/2 "2019-02-03T13:18:16Z")

</div>

The playbook is running at the user you started ansible-playbook with.  
This user have no permission in /var/log/glusterfs.

You probably need to run this as root/sudo, and that's called become in Ansible  
Good staring point is here  
[https://docs.ansible.com/ansible/latest/user\_guide/become.html](https://docs.ansible.com/ansible/latest/user_guide/become.html)
