# Problem with zfs module on SmartOS?

**URL:** <https://forum.ansible.com/t/problem-with-zfs-module-on-smartos/21760>\
**Category:** Ansible Project\
**Created:** [June 13, 2016, 8:13pm UTC](https://forum.ansible.com/t/problem-with-zfs-module-on-smartos/21760 "2016-06-13T20:13:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don\_Jackson](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Don\_Jackson](https://forum.ansible.com/u/Don_Jackson)\
**Post date:** [June 13, 2016, 8:13pm UTC](https://forum.ansible.com/t/problem-with-zfs-module-on-smartos/21760/1 "2016-06-13T20:13:54Z")

</div>

Over the past month or so, the following task has consistently failed for me, because the specified dataset already exists:

- name: Create zfs datasets  
zfs:  
name: zones/images  
state: present  
become: true

The failure looks like this: (reformatted to make it a bit easier to read…)

> “changed”: false,
> 
> “failed”: true,
> 
> “module\_stderr”: “”,
> 
> “module\_stdout”: "Traceback (most recent call last):\r\n
> 
> File "/tmp/ansible\_iWcvPS/ansible\_module\_zfs.py", line 245, in \r\n main()\r\n
> 
> File "/tmp/ansible\_iWcvPS/ansible\_module\_zfs.py", line 227, in main\r\n zfs = Zfs(module, name, properties)\r\n
> 
> File "/tmp/ansible\_iWcvPS/ansible\_module\_zfs.py", line 90, in **init** \r\n self.enhanced\_sharing = self.check\_enhanced\_sharing()\r\n
> 
> File "/tmp/ansible\_iWcvPS/ansible\_module\_zfs.py", line 99, in check\_enhanced\_sharing\r\n if int(version) \>= 34:\r\nValueError: invalid literal for int() with base 10: ‘-’\r\n",
> 
> “msg”: “MODULE FAILURE”,
> 
> “parsed”: false
> 
> }

Is there a fix or workaround available?  
For now I am just setting ignore\_errors: true

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [June 13, 2016, 8:15pm UTC](https://forum.ansible.com/t/problem-with-zfs-module-on-smartos/21760/2 "2016-06-13T20:15:05Z")

</div>

There seems to be an issue filed for this exact traceback: [https://github.com/ansible/ansible-modules-extras/issues/2415](https://github.com/ansible/ansible-modules-extras/issues/2415)
