|  | 
|  | 1 | +# cm_repo | 
|  | 2 | + | 
|  | 3 | +Manage the package repository for Cloudera Manager. | 
|  | 4 | + | 
|  | 5 | +This role manages the configuration of the package repository used for downloading and installing Cloudera Manager binaries. It provides flexible options to configure access to various repository types, including Cloudera's trial archives, enterprise archives requiring authentication, and custom private repositories. | 
|  | 6 | + | 
|  | 7 | +The role will: | 
|  | 8 | +- Add or configure the appropriate package repository (e.g., YUM/APT) for Cloudera Manager. | 
|  | 9 | +- Handle authentication for enterprise or custom repositories using provided username and password. | 
|  | 10 | +- Optionally configure GPG key validation for repository contents. | 
|  | 11 | +- Enable the repository for package installation. | 
|  | 12 | + | 
|  | 13 | +# Requirements | 
|  | 14 | + | 
|  | 15 | +- Internet access from the target host to the specified package repository URL. | 
|  | 16 | +- Appropriate system permissions to manage package repositories (e.g., root access or sudo privileges). | 
|  | 17 | + | 
|  | 18 | +# Dependencies | 
|  | 19 | + | 
|  | 20 | +None. | 
|  | 21 | + | 
|  | 22 | +# Parameters | 
|  | 23 | + | 
|  | 24 | +| Variable | Type | Required | Default | Description | | 
|  | 25 | +| --- | --- | --- | --- | --- | | 
|  | 26 | +| `cloudera_manager_version` | `str` | `False` | `7.11.3` | Version of Cloudera Manager for which the repository is being configured. If not defined and `cloudera_manager_repo_username` is not set, it will typically default to a trial version like `7.4.4`, if compatible with the OS distribution and if the `cloudera_manager_repo_url` is not explicitly set to an enterprise archive. | | 
|  | 27 | +| `cloudera_manager_repo_url` | `str` | `False` | - | Base URL for the package repository. If not defined and `cloudera_manager_repo_username` is set, it will default to the Cloudera enterprise archive URL for the specified version. Otherwise, it defaults to the Cloudera trial archive URL. | | 
|  | 28 | +| `cloudera_manager_repo_username` | `str` | `False` | | Username for authenticating to the package repository. For Cloudera enterprise licenses, this corresponds to the `uuid` value provided by Cloudera. | | 
|  | 29 | +| `cloudera_manager_repo_password` | `str` | `False` | | Password for authenticating to the package repository. For Cloudera enterprise licenses, this corresponds to the derived `password` value associated with your `uuid`. | | 
|  | 30 | +| `cloudera_manager_repo_key` | `str` | `False` | | URL to the package repository's GPG public key for content validation. | | 
|  | 31 | +| `cloudera_manager_repo_gpgcheck` | `bool` | `False` | - | Flag to manage validation checks (GPG checks) of the repository contents. Set to `true` to enable GPG signature verification during package installation. | | 
|  | 32 | + | 
|  | 33 | +# Example Playbook | 
|  | 34 | + | 
|  | 35 | +```yaml | 
|  | 36 | +- hosts: all | 
|  | 37 | +  tasks: | 
|  | 38 | +    - name: Configure Cloudera Manager trial repository (default version) | 
|  | 39 | +      ansible.builtin.import_role: | 
|  | 40 | +        name: cloudera.exe.cm_repo | 
|  | 41 | +      vars: | 
|  | 42 | +        # cloudera_manager_version and cloudera_manager_repo_url will use their implicit defaults for trial. | 
|  | 43 | +        # No username/password needed. | 
|  | 44 | + | 
|  | 45 | +    - name: Configure Cloudera Manager enterprise repository for a specific version | 
|  | 46 | +      ansible.builtin.import_role: | 
|  | 47 | +        name: cloudera.exe.cm_repo | 
|  | 48 | +      vars: | 
|  | 49 | +        cloudera_manager_version: 7.11.3 | 
|  | 50 | +        cloudera_manager_repo_username: "YOUR_UUID_HERE" # Replace with your actual UUID | 
|  | 51 | +        cloudera_manager_repo_password: "YOUR_PASSWORD_HERE" # Replace with your actual password | 
|  | 52 | +        # cloudera_manager_repo_url will default to the enterprise archive for 7.11.3 | 
|  | 53 | + | 
|  | 54 | +    - name: Configure a custom Cloudera Manager repository | 
|  | 55 | +      ansible.builtin.import_role: | 
|  | 56 | +        name: cloudera.exe.cm_repo | 
|  | 57 | +      vars: | 
|  | 58 | +        cloudera_manager_version: 7.11.1 # Example specific version | 
|  | 59 | +        cloudera_manager_repo_url: "http://my-internal-repo.example.com/cm/7.11.1/" | 
|  | 60 | +        cloudera_manager_repo_username: "internal_user" | 
|  | 61 | +        cloudera_manager_repo_password: "internal_password" | 
|  | 62 | +        cloudera_manager_repo_key: "http://my-internal-repo.example.com/gpg/repo.key" | 
|  | 63 | +        cloudera_manager_repo_gpgcheck: true | 
|  | 64 | +``` | 
|  | 65 | +
 | 
|  | 66 | +## License | 
|  | 67 | +
 | 
|  | 68 | +``` | 
|  | 69 | +Copyright 2024 Cloudera, Inc. | 
|  | 70 | + | 
|  | 71 | +Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 72 | +you may not use this file except in compliance with the License. | 
|  | 73 | +You may obtain a copy of the License at | 
|  | 74 | + | 
|  | 75 | +  https://www.apache.org/licenses/LICENSE-2.0 | 
|  | 76 | + | 
|  | 77 | +Unless required by applicable law or agreed to in writing, software | 
|  | 78 | +distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 79 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 80 | +See the License for the specific language governing permissions and | 
|  | 81 | +limitations under the License. | 
|  | 82 | +``` | 
0 commit comments