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

---
 handlers/main.yml   |  8 ++++----
 tasks/apache.yml    | 13 +++++++++----
 tasks/configure.yml |  3 ++-
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/handlers/main.yml b/handlers/main.yml
index 6ec428a..3b4b3ba 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -6,10 +6,10 @@
 
 - name: Restart NetData
   service:
-    name='netdata'
-    state='restarted'
+    name: netdata
+    state: restarted
 
 - name: Restart Apache
   service:
-    name='apache2'
-    state='restarted'
+    name: apache2
+    state: restarted
diff --git a/tasks/apache.yml b/tasks/apache.yml
index c7814c1..71f10d0 100644
--- a/tasks/apache.yml
+++ b/tasks/apache.yml
@@ -5,7 +5,8 @@
   apache2_module:
     name: status
     state: present
-  notify: "Restart Apache"
+  notify:
+    - Restart Apache
 
 - name: Apache Status Site
   template:
@@ -14,11 +15,15 @@
     owner: root
     group: root
     mode: 0644
-  notify: "Restart Apache"
+  notify:
+    - Restart Apache
 
 - name: Enable Apache Status Site
-  command: a2ensite status creates=/etc/apache2/sites-enabled/status{{ apache_conf_ext|default('.conf') }}
-  notify: "Restart Apache"
+  command: a2ensite status
+  args:
+    creates: /etc/apache2/sites-enabled/status{{ apache_conf_ext|default('.conf') }}
+  notify:
+    - Restart Apache
 
 - name: Weblog Module Configuration
   template:
diff --git a/tasks/configure.yml b/tasks/configure.yml
index 0613e74..6cc590b 100644
--- a/tasks/configure.yml
+++ b/tasks/configure.yml
@@ -70,7 +70,8 @@
   when: ansible_lsb.major_release == '12'
 
 - name: Check if KSM is available
-  stat: path='/sys/kernel/mm/ksm'
+  stat:
+    path: /sys/kernel/mm/ksm
   register: ksm
 
 # Note: copy module doesn't work here because parent directory /sys
-- 
GitLab