1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix zfs snapshot handling on root zvols (#936) (#985)

* Update zfs.py

Added support for snapshots when working with a root zvol that contains no / in its path.

* Added Changelog Fragment

(cherry picked from commit 13fb60f58f)

Co-authored-by: Hobnob <williamhobson62@aol.com>
This commit is contained in:
patchback[bot] 2020-09-29 06:08:15 +02:00 committed by GitHub
parent 01bbab6b2c
commit 0d459e5662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- zfs - fixed ``invalid character '@' in pool name"`` error when working with snapshots on a root zvol (https://github.com/ansible-collections/community.general/issues/932).

View file

@ -90,7 +90,7 @@ class Zfs(object):
self.changed = False
self.zfs_cmd = module.get_bin_path('zfs', True)
self.zpool_cmd = module.get_bin_path('zpool', True)
self.pool = name.split('/')[0]
self.pool = name.split('/')[0].split('@')[0]
self.is_solaris = os.uname()[0] == 'SunOS'
self.is_openzfs = self.check_openzfs()
self.enhanced_sharing = self.check_enhanced_sharing()