Download Ansible Playbooks for Confluent Platform

This topic describes how to download Ansible Playbooks for Confluent Platform as the first step in the installation process.

Download Ansible Playbooks for Confluent Platform for Ansible 2.11 or higher hosts

If you are using Ansible 2.11 or higher, download the Ansible Playbooks for Confluent Platform collection using ansible-galaxy as described in this section.

Starting in Confluent Platform 7.0, Ansible is packaged as an Ansible Collection.

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 Ansible Playbooks for Confluent Platform for Ansible 2.9 or 2.10 hosts

To download Ansible Playbooks for Confluent Platform when using Ansible 2.9 or 2.10:

  1. Clone the Ansible Playbooks for Confluent Platform repo:

    git clone https://github.com/confluentinc/cp-ansible
    

    Important

    The cp-ansible directory 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.cfg if the file is in the world-writable directory.

    If you do not use git clone, make sure the permissions setting on the cp-ansible source code is 755.

  2. Check out the branch. Confluent Platform 7.0.1 does not support installation using Ansible 2.9 or 2.10. As a workaround, checkout an older version branch, such as 6.2.0-post and follow the workflow described in Use Ansible 2.9 or 2.10 to install Confluent Platform.

    cd cp-ansible
    git fetch
    git checkout 6.2.0-post
    

    The master branch 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.