From 391279795a7f370625883b1a2e10c1e6676b0697 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Mon, 10 Jun 2019 20:20:03 +0200
Subject: [PATCH] ansible-playbooks/general#85 Linting [skip-ci]

---
 defaults/main.yml |  2 ++
 tasks/main.yml    | 84 +++++++++++++++++++++++------------------------
 2 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/defaults/main.yml b/defaults/main.yml
index acfc252..0c1c1e1 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -1 +1,3 @@
+---
+
 tunnel_user_name: systunnel
diff --git a/tasks/main.yml b/tasks/main.yml
index 6be22f9..cf351c7 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -3,54 +3,54 @@
 
 - name: Common Connect Role
   set_fact:
-    role_commonconnect_started: true
+    role_commonconnect_started: yes
   tags:
     - always
 
 - block:
 
-  - name: Create The /etc/hosts File
-    template:
-      src: etc_hosts.jinja2
-      dest: /etc/hosts
-      owner: root
-      group: root
-      mode: 0644
-
-  - name: Copy SSH Config For Server-To-Server Communication For Admins
-    template:
-      src: ssh_config.jinja2
-      dest: /home/{{ item }}/.ssh/config
-      owner: '{{ item }}'
-      group: root
-      mode: 0644
-    with_flattened:
-      - {{ admins|default([]) }}
-      - {{ jailusers|default([]) }}
-
-  - block:
-
-    - name: Read available variable cache files
-      shell: ls ~/.ansible/hostvars
-      become: no
-      register: variable_files
-      failed_when: false
-      changed_when: false
-      ignore_errors: true
+    - name: Create The /etc/hosts File
+      template:
+        src: etc_hosts.jinja2
+        dest: /etc/hosts
+        owner: root
+        group: root
+        mode: 0644
+
+    - name: Copy SSH Config For Server-To-Server Communication For Admins
+      template:
+        src: ssh_config.jinja2
+        dest: /home/{{ item }}/.ssh/config
+        owner: '{{ item }}'
+        group: root
+        mode: 0644
+      with_flattened:
+        - '{{ admins|default([]) }}'
+        - '{{ jailusers|default([]) }}'
+
+    - block:
+
+        - name: Read available variable cache files
+          shell: ls ~/.ansible/hostvars
+          become: no
+          register: variable_files
+          failed_when: no
+          changed_when: no
+          ignore_errors: yes
+          tags:
+            - always
+
+        - include_tasks: more.yml
+          with_items: '{{ variable_files.stdout_lines|default([]) }}'
+          loop_control:
+            loop_var: inventory_name
+
+      when: lookup('pipe','hostname') == inventory_hostname
+
+    - name: Remember that this role had been run
+      set_fact:
+        role_commonconnect_completed: yes
       tags:
         - always
 
-    - include_tasks: more.yml
-      with_items: '{{ variable_files.stdout_lines|default([]) }}'
-      loop_control:
-        loop_var: inventory_name
-
-    when: lookup('pipe','hostname') == inventory_hostname
-
-  - name: Remember that this role had been run
-    set_fact:
-      role_commonconnect_completed: true
-    tags:
-      - always
-
   when: not excluded_roles or "commonconnect" not in excluded_roles and role_commonconnect_completed is not defined
-- 
GitLab