Przeglądaj źródła

fix yamllint issues

Fabian von Feilitzsch 7 lat temu
rodzic
commit
e59ab987dc

+ 17 - 17
roles/ansible_service_broker/tasks/install.yml

@@ -149,18 +149,18 @@
                     - "--listen-client-urls=http://0.0.0.0:2379"
                     - "--advertise-client-urls=http://0.0.0.0:2379"
                   ports:
-                  - containerPort: 2379
-                    protocol: TCP
+                    - containerPort: 2379
+                      protocol: TCP
                   env:
-                  - name: ETCDCTL_API
-                    value: "3"
+                    - name: ETCDCTL_API
+                      value: "3"
                   volumeMounts:
-                  - mountPath: /data
-                    name: etcd
+                    - mountPath: /data
+                      name: etcd
               volumes:
-              - name: etcd
-                persistentVolumeClaim:
-                  claimName: etcd
+                - name: etcd
+                  persistentVolumeClaim:
+                    claimName: etcd
 
 - name: create ansible-service-broker deployment
   oc_obj:
@@ -202,16 +202,16 @@
                     - containerPort: 1338
                       protocol: TCP
                   env:
-                  - name: BROKER_CONFIG
-                    value: /etc/ansible-service-broker/config.yaml
+                    - name: BROKER_CONFIG
+                      value: /etc/ansible-service-broker/config.yaml
                   terminationMessagePath: /tmp/termination-log
               volumes:
-              - name: config-volume
-                configMap:
-                  name: broker-config
-                  items:
-                  - key: broker-config
-                    path: config.yaml
+                - name: config-volume
+                  configMap:
+                    name: broker-config
+                    items:
+                      - key: broker-config
+                        path: config.yaml
 
 
 # TODO: saw a oc_configmap in the library, but didn't understand how to get it to do the following:

+ 7 - 6
roles/ansible_service_broker/tasks/validate_facts.yml

@@ -1,14 +1,15 @@
+---
 - name: validate Dockerhub registry settings
   fail: msg="To use the dockerhub registry, you must provide the ansible_service_broker_registry_user. ansible_service_broker_registry_password, and ansible_service_broker_registry_organization parameters"
   when:
-   - ansible_service_broker_registry_type == 'dockerhub'
-   - not (ansible_service_broker_registry_user and
-      ansible_service_broker_registry_password and
-      ansible_service_broker_registry_organization)
+    - ansible_service_broker_registry_type == 'dockerhub'
+    - not (ansible_service_broker_registry_user and
+        ansible_service_broker_registry_password and
+        ansible_service_broker_registry_organization)
 
 
 - name: validate RHCC registry settings
   fail: msg="To use the Red Hat Container Catalog registry, you must provide the ansible_service_broker_registry_url"
   when:
-   - ansible_service_broker_registry_type == 'rhcc'
-   - not ansible_service_broker_registry_url
+    - ansible_service_broker_registry_type == 'rhcc'
+    - not ansible_service_broker_registry_url

+ 7 - 8
roles/openshift_service_catalog/tasks/install.yml

@@ -37,7 +37,7 @@
     kind: template
     namespace: "kube-service-catalog"
     files:
-    - "{{ mktemp.stdout }}/kubeservicecatalog_roles_bindings.yml"
+      - "{{ mktemp.stdout }}/kubeservicecatalog_roles_bindings.yml"
     delete_after: yes
 
 - oc_process:
@@ -54,7 +54,7 @@
     kind: template
     namespace: kube-system
     files:
-    - "{{ mktemp.stdout }}/kubesystem_roles_bindings.yml"
+      - "{{ mktemp.stdout }}/kubesystem_roles_bindings.yml"
     delete_after: yes
 
 - oc_process:
@@ -107,7 +107,7 @@
     kind: daemonset
     name: apiserver
     files:
-    - "{{ mktemp.stdout }}/service_catalog_api_server.yml"
+      - "{{ mktemp.stdout }}/service_catalog_api_server.yml"
     delete_after: yes
 
 - template:
@@ -121,7 +121,7 @@
     kind: service
     name: apiserver
     files:
-    - "{{ mktemp.stdout }}/service_catalog_api_service.yml"
+      - "{{ mktemp.stdout }}/service_catalog_api_service.yml"
     delete_after: yes
 
 - template:
@@ -135,7 +135,7 @@
     kind: route
     name: apiserver
     files:
-    - "{{ mktemp.stdout }}/service_catalog_api_route.yml"
+      - "{{ mktemp.stdout }}/service_catalog_api_route.yml"
     delete_after: yes
 
 ## controller manager
@@ -144,7 +144,6 @@
     dest: "{{ mktemp.stdout }}/controller_manager.yml"
   vars:
     image: ""
-    node_selector: ""
     cpu_limit: none
     memory_limit: none
     node_selector: {"openshift-infra": "apiserver"}
@@ -156,7 +155,7 @@
     kind: daemonset
     name: controller-manager
     files:
-    - "{{ mktemp.stdout }}/controller_manager.yml"
+      - "{{ mktemp.stdout }}/controller_manager.yml"
     delete_after: yes
 
 - template:
@@ -170,7 +169,7 @@
     kind: service
     name: controller-manager
     files:
-    - "{{ mktemp.stdout }}/controller_manager_service.yml"
+      - "{{ mktemp.stdout }}/controller_manager_service.yml"
     delete_after: yes
 
 - name: Delete temp directory

+ 0 - 6
roles/openshift_service_catalog_broker/defaults/main.yml

@@ -1,6 +0,0 @@
----
-openshift_service_catalog_broker_remove: false
-openshift_service_catalog_broker_replicas: 1
-
-openshift_service_catalog_broker_namespace: openshift-ansible-service-broker
-openshift_service_catalog_broker_nodeselector: {}

+ 0 - 16
roles/openshift_service_catalog_broker/meta/main.yml

@@ -1,16 +0,0 @@
----
-galaxy_info:
-  author: OpenShift Red Hat
-  description: OpenShift Service Catalog Broker
-  company: Red Hat, Inc.
-  license: Apache License, Version 2.0
-  min_ansible_version: 2.2
-  platforms:
-  - name: EL
-    versions:
-    - 7
-  categories:
-  - cloud
-dependencies:
-- role: lib_openshift
-- role: openshift_facts

+ 0 - 65
roles/openshift_service_catalog_broker/tasks/install.yml

@@ -1,65 +0,0 @@
----
-# do any asserts here
-
-- name: Set default image variables based on deployment_type
-  include_vars: "{{ item }}"
-  with_first_found:
-    - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
-    - "default_images.yml"
-
-- name: Set service_catalog image facts
-  set_fact:
-    openshift_service_catalog_broker_image_prefix: "{{ openshift_service_catalog_broker_image_prefix | default(__openshift_service_catalog_broker_image_prefix) }}"
-    openshift_service_catalog_broker_image_version: "{{ openshift_service_catalog_broker_image_version | default(__openshift_service_catalog_broker_image_version) }}"
-
-- name: Set Service Catalog Broker namespace
-  oc_project:
-    state: present
-    name: "{{ openshift_service_catalog_broker_namespace }}"
-#    node_selector: "{{ openshift_service_catalog_broker_nodeselector | default(null) }}"
-
-- name: Create temp directory for doing work in
-  command: mktemp -d /tmp/openshift-broker-ansible-XXXXXX
-  register: mktemp
-  changed_when: False
-
-## broker process deployment
-- template:
-    src: broker.j2
-    dest: "{{ mktemp.stdout }}/broker.yml"
-  vars:
-    image: ""
-    replicas: 1
-    node_selector: ""
-    cpu_limit: none
-    memory_limit: none
-
-- name: Set Service Catalog Broker deployment
-  oc_obj:
-    state: present
-    namespace: "{{ openshift_service_catalog_broker_namespace }}"
-    kind: deployment
-    name: ups-broker
-    files:
-    - "{{ mktemp.stdout }}/broker.yml"
-    delete_after: yes
-
-- template:
-    src: broker_service.j2
-    dest: "{{ mktemp.stdout }}/broker_service.yml"
-
-- name: Set Service Catalog Broker service
-  oc_obj:
-    state: present
-    namespace: "{{ openshift_service_catalog_broker_namespace }}"
-    kind: service
-    name: ups-broker
-    files:
-    - "{{ mktemp.stdout }}/broker_service.yml"
-    delete_after: yes
-
-- name: Delete temp directory
-  file:
-    name: "{{ mktemp.stdout }}"
-    state: absent
-  changed_when: False

+ 0 - 6
roles/openshift_service_catalog_broker/tasks/main.yml

@@ -1,6 +0,0 @@
----
-- include: install.yml
-  when: not openshift_service_catalog_broker_remove | default(false) | bool
-
-- include: remove.yml
-  when: openshift_service_catalog_broker_remove | default(false) | bool

+ 0 - 19
roles/openshift_service_catalog_broker/tasks/remove.yml

@@ -1,19 +0,0 @@
----
-- name: Remove Service Catalog Broker service
-  oc_obj:
-    state: absent
-    namespace: "{{ openshift_service_catalog_broker_namespace }}"
-    kind: service
-    name: ups-broker
-
-- name: Remove Service Catalog Broker deployment
-  oc_obj:
-    state: absent
-    namespace: "{{ openshift_service_catalog_broker_namespace }}"
-    kind: deployment
-    name: ups-broker
-
-- name: Remove Service Catalog Broker namespace
-  oc_project:
-    state: absent
-    name: "{{ openshift_service_catalog_broker_namespace }}"

+ 0 - 41
roles/openshift_service_catalog_broker/templates/broker.j2

@@ -1,41 +0,0 @@
-kind: Deployment
-apiVersion: extensions/v1beta1
-metadata:
-  name: ups-broker
-  labels:
-    app: ups-broker
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: ups-broker
-  template:
-    metadata:
-      labels:
-        app: ups-broker
-    spec:
-      containers:
-      - name: ups-broker
-        image: quay.io/kubernetes-service-catalog/user-broker:canary
-        imagePullPolicy: Always
-        args:
-        - --port
-        - "8080"
-        ports:
-        - containerPort: 8080
-        readinessProbe:
-          tcpSocket:
-            port: 8080
-          failureThreshold: 1
-          initialDelaySeconds: 10
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 2
-        livenessProbe:
-          tcpSocket:
-            port: 8080
-          failureThreshold: 3
-          initialDelaySeconds: 10
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 2

+ 0 - 7
roles/openshift_service_catalog_broker/templates/broker_broker.j2

@@ -1,7 +0,0 @@
-
-apiVersion: servicecatalog.k8s.io/v1alpha1
-kind: Broker
-metadata:
-  name: ups-broker
-spec:
-  url: http://ups-broker.ups-broker.svc.cluster.local

+ 0 - 13
roles/openshift_service_catalog_broker/templates/broker_service.j2

@@ -1,13 +0,0 @@
-kind: Service
-apiVersion: v1
-metadata:
-  name:  ups-broker
-  labels:
-    app: ups-broker
-spec:
-  selector:
-    app:  ups-broker
-  ports:
-  - protocol: TCP
-    port: 80
-    targetPort: 8080

+ 0 - 3
roles/openshift_service_catalog_broker/vars/default_images.yml

@@ -1,3 +0,0 @@
----
-__openshift_service_catalog_broker_image_prefix: "docker.io/openshift/origin-"
-__openshift_service_catalog_broker_image_version: "latest"

+ 0 - 3
roles/openshift_service_catalog_broker/vars/openshift-enterprise.yml

@@ -1,3 +0,0 @@
----
-__openshift_service_catalog_broker_image_prefix: "registry.access.redhat.com/openshift3/"
-__openshift_service_catalog_broker_image_version: "3.6.0"