Browse Source

kube.py support kubeconfig (#9982)

pull/9986/head
Samuel Liu 1 year ago
committed by GitHub
parent
commit
73ce6aef97
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions
  1. 9
      plugins/modules/kube.py

9
plugins/modules/kube.py

@ -46,6 +46,11 @@ options:
default: null
description:
- The url for the API server that commands are executed against.
kubeconfig:
required: false
default: null
description:
- The path to the kubeconfig.
force:
required: false
default: false
@ -126,6 +131,9 @@ class KubeManager(object):
if module.params.get('server'):
self.base_cmd.append('--server=' + module.params.get('server'))
if module.params.get('kubeconfig'):
self.base_cmd.append('--kubeconfig=' + module.params.get('kubeconfig'))
if module.params.get('log_level'):
self.base_cmd.append('--v=' + str(module.params.get('log_level')))
@ -309,6 +317,7 @@ def main():
resource=dict(),
label=dict(),
server=dict(),
kubeconfig=dict(),
kubectl=dict(),
force=dict(default=False, type='bool'),
wait=dict(default=False, type='bool'),

Loading…
Cancel
Save