Skip to content

Commit

Permalink
Merge pull request #70 from citrix/citrix_adm_stylebook_hotfix
Browse files Browse the repository at this point in the history
Fix stylebook return value function
  • Loading branch information
George Nikolopoulos authored Dec 7, 2018
2 parents 4a0b7d7 + ea12958 commit 97a7bd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions ansible-modules/citrix_adm_stylebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ def create(self):
self.module_result['changed'] = True
if not self.module.check_mode:
self.create_stylebook()
created_stylebook = self.get_stylebook()
self.module_result.update(dict(stylebook=created_stylebook))

def delete_stylebook(self):
# Check if all attributes are present
Expand Down Expand Up @@ -289,6 +287,9 @@ def main(self):

if self.module.params['state'] == 'present':
self.create()
if not self.module.check_mode:
created_stylebook = self.get_stylebook()
self.module_result.update(dict(stylebook=created_stylebook))
elif self.module.params['state'] == 'absent':
self.delete()

Expand Down Expand Up @@ -342,4 +343,4 @@ def main():


if __name__ == '__main__':
main()
main()
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ class ModuleExecutor(object):
self.module_result['changed'] = True
if not self.module.check_mode:
self.create_stylebook()
created_stylebook = self.get_stylebook()
self.module_result.update(dict(stylebook=created_stylebook))

def delete_stylebook(self):
# Check if all attributes are present
Expand Down Expand Up @@ -234,6 +232,9 @@ class ModuleExecutor(object):

if self.module.params['state'] == 'present':
self.create()
if not self.module.check_mode:
created_stylebook = self.get_stylebook()
self.module_result.update(dict(stylebook=created_stylebook))
elif self.module.params['state'] == 'absent':
self.delete()

Expand Down

0 comments on commit 97a7bd7

Please sign in to comment.