-
-
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
11 changed files
with
169 additions
and
49 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
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,32 @@ | ||
- name: "Verify" | ||
Check failure on line 1 in molecule/local/verify.yml GitHub Actions / Lintyaml[document-start]
|
||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: "Check if /tmp/unsupported_distro file exists" | ||
ansible.builtin.stat: | ||
path: "/tmp/unsupported_distro" | ||
register: unsupported_distro_file | ||
|
||
- name: "Verify" | ||
when: not unsupported_distro_file.stat.exists | ||
block: | ||
- 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
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,26 @@ | ||
--- | ||
- name: "Check if distro or architecture are supported" | ||
ansible.builtin.set_fact: | ||
distro_supported: false | ||
when: > | ||
supported_distros | selectattr("name", "equalto", ansible_distribution) | list | length == 0 or | ||
ansible_distribution_version is version(supported_distros | selectattr("name", "equalto", ansible_distribution) | map(attribute="min_version") | first, "<") or | ||
ansible_architecture not in (supported_distros | selectattr("name", "equalto", ansible_distribution) | map(attribute="supported_architectures", default=[]) | first) | ||
- name: "Check if distro or architecture are supported" | ||
ansible.builtin.debug: | ||
msg: "{{ ansible_distribution }} {{ ansible_distribution_version }} on {{ ansible_architecture }} is not supported" | ||
when: distro_supported is false | ||
|
||
# For molecule testing only | ||
- name: "Create file if distro is not supported" | ||
ansible.builtin.copy: | ||
dest: "/tmp/unsupported_distro" | ||
content: "unsupported" | ||
mode: "0644" | ||
no_log: true | ||
when: distro_supported is false and "molecule-notest" in ansible_skip_tags | ||
|
||
- name: "Skip role if distro or architecture is not supported" | ||
ansible.builtin.meta: end_play | ||
when: distro_supported is false |
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,13 @@ | ||
--- | ||
supported_distros: | ||
- { name: "AlmaLinux", min_version: "8", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "Amazon", min_version: "2023", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "CentOS", min_version: "7", supported_architectures: "['x86_64']" } | ||
- { name: "Debian", min_version: "10", supported_architectures: "['x86_64', 'i686', 'aarch64', 'armv7l']" } | ||
- { name: "Fedora", min_version: "37", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "openSUSE Leap", min_version: "15.4", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "openSUSE Tumbleweed", min_version: "", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "OracleLinux", min_version: "8", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "RedHat", min_version: "8", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "Suse", min_version: "15.2", supported_architectures: "['x86_64', 'aarch64']" } | ||
- { name: "Ubuntu", min_version: "20.04", supported_architectures: "['x86_64', 'i686', 'armv7l']" } |