-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
…from ead14d3..6cbb8cc 6cbb8cc Bump version to 2.3.0 for latest changes 35389e7 feat: support for ostree systems 630e87e fix: add missing pmie webhook action configuration functionality e50979a fix: switch the repository role over to using Packagecloud git-subtree-dir: vendor/github.com/performancecopilot/ansible-pcp git-subtree-split: 6cbb8cc0accebed05985390e677ac1a760294803
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
- name: Check if primary pmie is running | ||
changed_when: false | ||
shell: | | ||
set -eu | ||
if set -o | grep -q pipefail; then | ||
set -o pipefail # no pipefail on debian, some ubuntu | ||
fi | ||
pmprobe -I pmcd.pmie.pmcd_host | grep '"primary"' | ||
when: (ansible_facts['distribution'] in ['RedHat', 'CentOS'] and | ||
ansible_facts['distribution_major_version'] | int > 6) or | ||
ansible_facts['distribution'] not in ['Fedora', 'RedHat', 'CentOS'] | ||
|
||
# yamllint disable rule:line-length | ||
- name: Check if primary pmie uses webhook | ||
changed_when: false | ||
shell: | | ||
set -eu | ||
if set -o | grep -q pipefail; then | ||
set -o pipefail # no pipefail on debian, some ubuntu | ||
fi | ||
pmieconf -f /var/lib/pcp/config/pmie/config.default list global webhook_endpoint | grep '"example"' | ||
pmieconf -f /var/lib/pcp/config/pmie/config.default list global webhook_action | grep '"yes"' | ||
when: (ansible_distribution in ['RedHat', 'CentOS'] and | ||
(ansible_facts['distribution_version'] is version('9.3', '<'))) or | ||
ansible_distribution not in ['Fedora', 'RedHat', 'CentOS'] | ||
# yamllint enable rule:line-length |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
- name: Test pmie webhook configuration | ||
hosts: all | ||
|
||
roles: | ||
- role: performancecopilot.metrics.pcp | ||
vars: | ||
pcp_pmie_endpoint: https://example.com:12345/webhook | ||
|
||
pre_tasks: | ||
- name: Skip test if not supported by platform | ||
meta: end_host | ||
when: (ansible_distribution in ['RedHat', 'CentOS'] and | ||
(ansible_facts['distribution_version'] is version('9.3', '<'))) or | ||
ansible_distribution not in ['Fedora', 'RedHat', 'CentOS'] | ||
|
||
- name: Save state of services | ||
import_tasks: get_services_state.yml | ||
|
||
tasks: | ||
- name: Check if configuring pmie webhook works | ||
include_tasks: check_pmie_webhook.yml | ||
|
||
post_tasks: | ||
- name: Restore state of services | ||
import_tasks: restore_services_state.yml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.