]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Applying yamllint to adjust-puppet-facts-customer.yaml
authorFrank Brehm <frank@brehm-online.com>
Fri, 26 Nov 2021 09:53:00 +0000 (10:53 +0100)
committerFrank Brehm <frank@brehm-online.com>
Fri, 26 Nov 2021 09:53:00 +0000 (10:53 +0100)
.yamllint.yaml [new file with mode: 0644]
adjust-puppet-facts-customer.yaml

diff --git a/.yamllint.yaml b/.yamllint.yaml
new file mode 100644 (file)
index 0000000..298d97e
--- /dev/null
@@ -0,0 +1,49 @@
+---
+rules:
+  braces:
+    min-spaces-inside: 0
+    max-spaces-inside: 1
+    min-spaces-inside-empty: 0
+    max-spaces-inside-empty: 1
+  brackets:
+    min-spaces-inside: 0
+    max-spaces-inside: 1
+    min-spaces-inside-empty: 0
+    max-spaces-inside-empty: 1
+  colons:
+    max-spaces-before: 0
+    max-spaces-after: 1
+  commas:
+    max-spaces-before: 1
+    min-spaces-after: 1
+    max-spaces-after: 1
+  comments:
+    level: warning
+    require-starting-space: true
+    min-spaces-from-content: 2
+  comments-indentation: disable
+  document-end: disable
+  document-start:
+    level: warning
+    present: true
+  empty-lines:
+    max: 2
+    max-start: 0
+    max-end: 1
+  hyphens:
+    max-spaces-after: 1
+  indentation:
+    spaces: consistent
+    indent-sequences: true
+    check-multi-line-strings: false
+  key-duplicates: enable
+  line-length:
+    level: warning
+    allow-non-breakable-inline-mappings: true
+    max: 99
+  new-line-at-end-of-file: enable
+  new-lines:
+    type: unix
+  trailing-spaces: enable
+  truthy:
+    level: warning
index a6ca62d4b4c823a132f17472ec53b9c81b8955ee..1b7611248a8e70ad7698f6a9f7f4b287c6319b0b 100644 (file)
     - name: "Get file stats of {{ customer_yaml_file }} ..."
       stat:
         path: "{{ customer_yaml_file }}"
-      ignore_errors: True
-      changed_when: False
+      ignore_errors: true
+      changed_when: false
       register: customer_yfile_stat
 
     - name: "Get current configured customer in {{ customer_yaml_file }} ..."
       shell: "if test -f {{ customer_yaml_file }} ; then cat {{ customer_yaml_file }} | grep '^customer:' | sed -e 's/^[^:]*:[         ]*//' -e 's/[   ]*$//'; fi"
-      ignore_errors: True
-      changed_when: False
+      ignore_errors: true
+      changed_when: false
       register: cur_customer
 
     - name: "Get current configured project in {{ customer_yaml_file }} ..."
       shell: "if test -f {{ customer_yaml_file }} ; then cat {{ customer_yaml_file }} | grep '^project:' | sed -e 's/^[^:]*:[  ]*//' -e 's/[   ]*$//'; fi"
-      ignore_errors: True
-      changed_when: False
+      ignore_errors: true
+      changed_when: false
       register: cur_project
 
     - name: "Set project in in {{ customer_yaml_file }}, if necessary ..."
       block:
 
-      - name: "Save project {{ cur_customer.stdout }} in {{ customer_yaml_file }} ..."
-        shell: "echo -e \"---\ncustomer: {{ cur_customer.stdout }}\nproject: {{ cur_customer.stdout }}\" > {{ customer_yaml_file }}"
+        - name: "Save project {{ cur_customer.stdout }} in {{ customer_yaml_file }} ..."
+          shell: "echo -e \"---\ncustomer: {{ cur_customer.stdout }}\nproject: {{ cur_customer.stdout }}\" > {{ customer_yaml_file }}"
 
       when: cur_project.stdout == ''