.. _ansible-download: --------------------------- Preparing Ansible Inventory --------------------------- Downloading |ansible| ^^^^^^^^^^^^^^^^^^^^^ Run the following command to download |ansible|: :: 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 |cp|, check out the branch you want to install. For example, if you want to install |cp| |release|, check out the |release|-post branch of |ansible|. Run the following command to check out the branch: :: git checkout -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 |cp| 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|, copy the ``hosts_example.yml`` file onto the host running Ansible as ``hosts.yml``. Verifying SSH to |cp| 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.