Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 7 additions & 4 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

# Copyright 2023 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

---

namespace: cloudera
name: cluster
version: 4.5.0-rc1
Expand All @@ -25,13 +25,14 @@ authors:

description: >
A set of roles, modules, and other plugins for interacting with the services
and endpoints provided by the Cloudera Data Platform (CDP) for Private Cloud
and Cloudera Manager (CM).
and endpoints provided by Cloudera on Premises and Cloudera Manager (CM).
license_file: LICENSE
tags:
- cloudera
- cdp
- cdh
- private_cloud
- on_premise
- data_services
- cloudera_manager
- cm
Expand All @@ -51,3 +52,5 @@ build_ignore:
- docs
- docsrc
- site

...
3 changes: 3 additions & 0 deletions plugins/action/assemble_cluster_template.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion plugins/action/cm_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion plugins/doc_fragments/cm_endpoint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion plugins/doc_fragments/cm_options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion plugins/doc_fragments/cm_resource.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion plugins/doc_fragments/message.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion plugins/doc_fragments/purge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion plugins/filter/filters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
Expand Down
1 change: 1 addition & 0 deletions plugins/lookup/cm_license.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2025 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/lookup/cm_service.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/cluster_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/cm_controller_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc.
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/cm_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/data_context_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/host_template_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/host_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/parcel_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/role_config_group_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2025 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/role_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/service_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
11 changes: 3 additions & 8 deletions plugins/modules/assemble_cluster_template.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright 2023 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,14 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}

DOCUMENTATION = r"""
---
module: assemble_cluster_template
short_description: Merge Cloudera Manager cluster template fragments
description:
Expand Down Expand Up @@ -112,7 +108,6 @@
"""

EXAMPLES = r"""
---
- name: Assemble a cluster template from files (on the controller)
cloudera.cluster.assemble_cluster_template:
src: examples
Expand Down
107 changes: 52 additions & 55 deletions plugins/modules/cluster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,61 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import json, yaml

from ansible.module_utils.common.text.converters import to_text, to_native

from ansible_collections.cloudera.cluster.plugins.module_utils.cm_utils import (
wait_command,
ClouderaManagerModule,
ClusterTemplate,
)

from ansible_collections.cloudera.cluster.plugins.module_utils.parcel_utils import (
Parcel,
)

from ansible_collections.cloudera.cluster.plugins.module_utils.cluster_utils import (
parse_cluster_result,
)

from cm_client import (
ApiCluster,
ApiClusterList,
ApiClusterTemplate,
ApiConfig,
ApiConfigList,
ApiDataContext,
ApiHostRef,
ApiHostRefList,
ApiHostTemplate,
ApiHostTemplateList,
ApiRole,
ApiRoleList,
ApiRoleConfigGroup,
ApiRoleConfigGroupRef,
ApiRoleNameList,
ApiService,
ApiServiceConfig,
ClouderaManagerResourceApi,
ClustersResourceApi,
HostsResourceApi,
HostTemplatesResourceApi,
ParcelResourceApi,
ServicesResourceApi,
RoleConfigGroupsResourceApi,
RolesResourceApi,
ControlPlanesResourceApi,
ApiInstallEmbeddedControlPlaneArgs,
)
from cm_client.rest import ApiException

ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}

DOCUMENTATION = r"""
module: cluster
short_description: Manage the lifecycle and state of a cluster
Expand Down Expand Up @@ -817,6 +765,55 @@
returned: always
"""

import json, yaml

from ansible.module_utils.common.text.converters import to_text, to_native

from ansible_collections.cloudera.cluster.plugins.module_utils.cm_utils import (
wait_command,
ClouderaManagerModule,
ClusterTemplate,
)

from ansible_collections.cloudera.cluster.plugins.module_utils.parcel_utils import (
Parcel,
)

from ansible_collections.cloudera.cluster.plugins.module_utils.cluster_utils import (
parse_cluster_result,
)

from cm_client import (
ApiCluster,
ApiClusterList,
ApiClusterTemplate,
ApiConfig,
ApiConfigList,
ApiDataContext,
ApiHostRef,
ApiHostRefList,
ApiHostTemplate,
ApiHostTemplateList,
ApiRole,
ApiRoleList,
ApiRoleConfigGroup,
ApiRoleConfigGroupRef,
ApiRoleNameList,
ApiService,
ApiServiceConfig,
ClouderaManagerResourceApi,
ClustersResourceApi,
HostsResourceApi,
HostTemplatesResourceApi,
ParcelResourceApi,
ServicesResourceApi,
RoleConfigGroupsResourceApi,
RolesResourceApi,
ControlPlanesResourceApi,
ApiInstallEmbeddedControlPlaneArgs,
)
from cm_client.rest import ApiException


class ClouderaCluster(ClouderaManagerModule):
def __init__(self, module):
Expand Down
35 changes: 16 additions & 19 deletions plugins/modules/cluster_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright 2024 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,25 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ansible.module_utils.basic import to_native

from ansible_collections.cloudera.cluster.plugins.module_utils.cm_utils import (
ClouderaManagerModule,
)

from ansible_collections.cloudera.cluster.plugins.module_utils.cluster_utils import (
parse_cluster_result,
)

from cm_client.rest import ApiException
from cm_client import ClustersResourceApi

ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}

DOCUMENTATION = r"""
module: cluster_info
short_description: Retrieve details about one or more clusters
Expand Down Expand Up @@ -111,6 +95,19 @@
returned: always
"""

from ansible.module_utils.basic import to_native

from ansible_collections.cloudera.cluster.plugins.module_utils.cm_utils import (
ClouderaManagerModule,
)

from ansible_collections.cloudera.cluster.plugins.module_utils.cluster_utils import (
parse_cluster_result,
)

from cm_client.rest import ApiException
from cm_client import ClustersResourceApi


class ClusterInfo(ClouderaManagerModule):
def __init__(self, module):
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cm_autotls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#

# Copyright 2025 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Loading
Loading