-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: "Converge" | ||
hosts: all | ||
gather_facts: false | ||
roles: | ||
- role: "dgibbs64.netdata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: "${MOLECULE_IMAGE:-ubuntu2204}" | ||
image: "geerlingguy/docker-${MOLECULE_IMAGE:-ubuntu2204}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
privileged: true | ||
pre_build_image: true | ||
cgroupns_mode: host | ||
provisioner: | ||
name: ansible | ||
verifier: | ||
name: ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
- name: "Verify" | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: "Get service facts" | ||
ansible.builtin.service_facts: | ||
|
||
- name: "Check netdata service is started" | ||
ansible.builtin.fail: | ||
msg: "netdata service is not started" | ||
when: "'netdata' in services and services['netdata']['state'] != 'running'" | ||
|
||
- name: "Check netdata service is enabled" | ||
ansible.builtin.fail: | ||
msg: "netdata service is not enabled" | ||
when: "'netdata' in services and services['netdata.service']['status'] != 'enabled'" | ||
|
||
- name: "Check netdata dashboard port to open" | ||
ansible.builtin.wait_for: | ||
host: "{{ inventory_hostname }}" | ||
port: "19999" | ||
state: started | ||
delay: 5 | ||
timeout: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
- name: "Converge" | ||
hosts: all | ||
gather_facts: false | ||
become: false | ||
roles: | ||
- role: "dgibbs64.netdata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
- name: "Check if distro or architecture are supported" | ||
ansible.builtin.debug: | ||
msg: "{{ ansible_distribution }} {{ ansible_distribution_version }} on {{ ansible_architecture }} is not supported" | ||
when: > | ||
supported_distros | selectattr("name", "equalto", ansible_os_family) | list | length == 0 or | ||
ansible_distribution_version is version(supported_distros | selectattr("name", "equalto", ansible_os_family) | map(attribute="min_version") | first, "<") or | ||
ansible_architecture not in (supported_distros | selectattr("name", "equalto", ansible_os_family) | map(attribute="supported_architectures") | first) | ||
- name: "Skip role if distro or architecture is not supported" | ||
ansible.builtin.meta: end_play | ||
when: > | ||
supported_distros | selectattr("name", "equalto", ansible_os_family) | list | length == 0 or | ||
ansible_distribution_version is version(supported_distros | selectattr("name", "equalto", ansible_os_family) | map(attribute="min_version") | first, "<") or | ||
ansible_architecture not in (supported_distros | selectattr("name", "equalto", ansible_os_family) | map(attribute="supported_architectures") | first) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
supported_distros: | ||
- { name: "Amazon", min_version: "2023" } | ||
- { | ||
name: "Debian", | ||
min_version: "10", | ||
supported_architectures: "['x86_64', 'i686', 'aarch64', 'armv7l']", | ||
} | ||
- { name: "Fedora", min_version: "35" } | ||
- { name: "Suse", min_version: "15.2" } | ||
- { name: "OracleLinux", min_version: "8" } | ||
- { name: "RedHat", min_version: "9" } | ||
- { name: "CentOS", min_version: "8" } | ||
- { name: "Ubuntu", min_version: "18.04" } |