mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07:00
solaris_zone: fix zone configuration with python3 (#1082)
* * Explicitly open up temporary file in text mode. * Add test for `solaris_zone` creation. * Update changelog fragment. Co-authored-by: Felix Fontein <felix@fontein.de> * Add tests for zone deletion and invalid zone names. Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
da7f9ffc3f
commit
555eb62199
3 changed files with 119 additions and 1 deletions
|
@ -193,7 +193,7 @@ class Zone(object):
|
|||
self.module.fail_json(msg='Missing required argument: path')
|
||||
|
||||
if not self.module.check_mode:
|
||||
t = tempfile.NamedTemporaryFile(delete=False)
|
||||
t = tempfile.NamedTemporaryFile(delete=False, mode='wt')
|
||||
|
||||
if self.sparse:
|
||||
t.write('create %s\n' % self.create_options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue