Preparing Ansible Inventory

Downloading Ansible Playbooks for Confluent Platform

Run the following command to download Ansible Playbooks for Confluent Platform:

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

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 are not installing the latest release of Confluent Platform, check out the branch you want to install. For example, if you want to install Confluent Platform 5.4.1, check out the 5.4.1-post branch of Ansible Playbooks for Confluent Platform. Run the following command to check out the branch:

git checkout <release>-post

Generating an Inventory File

Before running the Ansible playbooks, you need to generate an inventory file. The inventory file provisions the hosts used for the Confluent Platform components. See Inventory basics: hosts and groups for more information about the Ansible inventory file.

To generate an inventory file, in the directory you installed Ansible Playbooks for Confluent Platform, copy the hosts_example.yml file onto the host running Ansible as hosts.yml.

Verifying SSH to Confluent Platform hosts

To run Ansible playbooks, it is required that the Ansible bastion can reach each host over SSH. Use the following commnand to verify that Ansible can connect over SSH:

ansible -i /path/to/hosts.yml all -m ping

If ping fails, you need to set up your ssh variables. See Connecting to hosts: behavioral inventory parameters for more information about setting up ssh variables.