36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
|
---
|
||
|
- name: install | Defining Auto Update CLI Option
|
||
|
set_fact:
|
||
|
auto_update_cli_option: "{{ netdata_auto_updates['enabled']|ternary('--auto-update', '') }}"
|
||
|
|
||
|
- name: install | Cloning {{ netdata_git_repo }} to {{ netdata_source_dir }}
|
||
|
git:
|
||
|
repo: "{{ netdata_git_repo }}"
|
||
|
dest: "{{ netdata_source_dir }}"
|
||
|
depth: 1
|
||
|
version: "{{ netdata_git_version_tag }}"
|
||
|
become: true
|
||
|
|
||
|
- name: use Netdata dependencies installation
|
||
|
command: "{{ netdata_requirements_installer }} {{ netdata_requirements_installer_options|join(' ') }}" # noqa 301
|
||
|
args:
|
||
|
chdir: "{{ netdata_source_dir }}"
|
||
|
become: true
|
||
|
register: netdata_requirements_install
|
||
|
changed_when: >
|
||
|
'All required packages are already installed. Now proceed to the next step.'
|
||
|
not in netdata_requirements_install.stderr_lines
|
||
|
|
||
|
- name: install | Installing Netdata ({{ netdata_installer }}) From {{ netdata_source_dir }}
|
||
|
command: "{{ installer_cli|join(' ') }}"
|
||
|
vars:
|
||
|
installer_cli:
|
||
|
- "{{ netdata_installer }}"
|
||
|
- "{{ auto_update_cli_option }}"
|
||
|
- "--dont-wait"
|
||
|
args:
|
||
|
chdir: "{{ netdata_source_dir }}"
|
||
|
creates: /usr/sbin/netdata
|
||
|
become: true
|
||
|
notify: restart netdata
|