diff --git a/tasks/main.yml b/tasks/main.yml index 766bf07a7ae9e9f43f3f4a67bb72a91ae57b2c15..a3f7949aa28b540208db32f0b8d00456046491b2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -39,6 +39,15 @@ - "Include NetData to Boot-List" - "Start NetData" +- name: "Check if local netdata installation exists" + shell: ls /usr/share/netdata/web/index.html + delegate_to: localhost + run_once: true + register: netdata_local_available + failed_when: false + changed_when: false + tags: 'LocalConfig' + - name: "Install local dashboard" template: src=tv-company.html @@ -48,6 +57,8 @@ mode=644 delegate_to: localhost run_once: true + tags: 'LocalConfig' + when: netdata_local_available.stdout == '/usr/share/netdata/web/index.html' - name: "Configure FireQoS" template: diff --git a/templates/tv-company.html b/templates/tv-company.html index 5ffebbb61b91708a8cb4bc52171b2c79eacc6dd3..d68472e36ba2064c070c9cf58ffd431b96b607e1 100644 --- a/templates/tv-company.html +++ b/templates/tv-company.html @@ -18,11 +18,7 @@ <script> NETDATA.options.current.destroy_on_hide = true; NETDATA.options.current.eliminate_zero_dimensions = true; - NETDATA.options.current.stop_updates_when_focus_is_lost = false; - var RELOAD_EVERY = 5; - setTimeout(function(){ - location.reload(); - }, RELOAD_EVERY * 60 * 1000); + NETDATA.options.current.stop_updates_when_focus_is_lost = true; </script> </head>