# Bindplane OTel Collector

[Ansible](https://www.ansible.com/) can be used as an alternative to the collector install script. The [Bindplane Collector Ansible Role](https://github.com/observIQ/bindplane-agent-ansible) can be integrated into your Ansible playbooks to manage the installation of Bindplane-managed collectors.

Ansible is useful for installing collectors at scale, where the installation script would be cumbersome to manage on hundreds or thousands of systems.

#### Usage

The Bindplane Collector role must be cloned to your workstation and added to your playbook before it can be deployed.

**Clone Repo**

Clone the Ansible Role Git repository to your `roles` directory.

The following command will clone the [repository](https://github.com/observIQ/bindplane-agent-ansible) to the directory `roles/bindplane_agent`.

```bash
git clone https://github.com/observIQ/bindplane-agent-ansible.git roles/bindplane_agent
```

**Update Playbook**

Update your Ansible Playbook to include the `bindplane_agent` role. The role requires the following parameters:

* version: Bindplane Collector version
* endpoint: The [remote URL](/configuration/bindplane.md#remote-url) of the Bindplane server
* secret\_key: The secret key of the Bindplane server. You can find the secret key on the install agent page, or with the CLI command `bindplane secret get`.

```yaml
- name: my-playbook
  hosts: my-hosts
  become: yes
  roles:
    - role: bindplane_agent
      version: '1.39.1'
      endpoint: 'wss://app.bindplane.com/v1/opamp'
      secret_key: 'xxxx-xxxx-xxxxx-xxxx'
```

**Deploy**

Once the role is configured in your playbook, you can deploy the collectors to your host group. For example:

```bash
ansible-playbook playbook.yml -i ./site.yml
```

This command assumes you have a playbook file `playbook.yml` and a site file `site.yml` in your working directory, along with the `roles/bindplane_agent` directory.

#### Additional Documentation

A comprehensive list of configuration options can be found in the [Bindplane Collector Role](https://github.com/observIQ/bindplane-agent-ansible) Github repository.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/deployment/ansible/bindplane-otel-collector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
