mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Reclaiming netdata
This commit is contained in:
parent
fa7d75d89f
commit
20a35dfe62
1 changed files with 17 additions and 4 deletions
|
@ -12,10 +12,15 @@
|
|||
state: started
|
||||
healthcheck:
|
||||
test: curl localhost:19999
|
||||
image: netdata/netdata
|
||||
image: netdata/netdata:latest
|
||||
ports: 19999:19999
|
||||
pull: yes
|
||||
hostname: "{{ ansible_hostname }}"
|
||||
container_default_behavior: no_defaults
|
||||
capabilities:
|
||||
- SYS_PTRACE
|
||||
security_opts:
|
||||
- apparmor:unconfined
|
||||
env:
|
||||
MONITOR_URL: "https://{{ ansible_ssh_host }}/monitor"
|
||||
STAGING: "True"
|
||||
|
@ -25,12 +30,12 @@
|
|||
- /srv/newsblur/docker/netdata/netdataconfig/python.d.conf:/usr/lib/netdata/conf.d/python.d.conf
|
||||
- /srv/newsblur/docker/netdata/netdataconfig/conf/:/usr/lib/netdata/conf.d/python.d/
|
||||
- /srv/newsblur/docker/netdata/netdataconfig/charts/newsblur.chart.py:/usr/libexec/netdata/python.d/newsblur.chart.py
|
||||
|
||||
- /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
|
||||
notify: restart netdata
|
||||
|
||||
|
||||
|
@ -55,6 +60,14 @@
|
|||
become: yes
|
||||
when: reclaim == false
|
||||
|
||||
- name: Check if reclaiming
|
||||
debug: msg=Reclaiming
|
||||
changed_when: yes
|
||||
register: reclaim
|
||||
tags:
|
||||
- never
|
||||
- reclaim
|
||||
|
||||
- name: Re-claim a node to Netdata Cloud
|
||||
block:
|
||||
|
||||
|
@ -69,8 +82,8 @@
|
|||
when: uuidgen_result.stat.exists == false
|
||||
|
||||
- name: Reclaim the node with `-id=`
|
||||
command: "docker exec netdata netdata-claim.sh -token={{ netdata_token }} -rooms={{ netdata_room }} -url={{ netdata_url }} -id=$(uuidgen -hostname={{ ansible_hostname }}"
|
||||
command: "docker exec netdata netdata-claim.sh -token={{ netdata_token }} -rooms={{ netdata_room }} -url={{ netdata_url }} -id=$(uuidgen) -hostname={{ ansible_hostname }}"
|
||||
when: uuidgen_result.stat.exists == true
|
||||
notify: restart netdata
|
||||
become: yes
|
||||
when: reclaim == true
|
||||
when: reclaim is defined
|
||||
|
|
Loading…
Add table
Reference in a new issue