Skip to content

Commit 03e101e

Browse files
michburkopenshift-merge-bot[bot]
authored andcommitted
[pcp_metrics] Fix broken hosts selection
Because `cifmw_pcp_metrics_hosts` was defined in the pcp_metrics role's defaults file, the `pcp-metrics-pre.yml` playbook was trying use to this var before it was imported, leading to `'cifmw_pcp_metrics_hosts' is undefined` errors Signed-off-by: Michael Burke <michburk@redhat.com>
1 parent c6798e9 commit 03e101e

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

hooks/playbooks/pcp-metrics-post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The best place to call this hook is under post_tests actions.
88
#
99
- name: Collect performance metrics
10-
hosts: "{{ cifmw_pcp_metrics_hosts }}"
10+
hosts: "{{ cifmw_pcp_metrics_hosts | default('all,!localhost') }}"
1111
gather_facts: false
1212
tasks:
1313
- name: Gather metrics

hooks/playbooks/pcp-metrics-pre.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
tasks_from: repo
2525

2626
- name: Start collecting performance metrics
27-
hosts: "{{ cifmw_pcp_metrics_hosts }}"
27+
hosts: "{{ cifmw_pcp_metrics_hosts | default('all,!localhost') }}"
2828
gather_facts: false
2929
tasks:
3030
- name: Setup PCP

roles/pcp_metrics/defaults/main.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ pcp_metrics_setup: false
44
pcp_metrics_gather: false
55
pcp_metrics_plot: false
66

7-
# Host pattern for PCP hook playbooks (setup and gather)
8-
cifmw_pcp_metrics_hosts: "all,!localhost"
9-
107
# Setup-related variables
118
pcp_metrics_packages:
129
- pcp # for pmlogger

0 commit comments

Comments
 (0)