diff --git a/tasks/main.yml b/tasks/main.yml index 6fa882681d653fb99b284835772684af96f58a1b..0493303f65bf64f59a4ac58e287d0f2edb49a69a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -25,6 +25,11 @@ #FireQOS available from 15.04 #- firehol + - name: "Ensure Directory" + file: + path='/etc/netdata' + state='directory' + - name: "Clone NetData" git: accept_hostkey: true @@ -46,6 +51,20 @@ - "Include NetData to Boot-List" - "Start NetData" + - name: "Configure Registry" + ini_file: + dest='/etc/netdata/netdata.conf' + section='registry' + option='{{ item.option }}' + value='{{ item.value }}' + with_items: + - option: 'enabled' + value: '{{ (netdata_registry|default("pmon1") == inventory_hostname)|ternary("yes", "no") }}' + - option: 'registry to announce' + value: 'http://{{ netdata_registry|default("pmon1") }}:19999' + notify: + - "Re-start NetData" + - name: "Configure FireQoS" template: src=etc_fireqos_fireqos.conf