Download Ansible Playbooks for Confluent Platform
Download Confluent Platform Ansible collection
Starting in Confluent Platform 7.0, Ansible is packaged as an Ansible Collection.
If you are using Ansible 2.11 or higher, download the Ansible Playbooks for Confluent Platform collection using the ansible-galaxy command as described in this section.
You can download the Ansible Playbooks for Confluent Platform collection from the following places:
Ansible Automation Hub
Ansible Galaxy
GitHub
Download the Confluent Platform collection from Ansible Automation Hub
To install Confluent Platform collection from Ansible Automation Hub, follow the steps in this section.
Edit the
ansible.cfgfile in<collection_parent_dir>/confluent/platform/ansible.cfgto configure Red Hat Automation Hub as your default collection server. For example:[defaults] hash_behaviour=merge callback_whitelist=profile_tasks remote_tmp=~/.ansible/tmp collections_paths=~/.ansible/collections:../../../ [ssh_connection] pipelining = True timeout=30 [galaxy] server_list = automation_hub [galaxy_server.automation_hub] url=https://console.redhat.com/api/automation-hub/content/inbound-confluent/ auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token token=<provide token here>
Install the collection from Red Hat Automation Hub using the following command:
ansible-galaxy collection install confluent.platform
For details, see Getting Started with Red Hat Ansible Automation Hub.
Download the Confluent Platform collection from Ansible Galaxy
Get the latest Confluent collection from Ansible Galaxy using the following command:
ansible-galaxy collection install confluent.platform
The command downloads the collection into your default collections directory, ~/.ansible/collections/ansible_collections/confluent/platform/.
You can get a specific version by appending the version number along with the package name. For example:
ansible-galaxy collection install confluent.platform:7.0.17
- To download the Confluent collection behind a proxy, run the following command
with the
https_proxyenvironment variable:
https_proxy=http://proxy-server:port/ \
ansible-galaxy collection install confluent.platform
For more details on package installation from Ansible Galaxy, see Galaxy User Guide.
Download the Confluent Platform collection from the GitHub source repository
As an alternative to the recommended methods above, you can install the package directly from the source repository.
To download Ansible Playbooks for Confluent Platform onto your controller, run the following command. The command pulls the roles and playbooks into your default collections directory.
ansible-galaxy collection install \
git+https://github.com/confluentinc/cp-ansible.git
Additionally, you can specify a branch of Ansible Playbooks for Confluent Platform with the following command. 7.0 or higher is supported for <branch>.
ansible-galaxy collection install \
git+https://github.com/confluentinc/cp-ansible.git,<branch>
Configure Hash Merging
Ansible Playbooks for Confluent Platform requires hash merging to be enabled. Configure the setting in your Ansible configuration file as below:
[defaults]
hash_behaviour=merge
Download Playbooks for Ansible 2.9 or 2.10 hosts
To download Ansible Playbooks for Confluent Platform when using Ansible 2.9 or 2.10:
Create a directory with the following structure:
mkdir -p <path_to_cp-ansible>/ansible_collections/confluent/
You can put
<path_to_cp-ansible>anywhere in your directory structure, but the directory structure under<path_to_cp-ansible>should be set up exactly as specified above.Clone the Ansible Playbooks for Confluent Platform repo into the
platformdirectory inside the directory you created in the previous step:git clone https://github.com/confluentinc/cp-ansible \ <path_to_cp-ansible>/ansible_collections/confluent/platform
Important
The
cp-ansibledirectory created with the above command must not have the world-writable permissions (777). Due to a security risk, Ansible will not load the configuration file,ansible.cfgif the file is in the world-writable directory.If you do not use
git clone, make sure the permissions setting on thecp-ansiblesource code is 755.Check out the
7.0.17-postbranch:cd <path_to_cp-ansible>/ansible_collections/confluent/platform git fetch git checkout 7.0.17-post
The
masterbranch in the Ansible GitHub repo is a development branch and not meant for production deployments. Use the specific version branch for production deployments, upgrades, or testing.
Next step
Prepare Ansible Inventory File to Install Confluent Platform.