Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v12.2/as-code/infrastructure-as-code/ansible.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v12.2/as-code/infrastructure-as-code/ansible/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Grafana Ansible collection
The Grafana Ansible collection provides configuration management resources for Grafana. You can use it to manage resources such as dashboards, Cloud stacks, folders, and more.
The collection also houses the Grafana Agent role which can be used to deploy and manage Grafana Agent across various Linux machines.
For resources currently not available in the Grafana Ansible collection, you can manage those resources on Grafana Cloud programmatically by writing Ansible playbooks that use the Ansible’s builtin uri module to call the HTTP APIs to manage resources for the Grafana Cloud portal, as well as those within a stack.
Use the following guides to get started using Ansible to manage your Grafana Cloud stack:
| Topic | Description |
|---|---|
| Create and manage a Grafana Cloud stack using Ansible | Describes how to create a Grafana Cloud stack and add a data source and dashboard using Ansible. |
| Install Grafana Agent on a Linux host using Ansible | Describes how to install the Grafana Agent on a Linux node using Ansible and use it to push logs to Grafana Cloud. |
| Monitor multiple Linux hosts with Grafana Agent Role | Describes how to use the Grafana Ansible collection to manage agents across multiple Linux hosts. |
Was this page helpful?
Related resources from Grafana Labs


