summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/tasks/main.yaml
blob: e8c74b8dc05d92e7a29112f736a355c0a9c12f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: Create temp directory for doing work in
  command: mktemp -td openshift-metrics-ansible-XXXXXX
  register: mktemp
  changed_when: False

- debug: msg="Created temp dir {{mktemp.stdout}}"

- name: Create temp directory for all our templates
  file: path={{mktemp.stdout}}/templates state=directory mode=0755
  changed_when: False

- name: Copy the admin client config(s)
  command: >
     cp {{ openshift.common.config_base}}/master/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
  changed_when: False
  check_mode: no
  tags: metrics_init

- include: "{{role_path}}/tasks/install_metrics.yaml"
  when: openshift_metrics_install_metrics | default(false) | bool

- include: "{{role_path}}/tasks/uninstall_metrics.yaml"
  when: not openshift_metrics_install_metrics | default(false) | bool