From 9c6766e8588ff96bffc0479251dbbb5dd9c80521 Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Thu, 12 Jan 2017 08:38:06 -0500 Subject: metrics fixes for yamlint --- .../tasks/generate_hawkular_certificates.yaml | 2 +- .../openshift_metrics/tasks/generate_services.yaml | 5 ++-- .../openshift_metrics/tasks/install_hawkular.yaml | 2 +- roles/openshift_metrics/tasks/install_metrics.yaml | 4 ++-- roles/openshift_metrics/tasks/scale.yaml | 6 ++--- roles/openshift_metrics/tasks/start_metrics.yaml | 28 +++++++++++----------- roles/openshift_metrics/tasks/stop_metrics.yaml | 18 +++++++------- 7 files changed, 32 insertions(+), 33 deletions(-) (limited to 'roles/openshift_metrics/tasks') diff --git a/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml b/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml index 995440598..1306d0ccd 100644 --- a/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml +++ b/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml @@ -211,7 +211,7 @@ {{ hawkular_secrets['hawkular-metrics.pwd'] }} when: name not in metrics_secrets.stdout_lines changed_when: no - + - name: generate cassandra secret template template: src: secret.j2 diff --git a/roles/openshift_metrics/tasks/generate_services.yaml b/roles/openshift_metrics/tasks/generate_services.yaml index 115053012..903d52bff 100644 --- a/roles/openshift_metrics/tasks/generate_services.yaml +++ b/roles/openshift_metrics/tasks/generate_services.yaml @@ -41,7 +41,6 @@ name: hawkular-cassandra headless: "{{ item == 'cassandra-nodes' }}" with_items: - - cassandra - - cassandra-nodes + - cassandra + - cassandra-nodes changed_when: no - diff --git a/roles/openshift_metrics/tasks/install_hawkular.yaml b/roles/openshift_metrics/tasks/install_hawkular.yaml index d49c83138..7c06bc1db 100644 --- a/roles/openshift_metrics/tasks/install_hawkular.yaml +++ b/roles/openshift_metrics/tasks/install_hawkular.yaml @@ -11,7 +11,7 @@ src: hawkular_metrics_rc.j2 dest: "{{ mktemp.stdout }}/templates/hawkular_metrics_rc.yaml" vars: - replica_count: "{{hawkular_metrics_replica_count.stdout}}" + replica_count: "{{hawkular_metrics_replica_count.stdout}}" changed_when: false - shell: > diff --git a/roles/openshift_metrics/tasks/install_metrics.yaml b/roles/openshift_metrics/tasks/install_metrics.yaml index b45629b70..5f4b84418 100644 --- a/roles/openshift_metrics/tasks/install_metrics.yaml +++ b/roles/openshift_metrics/tasks/install_metrics.yaml @@ -25,10 +25,10 @@ --config={{ mktemp.stdout }}/admin.kubeconfig apply -f {{ item }} with_fileglob: - - "{{ mktemp.stdout }}/templates/*.yaml" + - "{{ mktemp.stdout }}/templates/*.yaml" - name: Scaling up cluster include: start_metrics.yaml tags: openshift_metrics_start_cluster when: - - openshift_metrics_start_cluster | default(true) | bool + - openshift_metrics_start_cluster | default(true) | bool diff --git a/roles/openshift_metrics/tasks/scale.yaml b/roles/openshift_metrics/tasks/scale.yaml index 65f35fb46..bb4fa621b 100644 --- a/roles/openshift_metrics/tasks/scale.yaml +++ b/roles/openshift_metrics/tasks/scale.yaml @@ -19,12 +19,12 @@ - name: Waiting for {{object}} to scale to {{desired}} command: > - {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig + {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get {{object}} -n {{openshift_metrics_project|quote}} -o jsonpath='{.status.replicas}' register: replica_counts until: replica_counts.stdout.find("{{desired}}") != -1 retries: 30 delay: 10 when: - - replica_count.stdout != (desired | string) - - not ansible_check_mode + - replica_count.stdout != (desired | string) + - not ansible_check_mode diff --git a/roles/openshift_metrics/tasks/start_metrics.yaml b/roles/openshift_metrics/tasks/start_metrics.yaml index 0906d71a2..31f303c86 100644 --- a/roles/openshift_metrics/tasks/start_metrics.yaml +++ b/roles/openshift_metrics/tasks/start_metrics.yaml @@ -1,10 +1,10 @@ --- - command: > - {{openshift.common.client_binary}} - --config={{mktemp.stdout}}/admin.kubeconfig - get rc - -l metrics-infra=hawkular-cassandra - -o name + {{openshift.common.client_binary}} + --config={{mktemp.stdout}}/admin.kubeconfig + get rc + -l metrics-infra=hawkular-cassandra + -o name -n {{openshift_metrics_project}} register: metrics_cassandra_rc changed_when: no @@ -18,11 +18,11 @@ loop_var: object - command: > - {{openshift.common.client_binary}} - --config={{mktemp.stdout}}/admin.kubeconfig - get rc - -l metrics-infra=hawkular-metrics - -o name + {{openshift.common.client_binary}} + --config={{mktemp.stdout}}/admin.kubeconfig + get rc + -l metrics-infra=hawkular-metrics + -o name -n {{openshift_metrics_project}} register: metrics_metrics_rc changed_when: no @@ -36,11 +36,11 @@ loop_var: object - command: > - {{openshift.common.client_binary}} - --config={{mktemp.stdout}}/admin.kubeconfig - get rc + {{openshift.common.client_binary}} + --config={{mktemp.stdout}}/admin.kubeconfig + get rc -l metrics-infra=heapster - -o name + -o name -n {{openshift_metrics_project}} register: metrics_heapster_rc check_mode: no diff --git a/roles/openshift_metrics/tasks/stop_metrics.yaml b/roles/openshift_metrics/tasks/stop_metrics.yaml index cdb029c2f..524d4227b 100644 --- a/roles/openshift_metrics/tasks/stop_metrics.yaml +++ b/roles/openshift_metrics/tasks/stop_metrics.yaml @@ -1,10 +1,10 @@ --- - command: > - {{openshift.common.client_binary}} - --config={{mktemp.stdout}}/admin.kubeconfig - get rc + {{openshift.common.client_binary}} + --config={{mktemp.stdout}}/admin.kubeconfig + get rc -l metrics-infra=heapster - -o name + -o name -n {{openshift_metrics_project}} register: metrics_heapster_rc changed_when: "'No resources found' not in metrics_heapster_rc.stderr" @@ -19,11 +19,11 @@ loop_var: object - command: > - {{openshift.common.client_binary}} - --config={{mktemp.stdout}}/admin.kubeconfig + {{openshift.common.client_binary}} + --config={{mktemp.stdout}}/admin.kubeconfig get rc -l metrics-infra=hawkular-metrics - -o name + -o name -n {{openshift_metrics_project}} register: metrics_hawkular_rc changed_when: "'No resources found' not in metrics_hawkular_rc.stderr" @@ -37,10 +37,10 @@ loop_var: object - command: > - {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig + {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get rc -o name - -l metrics-infra=hawkular-cassandra + -l metrics-infra=hawkular-cassandra -n {{openshift_metrics_project}} register: metrics_cassandra_rc changed_when: "'No resources found' not in metrics_cassandra_rc.stderr" -- cgit v1.2.3