feat: added install netdata
This commit is contained in:
@@ -21,4 +21,7 @@ swarm_init: false
|
|||||||
docker_cron_path: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
|
docker_cron_path: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
|
||||||
docker_cronjob_prune: true
|
docker_cronjob_prune: true
|
||||||
|
|
||||||
docker_compose_deploy: true
|
docker_compose_deploy: false
|
||||||
|
docker_netdata_install: false
|
||||||
|
docker_netdata_port: 19999
|
||||||
|
docker_netdata_version: 'v1.44.2'
|
||||||
|
|||||||
@@ -17,3 +17,7 @@
|
|||||||
- name: Configure docker system prune with cron
|
- name: Configure docker system prune with cron
|
||||||
when: docker_cronjob_prune
|
when: docker_cronjob_prune
|
||||||
include_tasks: prune.yml
|
include_tasks: prune.yml
|
||||||
|
|
||||||
|
- name: install netdata
|
||||||
|
when: docker_netdata_install
|
||||||
|
include_tasks: netdata.yml
|
||||||
|
|||||||
26
tasks/netdata.yml
Normal file
26
tasks/netdata.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
- name: Deploy Netdata Docker container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: netdata
|
||||||
|
image: "netdata/netdata:{{ docker_netdata_version }}"
|
||||||
|
hostname: "{{ ansible_hostname }}"
|
||||||
|
restart_policy: always
|
||||||
|
pid_mode: host
|
||||||
|
published_ports:
|
||||||
|
- "{{ docker_netdata_port }}:19999"
|
||||||
|
capabilities:
|
||||||
|
- SYS_PTRACE
|
||||||
|
- SYS_ADMIN
|
||||||
|
security_opts:
|
||||||
|
- apparmor:unconfined
|
||||||
|
volumes:
|
||||||
|
- /mnt/docker/netdata/etc:/etc/netdata
|
||||||
|
- /mnt/docker/netdata/var_lib:/var/lib/netdata
|
||||||
|
- /mnt/docker/netdata/var_cache:/var/cache/netdata
|
||||||
|
- /etc/passwd:/host/etc/passwd:ro
|
||||||
|
- /etc/group:/host/etc/group:ro
|
||||||
|
- /proc:/host/proc:ro
|
||||||
|
- /sys:/host/sys:ro
|
||||||
|
- /etc/os-release:/host/etc/os-release:ro
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
state: started
|
||||||
Reference in New Issue
Block a user