Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Ansible support on the Magician. (#7)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
  • Loading branch information
modular-magician authored and rambleraptor committed Sep 21, 2018
1 parent 8d286d7 commit 4d233d5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ def main():
if fetch:
if state == 'present':
if is_different(module, fetch):
fetch = update(module, self_link(module), kind)
fetch = update(module, self_link(module), kind, fetch)
changed = True
else:
delete(module, self_link(module), kind)
delete(module, self_link(module), kind, fetch)
fetch = {}
changed = True
else:
Expand All @@ -229,12 +229,12 @@ def create(module, link, kind):
return wait_for_operation(module, auth.post(link, resource_to_request(module)))


def update(module, link, kind):
def update(module, link, kind, fetch):
auth = GcpSession(module, 'compute')
return wait_for_operation(module, auth.put(link, resource_to_request(module)))


def delete(module, link, kind):
def delete(module, link, kind, fetch):
auth = GcpSession(module, 'compute')
return wait_for_operation(module, auth.delete(link))

Expand Down

0 comments on commit 4d233d5

Please sign in to comment.