Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add idempotency for user and stop signal #41

Merged
merged 1 commit into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions plugins/modules/podman_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,9 +1287,7 @@ def __init__(self, module, podman_version):
"privileged": False,
"rm": False,
"security_opt": [],
"stop_signal": 15,
"tty": False,
"user": "",
"uts": "",
}

Expand Down Expand Up @@ -1629,6 +1627,8 @@ def diffparam_security_opt(self):
def diffparam_stop_signal(self):
before = self.info['config']['stopsignal']
after = self.params['stop_signal']
if after is None:
after = before
return self._diff_update_and_compare('stop_signal', before, after)

def diffparam_tty(self):
Expand All @@ -1638,10 +1638,9 @@ def diffparam_tty(self):

def diffparam_user(self):
before = self.info['config']['user']
if self.module.params['user'] is None and before:
after = self.params['user']
if after is None:
after = before
else:
after = self.params['user']
return self._diff_update_and_compare('user', before, after)

def diffparam_uts(self):
Expand Down