Install Netdata
This commit is contained in:
		
						commit
						e511b71706
					
				|  | @ -0,0 +1,6 @@ | |||
| 
 | ||||
| ## v1.0 | ||||
| 
 | ||||
| ### Features | ||||
| * Install Netdata. | ||||
| * Can choose to install recommends packages. | ||||
|  | @ -0,0 +1,59 @@ | |||
| # Netdata | ||||
| 
 | ||||
| 1. [Overview](#overview) | ||||
| 2. [Role Variables](#role-variables) | ||||
| 3. [Example Playbook](#example-playbook) | ||||
| 4. [Configuration](#configuration) | ||||
| 5. [Development](#development) | ||||
| 6. [License](#license) | ||||
| 7. [Author Information](#author-information) | ||||
| 
 | ||||
| ## Overview | ||||
| 
 | ||||
| A role to manage Netdata installation and configuration. | ||||
| 
 | ||||
| ## Role Variables | ||||
| 
 | ||||
| * **netdata__base_packages** : List of base packages in order to provide Netdata [default : `netdata`]. | ||||
| * **netdata__install_recommends** : If recommends packages should be install [default : `True`]. | ||||
| * **netdata__deploy_state** : The desired state this role should achieve. [default : `present`]. | ||||
| 
 | ||||
| ## Example Playbook | ||||
| 
 | ||||
| * Use defaults vars : | ||||
| 
 | ||||
| ``` yaml | ||||
| - hosts: mynode.domain | ||||
|   roles: | ||||
|     - role: ipr-cnrs.netdata | ||||
|       tags: ['role::netdata', 'ipr'] | ||||
| ``` | ||||
| 
 | ||||
| ## Configuration | ||||
| 
 | ||||
| This role will : | ||||
| * Install needed packages to provide `netdata` service. | ||||
| 
 | ||||
| ## Development | ||||
| 
 | ||||
| This source code comes from our [Gogs instance][netdata source] and the [Github repo][netdata github] exist just to be able to send the role to Ansible Galaxy… | ||||
| 
 | ||||
| But feel free to send issue/PR here :) | ||||
| 
 | ||||
| Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][netdata source] :) | ||||
| 
 | ||||
| ## License | ||||
| 
 | ||||
| [WTFPL][wtfpl website] | ||||
| 
 | ||||
| ## Author Information | ||||
| 
 | ||||
| Jérémy Gardais | ||||
| * Source : [on IPR's Gogs][netdata source] | ||||
| * [IPR][ipr website] (Institut de Physique de Rennes) | ||||
| 
 | ||||
| [gogs to github hook]: https://stackoverflow.com/a/21998477 | ||||
| [netdata source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.netdata | ||||
| [netdata github]: https://github.com/ipr-cnrs/netdata | ||||
| [wtfpl website]: http://www.wtfpl.net/about/ | ||||
| [ipr website]: https://ipr.univ-rennes1.fr/ | ||||
|  | @ -0,0 +1,39 @@ | |||
| --- | ||||
| # .. vim: foldmarker=[[[,]]]:foldmethod=marker | ||||
| 
 | ||||
| # ipr-cnrs.netdata default variables [[[ | ||||
| # ====================================== | ||||
| 
 | ||||
| # Packages and installation [[[ | ||||
| # ----------------------------- | ||||
| 
 | ||||
| # .. envvar:: netdata__base_packages [[[ | ||||
| # | ||||
| # List of base packages to install. | ||||
| netdata__base_packages: | ||||
|     - 'netdata' | ||||
|                                                                        # ]]] | ||||
| # .. envvar:: netdata__install_recommends [[[ | ||||
| # | ||||
| # If recommended packages should be install ? Possible options : | ||||
| # | ||||
| # ``True`` | ||||
| #   Default. Ensure all probes can work. | ||||
| # | ||||
| # ``False`` | ||||
| # | ||||
| netdata__install_recommends: True | ||||
|                                                                    # ]]] | ||||
| # .. envvar:: netdata__deploy_state [[[ | ||||
| # | ||||
| # What is the desired state which this role should achieve ? Possible options : | ||||
| # | ||||
| # ``present`` | ||||
| #   Default. Ensure that netdata is installed and configured as requested. | ||||
| # | ||||
| # ``absent`` | ||||
| #   Ensure that netdata is uninstalled and it's configuration is removed. | ||||
| # | ||||
| netdata__deploy_state: 'present' | ||||
|                                                                    # ]]] | ||||
|                                                                    # ]]] | ||||
|  | @ -0,0 +1,15 @@ | |||
| galaxy_info: | ||||
|   author: "Jérémy Gardais" | ||||
|   description: "Manage Netdata configuration" | ||||
|   license: WTFPL | ||||
|   company: IPR | ||||
|   issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.netadata/issues | ||||
|   min_ansible_version: 2.6 | ||||
|   platforms: | ||||
|   - name: Debian | ||||
|     versions: | ||||
|     - stretch | ||||
|   galaxy_tags: | ||||
|     - system | ||||
|     - netadata | ||||
|     - monitoring | ||||
|  | @ -0,0 +1,15 @@ | |||
| --- | ||||
| # .. vim: foldmarker=[[[,]]]:foldmethod=marker | ||||
| # | ||||
| # tasks file for netdata | ||||
| 
 | ||||
| # Manage base system packages [[[1 | ||||
| - name: Ensure base packages are in there desired state | ||||
|   package: | ||||
|     name: '{{ item }}' | ||||
|     state: '{{ "present" if (netdata__deploy_state == "present") else "absent" }}' | ||||
|     install_recommends: '{{ netdata__install_recommends | bool }}' | ||||
|   with_flattened: | ||||
|     - '{{ netdata__base_packages }}' | ||||
| 
 | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue