From f331cf2d634312da74907090adcaa2ad5efc6ff7 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Tue, 11 Jun 2019 09:03:16 +0200
Subject: [PATCH] ansible-playbooks/general#85 Linting

---
 tasks/apache_auth.yml          |  4 ++--
 tasks/collect_db_dump/dump.yml |  4 ++--
 tasks/deploy/d7.yml            |  4 ++--
 tasks/deploy/finalize_d8.yml   |  4 ++--
 tasks/deploy/post-tasks.yml    |  2 +-
 tasks/install.yml              | 10 +++++-----
 tasks/mysql.yml                |  8 ++++----
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/tasks/apache_auth.yml b/tasks/apache_auth.yml
index fc1d590..e3a7750 100644
--- a/tasks/apache_auth.yml
+++ b/tasks/apache_auth.yml
@@ -21,7 +21,7 @@
         mode: 0640
         state: '{{ drupal_domain.apache_auth.password is defined|ternary("present","absent") }}'
       notify:
-        - "Restart Apache"
+        - Restart Apache
 
     - name: Setup AuthType Basic Credentials for extra users
       htpasswd:
@@ -33,7 +33,7 @@
         mode: 0640
       with_items: '{{ drupal_domain.apache_auth.extra_users|default([]) }}'
       notify:
-        - "Restart Apache"
+        - Restart Apache
 
   tags:
     - ApacheConfig
diff --git a/tasks/collect_db_dump/dump.yml b/tasks/collect_db_dump/dump.yml
index 4d4a088..a817a39 100644
--- a/tasks/collect_db_dump/dump.yml
+++ b/tasks/collect_db_dump/dump.yml
@@ -23,14 +23,14 @@
       shell: drush -y {{ drushAlias }} sql-dump --result-file=/tmp/drupal-db-dump/{{ drushAlias }}.sql
       args:
         chdir: '{{ webRoot }}'
-      when: "drush_status is defined and ('Successful' in drush_status.stdout|default('') or 'Erfolgreich' in drush_status.stdout|default(''))"
+      when: drush_status is defined and ('Successful' in drush_status.stdout|default('') or 'Erfolgreich' in drush_status.stdout|default(''))
 
     - name: Fetch Dump File
       fetch:
         src: /tmp/drupal-db-dump/{{ drushAlias }}.sql
         dest: '{{ dump_file }}'
         flat: yes
-      when: "drush_status is defined and ('Successful' in drush_status.stdout|default('') or 'Erfolgreich' in drush_status.stdout|default(''))"
+      when: drush_status is defined and ('Successful' in drush_status.stdout|default('') or 'Erfolgreich' in drush_status.stdout|default(''))
 
   tags:
     - collect_db_dump
diff --git a/tasks/deploy/d7.yml b/tasks/deploy/d7.yml
index 5a046af..c8414fa 100644
--- a/tasks/deploy/d7.yml
+++ b/tasks/deploy/d7.yml
@@ -8,6 +8,6 @@
 # - name: Deploy | Drush
 #   shell: "drush -y @{{ deploy.drush.alias }} {{ item }}"
 #   with_items:
-#     - "fra"
-#     - "cc all"
+#     - fra
+#     - cc all
 #   when: deploy.drush is defined
diff --git a/tasks/deploy/finalize_d8.yml b/tasks/deploy/finalize_d8.yml
index 7d570ae..0608fe3 100644
--- a/tasks/deploy/finalize_d8.yml
+++ b/tasks/deploy/finalize_d8.yml
@@ -43,8 +43,8 @@
             group: '{{ apacheUser }}'
             mode: 0775
           with_nested:
-            - {{ drupal.domains }}
-            - {{ drupal_config_directories }}
+            - '{{( drupal.domains }})'
+            - '{{( drupal_config_directories }})'
           when: item.0.install|default(true)
 
       when: not directory.stat.exists
diff --git a/tasks/deploy/post-tasks.yml b/tasks/deploy/post-tasks.yml
index 932e8ec..605f95e 100644
--- a/tasks/deploy/post-tasks.yml
+++ b/tasks/deploy/post-tasks.yml
@@ -24,7 +24,7 @@
       args:
         chdir: '{{ webRoot }}'
       with_items: '{{ drupal_post_deploy_tasks[drupal.version|default("d7")] }}'
-      when: "drush_status is defined and ('Successful' in drush_status.stdout|default('') or 'Erfolgreich' in drush_status.stdout|default(''))"
+      when: drush_status is defined and ('Successful' in drush_status.stdout|default('') or 'Erfolgreich' in drush_status.stdout|default(''))
 
   tags:
     - deploy
diff --git a/tasks/install.yml b/tasks/install.yml
index 9f618ae..cc942ea 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -119,7 +119,7 @@
     dest: '{{ webRoot }}/{{ item.1 }}/{{ item.0.shortname|default("default") }}'
     state: directory
   with_nested:
-    - {{ drupal.domains }}
+    - '{{( drupal.domains }})'
     - ['settings', 'config']
   when: item.0.install|default(true)
 
@@ -145,7 +145,7 @@
 
 - include_tasks: files.yml
   with_nested:
-    - {{ drupal.domains }}
+    - '{{( drupal.domains }})'
     - ['files', 'private']
   loop_control:
     loop_var: drupal_domain
@@ -160,7 +160,7 @@
     state: link
     force: yes
   with_subelements:
-    - {{ drupal.domains }}
+    - '{{( drupal.domains }})'
     - aliases
   when: drupal.version|default("d7") == "d6" and drupal_d6_create_symbolic_links and item.0.install|default(true)
 
@@ -257,7 +257,7 @@
     user: '{{ item.1.user|default(cronUser) }}'
     disabled: '{{ item.1.disabled|default(false) }}'
   with_subelements:
-    - {{ drupal.domains }}
+    - '{{( drupal.domains }})'
     - crontabs
   tags:
     - cron
@@ -282,7 +282,7 @@
     path: '{{ webRoot }}/files/{{ drupal_domain.0.shortname|default("default") }}/{{ drupal_domain.1 }}/.htaccess'
     mode: 0444
   with_nested:
-    - {{ drupal.domains }}
+    - '{{( drupal.domains }})'
     - ['files', 'private']
   loop_control:
     loop_var: drupal_domain
diff --git a/tasks/mysql.yml b/tasks/mysql.yml
index daa93a3..68281da 100644
--- a/tasks/mysql.yml
+++ b/tasks/mysql.yml
@@ -45,7 +45,7 @@
         - localhost
         - 127.0.0.1
         - ::1
-        - {{ inventory_hostname }}
+        - '{{( inventory_hostname }})'
       when: db.username is defined and db.username != 'root'
       ignore_errors: yes
 
@@ -61,7 +61,7 @@
         login_host: 127.0.0.1
         login_port: '{{ item.0.port|default("3306") }}'
       with_nested:
-        - {{ extra }}
+        - '{{( extra }})'
         - ['localhost', '127.0.0.1', '::1']
       when: item.0.username is defined and item.0.username != 'root'
       ignore_errors: yes
@@ -78,8 +78,8 @@
         login_host: 127.0.0.1
         login_port: '{{ item.0.port|default("3306") }}'
       with_nested:
-        - {{ external }}
-        - {{ external_hosts }}
+        - '{{( external }})'
+        - '{{( external_hosts }})'
       when: item.0.username is defined and item.0.username != 'root'
       ignore_errors: yes
 
-- 
GitLab