Skip to content
Snippets Groups Projects
Commit f331cf2d authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent e3fde877
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
mode: 0640 mode: 0640
state: '{{ drupal_domain.apache_auth.password is defined|ternary("present","absent") }}' state: '{{ drupal_domain.apache_auth.password is defined|ternary("present","absent") }}'
notify: notify:
- "Restart Apache" - Restart Apache
- name: Setup AuthType Basic Credentials for extra users - name: Setup AuthType Basic Credentials for extra users
htpasswd: htpasswd:
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
mode: 0640 mode: 0640
with_items: '{{ drupal_domain.apache_auth.extra_users|default([]) }}' with_items: '{{ drupal_domain.apache_auth.extra_users|default([]) }}'
notify: notify:
- "Restart Apache" - Restart Apache
tags: tags:
- ApacheConfig - ApacheConfig
...@@ -23,14 +23,14 @@ ...@@ -23,14 +23,14 @@
shell: drush -y {{ drushAlias }} sql-dump --result-file=/tmp/drupal-db-dump/{{ drushAlias }}.sql shell: drush -y {{ drushAlias }} sql-dump --result-file=/tmp/drupal-db-dump/{{ drushAlias }}.sql
args: args:
chdir: '{{ webRoot }}' 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 - name: Fetch Dump File
fetch: fetch:
src: /tmp/drupal-db-dump/{{ drushAlias }}.sql src: /tmp/drupal-db-dump/{{ drushAlias }}.sql
dest: '{{ dump_file }}' dest: '{{ dump_file }}'
flat: yes 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: tags:
- collect_db_dump - collect_db_dump
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
# - name: Deploy | Drush # - name: Deploy | Drush
# shell: "drush -y @{{ deploy.drush.alias }} {{ item }}" # shell: "drush -y @{{ deploy.drush.alias }} {{ item }}"
# with_items: # with_items:
# - "fra" # - fra
# - "cc all" # - cc all
# when: deploy.drush is defined # when: deploy.drush is defined
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
group: '{{ apacheUser }}' group: '{{ apacheUser }}'
mode: 0775 mode: 0775
with_nested: with_nested:
- {{ drupal.domains }} - '{{( drupal.domains }})'
- {{ drupal_config_directories }} - '{{( drupal_config_directories }})'
when: item.0.install|default(true) when: item.0.install|default(true)
when: not directory.stat.exists when: not directory.stat.exists
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
args: args:
chdir: '{{ webRoot }}' chdir: '{{ webRoot }}'
with_items: '{{ drupal_post_deploy_tasks[drupal.version|default("d7")] }}' 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: tags:
- deploy - deploy
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
dest: '{{ webRoot }}/{{ item.1 }}/{{ item.0.shortname|default("default") }}' dest: '{{ webRoot }}/{{ item.1 }}/{{ item.0.shortname|default("default") }}'
state: directory state: directory
with_nested: with_nested:
- {{ drupal.domains }} - '{{( drupal.domains }})'
- ['settings', 'config'] - ['settings', 'config']
when: item.0.install|default(true) when: item.0.install|default(true)
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
- include_tasks: files.yml - include_tasks: files.yml
with_nested: with_nested:
- {{ drupal.domains }} - '{{( drupal.domains }})'
- ['files', 'private'] - ['files', 'private']
loop_control: loop_control:
loop_var: drupal_domain loop_var: drupal_domain
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
state: link state: link
force: yes force: yes
with_subelements: with_subelements:
- {{ drupal.domains }} - '{{( drupal.domains }})'
- aliases - aliases
when: drupal.version|default("d7") == "d6" and drupal_d6_create_symbolic_links and item.0.install|default(true) when: drupal.version|default("d7") == "d6" and drupal_d6_create_symbolic_links and item.0.install|default(true)
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
user: '{{ item.1.user|default(cronUser) }}' user: '{{ item.1.user|default(cronUser) }}'
disabled: '{{ item.1.disabled|default(false) }}' disabled: '{{ item.1.disabled|default(false) }}'
with_subelements: with_subelements:
- {{ drupal.domains }} - '{{( drupal.domains }})'
- crontabs - crontabs
tags: tags:
- cron - cron
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
path: '{{ webRoot }}/files/{{ drupal_domain.0.shortname|default("default") }}/{{ drupal_domain.1 }}/.htaccess' path: '{{ webRoot }}/files/{{ drupal_domain.0.shortname|default("default") }}/{{ drupal_domain.1 }}/.htaccess'
mode: 0444 mode: 0444
with_nested: with_nested:
- {{ drupal.domains }} - '{{( drupal.domains }})'
- ['files', 'private'] - ['files', 'private']
loop_control: loop_control:
loop_var: drupal_domain loop_var: drupal_domain
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
- localhost - localhost
- 127.0.0.1 - 127.0.0.1
- ::1 - ::1
- {{ inventory_hostname }} - '{{( inventory_hostname }})'
when: db.username is defined and db.username != 'root' when: db.username is defined and db.username != 'root'
ignore_errors: yes ignore_errors: yes
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
login_host: 127.0.0.1 login_host: 127.0.0.1
login_port: '{{ item.0.port|default("3306") }}' login_port: '{{ item.0.port|default("3306") }}'
with_nested: with_nested:
- {{ extra }} - '{{( extra }})'
- ['localhost', '127.0.0.1', '::1'] - ['localhost', '127.0.0.1', '::1']
when: item.0.username is defined and item.0.username != 'root' when: item.0.username is defined and item.0.username != 'root'
ignore_errors: yes ignore_errors: yes
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
login_host: 127.0.0.1 login_host: 127.0.0.1
login_port: '{{ item.0.port|default("3306") }}' login_port: '{{ item.0.port|default("3306") }}'
with_nested: with_nested:
- {{ external }} - '{{( external }})'
- {{ external_hosts }} - '{{( external_hosts }})'
when: item.0.username is defined and item.0.username != 'root' when: item.0.username is defined and item.0.username != 'root'
ignore_errors: yes ignore_errors: yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment