From 7b21ed31e756ba44be872c8457178215bb1bd2fe Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Sun, 9 Jun 2019 13:34:14 +0200
Subject: [PATCH] ansible-playbooks/general#85 Linting

---
 tasks/main.yml | 10 ++++++----
 tasks/more.yml |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/tasks/main.yml b/tasks/main.yml
index ce8e87a..407965b 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -2,7 +2,8 @@
 # file: roles/commonconnect/tasks/main.yml
 
 - name: "Common Connect Role"
-  set_fact: role_commonconnect_started=true
+  set_fact:
+    role_commonconnect_started: true
   tags: 'always'
 
 - block:
@@ -29,7 +30,7 @@
   - block:
 
     - name: "Read available variable cache files"
-      shell: ls ~/.ansible/hostvars
+      shell: 'ls ~/.ansible/hostvars'
       become: no
       register: variable_files
       failed_when: false
@@ -37,7 +38,7 @@
       ignore_errors: true
       tags: 'always'
 
-    - include_tasks: more.yml
+    - include_tasks: 'more.yml'
       with_items: '{{ variable_files.stdout_lines|default([]) }}'
       loop_control:
         loop_var: inventory_name
@@ -45,7 +46,8 @@
     when: lookup('pipe','hostname') == inventory_hostname
 
   - name: 'Remember that this role had been run'
-    set_fact: role_commonconnect_completed=true
+    set_fact:
+      role_commonconnect_completed: true
     tags: 'always'
 
   when: '"commonconnect" not in excluded_roles and role_commonconnect_completed is not defined'
diff --git a/tasks/more.yml b/tasks/more.yml
index d60a07e..a869ceb 100644
--- a/tasks/more.yml
+++ b/tasks/more.yml
@@ -1,7 +1,9 @@
 ---
 # file: roles/commonconnect/tasks/more.yml
 
-- set_fact: facts="{{ lookup('file','~/.ansible/hostvars/{{ inventory_name }}') | from_json }}"
+- name: "Set facts"
+  set_fact:
+    facts: "{{ lookup('file','~/.ansible/hostvars/{{ inventory_name }}') | from_json }}"
 
 - name: "Add Hosts to Hostfile"
   lineinfile:
-- 
GitLab