Skip to content
Snippets Groups Projects
Commit f58e393d authored by jurgenhaas's avatar jurgenhaas
Browse files

#37 Always install into /opt/netdata with static only install method

parent d96c6882
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
- name: Weblog Module Configuration
template:
src: go.d/web_log.conf
dest: /etc/netdata/go.d/web_log.conf
dest: /opt/netdata/etc/netdata/go.d/web_log.conf
owner: netdata
group: netdata
mode: 0660
......@@ -36,6 +36,6 @@
- name: Install Custom Alerts
template:
src: health.d/web_log.conf
dest: /etc/netdata/health.d/my_web_log.conf
dest: /opt/netdata/etc/netdata/health.d/my_web_log.conf
notify:
- Restart NetData
......@@ -10,7 +10,7 @@
- name: Configure NetData
template:
src: '{{ item }}'
dest: /etc/netdata/{{ item }}
dest: /opt/netdata/etc/netdata/{{ item }}
owner: netdata
group: netdata
mode: 0644
......@@ -24,7 +24,7 @@
- name: Configure web listener
ini_file:
path: /etc/netdata/netdata.conf
path: /opt/netdata/etc/netdata/netdata.conf
section: web
option: bind to
value: '*'
......@@ -34,7 +34,7 @@
- name: Install Alert Templates
template:
src: health.d/{{ item }}.conf
dest: /etc/netdata/health.d/my_{{ item }}.conf
dest: /opt/netdata/etc/netdata/health.d/my_{{ item }}.conf
with_items:
- fluentd_buffer
- httpcheck
......@@ -46,7 +46,7 @@
- name: Install Custom Alarms
template:
src: health.d/alarms.conf
dest: /etc/netdata/health.d/my_alarms.conf
dest: /opt/netdata/etc/netdata/health.d/my_alarms.conf
when: netdata_custom_notifications is defined
notify:
- Restart NetData
......@@ -54,7 +54,7 @@
- name: Configure Python Plugins
template:
src: python.d/{{ item }}
dest: /etc/netdata/python.d/{{ item }}
dest: /opt/netdata/etc/netdata/python.d/{{ item }}
owner: netdata
group: netdata
mode: 0644
......@@ -69,7 +69,7 @@
- name: Configure Go Plugins
template:
src: 'go.d/{{ item }}'
dest: /etc/netdata/go.d/{{ item }}
dest: /opt/netdata/etc/netdata/go.d/{{ item }}
owner: netdata
group: netdata
mode: 0644
......@@ -80,7 +80,7 @@
- Restart NetData
- name: Get a list of all health config files
shell: ls /usr/lib/netdata/conf.d/health.d/*.conf -1
shell: ls /opt/netdata/usr/lib/netdata/conf.d/health.d/*.conf -1
register: health_list
- name: Remove all options that prevent clear notifications
......
......@@ -4,7 +4,7 @@
- name: Configure ElasticSearch Plugin
template:
src: go.d/elasticsearch.conf
dest: /etc/netdata/go.d/elasticsearch.conf
dest: /opt/netdata/etc/netdata/go.d/elasticsearch.conf
owner: netdata
group: netdata
mode: 0660
......@@ -10,7 +10,7 @@
- name: Configure HaProxy Plugin
template:
src: python.d/haproxy.conf
dest: /etc/netdata/python.d/haproxy.conf
dest: /opt/netdata/etc/netdata/python.d/haproxy.conf
owner: netdata
group: netdata
mode: 0660
......@@ -8,15 +8,15 @@
mode: '0755'
- name: Install and configure NetData
shell: /tmp/kickstart.sh --non-interactive --stable-channel --reinstall-even-if-unsafe --disable-telemetry
shell: /tmp/kickstart.sh --non-interactive --stable-channel --reinstall-even-if-unsafe --disable-telemetry --static-only >/tmp/netdata-install.log 2>&1
notify:
- Restart NetData
- name: Check if this host has a claimed cloud ID
stat:
path: /var/lib/netdata/cloud.d/claimed_id
path: /opt/netdata/var/lib/netdata/cloud.d/claimed_id
register: claimed_cloud_id
- name: Register Host in Cloud
shell: netdata-claim.sh -token={{ netdata_cloud.token }} -rooms={{ netdata_cloud.room }} -url=https://app.netdata.cloud
shell: /opt/netdata/sbin/netdata-claim.sh -token={{ netdata_cloud.token }} -rooms={{ netdata_cloud.room }} -url=https://app.netdata.cloud
when: not claimed_cloud_id.stat.exists
......@@ -44,7 +44,7 @@
- name: Set ownership
file:
path: '/etc/netdata'
path: /opt/netdata/etc/netdata
owner: netdata
group: netdata
recurse: yes
......
......@@ -32,13 +32,10 @@
with_items:
- /etc/init.d/netdata
- /etc/logrotate.d/netdata
- /etc/netdata
- /opt/netdata/etc/netdata
- /etc/systemd/system/netdata.service
- /etc/systemd/system/netdata.service.d
- /opt/{{ netdata_local_archive|default("netdata") }}
- /usr/lib/netdata
- /usr/libexec/netdata
- /usr/sbin/netdata
when: netdata_force_reset
- name: Remove existing package
......@@ -53,7 +50,7 @@
- name: Ensure Directory
file:
path: /etc/netdata/{{ item }}
path: /opt/netdata/etc/netdata/{{ item }}
state: directory
with_items:
- charts.d
......
......@@ -3,7 +3,7 @@
- name: Make alerts silent
replace:
dest: /usr/lib/netdata/conf.d/health.d/{{ item }}.conf
dest: /opt/netdata/usr/lib/netdata/conf.d/health.d/{{ item }}.conf
regexp: ' to: .*$'
replace: ' to: silent'
backup: yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment