Commit 1f5b5d59 authored by zhong.du's avatar zhong.du
Browse files

Update README.md

parent bb3ede52
No related merge requests found
Showing with 26 additions and 38 deletions
+26 -38
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
#### 1.功能简介
创建grafana数据源。
#### 2.参数描述
| key | value | describe |
| ------ | ------ | ------ |
| grafana_url | 192.168.217.144 | grafana地址 |
| datasource_url | 192.168.217.144:3000 | 数据源地址 |
| datasource_type | alexanderzobnin-zabbix-datasource | 数据源类型 |
| datasource_name | test5 | 数据源名称 |
| grafana_user | admin | grafana用户名 |
| grafana_password | 123456 | grafana密码 |
| zabbix_passwd | admin | zabbix密码 |
| zabbix_user | admin | zabbix用户名 |
| grafana_enable_plugin | "http://{{grafana_user}}:{{grafana_password}}@{{ grafana_url}}:3000/api/plugins/alexanderzobnin-zabbix-app/settings" | grafana启用插件 |
#### 3.具体部署
##### deploy.yml:
``` ansible
- hosts: server
roles:
- create-grafana-datasource
```
#### 4.运行
``` shell
ansible-galaxy install -r dependencies.yml -p ./roles #下载ansible roles
ansible-playbook -i host deploy.yml --extra-vars "appname= tomcat1 " #执行ansible roles
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment