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)
* Update zfs.py Added support for snapshots when working with a root zvol that contains no / in its path. * Added Changelog Fragment
This commit is contained in:
parent
e5da25915d
commit
13fb60f58f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/zfs-root-snapshot.yml
Normal file
2
changelogs/fragments/zfs-root-snapshot.yml
Normal 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).
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue