Browse Source

metrics fixes for yamlint

Jeff Cantrill 8 years ago
parent
commit
9c6766e858

+ 1 - 0
playbooks/common/openshift-cluster/openshift_metrics.yml

@@ -1,3 +1,4 @@
+---
 - name: OpenShift Metrics
   hosts: oo_first_master
   roles:

+ 14 - 14
roles/openshift_metrics/meta/main.yaml

@@ -1,18 +1,18 @@
 ---
 galaxy_info:
-  author: OpenShift Development <dev@lists.openshift.redhat.com>
-  description: Deploy OpenShift metrics integration for the cluster
-  company: Red Hat, Inc.
-  license: license (Apache)
-  min_ansible_version: 2.2
-  platforms:
-  - name: EL
-    versions:
-    - 7
-  - name: Fedora
-    versions:
-    - all
-  categories:
-    - openshift
+    author: OpenShift Development <dev@lists.openshift.redhat.com>
+    description: Deploy OpenShift metrics integration for the cluster
+    company: Red Hat, Inc.
+    license: license (Apache)
+    min_ansible_version: 2.2
+    platforms:
+    - name: EL
+      versions:
+      - 7
+    - name: Fedora
+      versions:
+      - all
+    categories:
+      - openshift
 dependencies:
 - { role: openshift_facts }

+ 1 - 1
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

+ 2 - 3
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
-

+ 1 - 1
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: >

+ 2 - 2
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

+ 3 - 3
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

+ 14 - 14
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

+ 9 - 9
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"