Skip to content

Instantly share code, notes, and snippets.

@arsatiki
Created July 16, 2013 06:28
Show Gist options
  • Save arsatiki/6006264 to your computer and use it in GitHub Desktop.
Save arsatiki/6006264 to your computer and use it in GitHub Desktop.
Ansible ZFS module parameter handling error
PLAY [Test ZFS] ***************************************************************
TASK: [Set ZFS sharenfs parameter (expected)] *********************************
failed: [10.0.0.13] => {"failed": true}
msg: cannot open '10.0.0.80': dataset does not exist
cannot open '-mask': dataset does not exist
cannot open '255.255.255.255': dataset does not exist
...ignoring
TASK: [Set sharenfs parameter (workaround)] ***********************************
changed: [10.0.0.13]
PLAY RECAP ********************************************************************
10.0.0.13 : ok=2 changed=1 unreachable=0 failed=0
---
- name: Test ZFS
hosts: zardoz
user: ars
sudo: yes
gather_facts: no
tasks:
- name: Set ZFS sharenfs parameter (expected)
zfs: name=data/share state=present
sharenfs="-network 10.0.0.80 -mask 255.255.255.255"
ignore_errors: yes
- name: Set sharenfs parameter (workaround)
zfs: name=data/share state=present
sharenfs='"-network 10.0.0.80 -mask 255.255.255.255"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment