Refreshed modules

This commit is contained in:
Chris Houseknecht
2017-04-05 07:29:33 -04:00
parent 8a7f78993f
commit c5f86cc9b8
158 changed files with 5973 additions and 3158 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python
from ansible.module_utils.k8s_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
DOCUMENTATION = '''
module: k8s_v1_node
@@ -130,7 +130,7 @@ options:
- Whether or not to verify the API server's SSL certificates.
type: bool
requirements:
- openshift == 1.0.0-snapshot
- kubernetes == 1.0.0
'''
EXAMPLES = '''
@@ -498,17 +498,16 @@ node:
def main():
try:
module = OpenShiftAnsibleModule('node', 'V1')
except OpenShiftAnsibleException as exc:
module = KubernetesAnsibleModule('node', 'V1')
except KubernetesAnsibleException as exc:
# The helper failed to init, so there is no module object. All we can do is raise the error.
raise Exception(exc.message)
try:
module.execute_module()
except OpenShiftAnsibleException as exc:
except KubernetesAnsibleException as exc:
module.fail_json(msg="Module failed!", error=str(exc))
if __name__ == '__main__':
main()