Skip to content

Commit

Permalink
Update plugins/modules/k8s_log.py
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Graves <mgraves@redhat.com>
  • Loading branch information
stg-0 and gravesm committed Jun 29, 2021
1 parent 161137a commit 60981ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/modules/k8s_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,8 @@ def execute_module(module, k8s_ansible_mixin):
kwargs['query_params'] = dict(container=module.params['container'])

if module.params.get('since_seconds'):
if not kwargs['query_params']:
kwargs['query_params'] = dict(sinceSeconds=module.params['since_seconds'])
else:
kwargs['query_params'].update(dict(sinceSeconds=module.params['since_seconds']))
kwargs.setdefault('query_params', {}).update({'sinceSeconds': module.params['since_seconds']})


log = serialize_log(resource.log.get(
name=name,
Expand Down

0 comments on commit 60981ad

Please sign in to comment.