<commit_before>---
- hosts: all
  name: Repository
  connection: local
  vars:

    local_magento_file_path: ../files/repository
    local_magento_repository_path: ../../websites/magento
    local_magento_web_path: ../../websites/magento/web-root
    local_wordpress_repository_path: ../../websites/wordpress
    local_profiler_repository_path: ../../websites/profiler
    local_database_path: ../files/database

  tasks:

    - name: Include Configuration
      include_vars: ../../ansiblealexa.yml

    # Databases

    - name: Remove Existing Databases
      command: rm -f {{ local_database_path }}/{{ item }}
      with_items:
        - magento-template.sql
        - magento-template.sql.gz
        - wordpress-template.sql
        - wordpress-template.sql.gz

    - name: Fetch Databases
      command: curl {{ database_path }}/{{ item }}.sql.gz -o {{ local_database_path }}/{{ item }}.sql.gz
      with_items:
        - magento-template
        - wordpress-template

    - name: Decompress Databases
      command: gzip -d {{ local_database_path }}/{{ item }}.sql.gz
      with_items:
        - magento-template
        - wordpress-template

    # Magento Repository

    - name: Check Magento
      stat: path=../../websites/magento/.git
      register: check_magento_path

    - name: Clone Magento
      git: repo={{ repository_magento }} dest={{ local_magento_repository_path }}
      when: check_magento_path.stat.exists == false

    - name: Clear Magento Lightspeed
      command: rm -rf /usr/share/nginx/www/magento/web-root/var/lightspeed/*
      ignore_errors: yes

    - name: Clear Magento Cache
      command: rm -rf /usr/share/nginx/www/magento/web-root/var/cache/*
      ignore_errors: yes

    # Wordpress Repository

    - name: Check Wordpress
      stat: path=../../websites/wordpress/.git
      register: check_wordpress_path

    - name: Clone Wordpress
      git: repo={{ repository_wordpress }} dest={{ local_wordpress_repository_path }}
      when: check_wordpress_path.stat.exists == false

    # Profiler (Aoe_Profiler) Repository

    - name: Check Profiler
      stat: path=../../websites/profiler/.git
      register: check_profiler_path

    - name: Clone Profiler Repo
      git: repo={{ repository_profiler }} dest={{ local_profiler_repository_path }}
      when: check_profiler_path.stat.exists == false

    - name: Install Profile to Magento (app)
      shell: cp -fR {{ local_profiler_repository_path }}/app/* {{ local_magento_web_path }}/app/
      ignore_errors: no

    - name: Install Profile to Magento (skin)
      shell: cp -fR {{ local_profiler_repository_path }}/skin/* {{ local_magento_web_path }}/skin/
      ignore_errors: no

    - name: Remove Profile Repo
      command: rm -fR {{ local_profiler_repository_path }}
      ignore_errors: yes

    - name: Rename Default index.php
      shell: mv -f {{ local_magento_web_path }}/index.php {{ local_magento_web_path }}/index.php.DEFAULT
      ignore_errors: yes

    - name: Copy Profiler index.php to Magento
      shell: cp -fR {{ local_magento_file_path }}/index.php {{ local_magento_web_path }}
      ignore_errors: yes<commit_msg>profiler section on minicart is not showing anymore<commit_after>---
- hosts: all
  name: Repository
  connection: local
  vars:

    local_magento_file_path: ../files/repository
    local_magento_repository_path: ../../websites/magento
    local_magento_web_path: ../../websites/magento/web-root
    local_wordpress_repository_path: ../../websites/wordpress
    local_profiler_repository_path: ../../websites/profiler
    local_database_path: ../files/database

  tasks:

    - name: Include Configuration
      include_vars: ../../ansiblealexa.yml

    # Databases

    - name: Remove Existing Databases
      command: rm -f {{ local_database_path }}/{{ item }}
      with_items:
        - magento-template.sql
        - magento-template.sql.gz
        - wordpress-template.sql
        - wordpress-template.sql.gz

    - name: Fetch Databases
      command: curl {{ database_path }}/{{ item }}.sql.gz -o {{ local_database_path }}/{{ item }}.sql.gz
      with_items:
        - magento-template
        - wordpress-template

    - name: Decompress Databases
      command: gzip -d {{ local_database_path }}/{{ item }}.sql.gz
      with_items:
        - magento-template
        - wordpress-template

    # Magento Repository

    - name: Check Magento
      stat: path=../../websites/magento/.git
      register: check_magento_path

    - name: Clone Magento
      git: repo={{ repository_magento }} dest={{ local_magento_repository_path }}
      when: check_magento_path.stat.exists == false

    - name: Clear Magento Lightspeed
      command: rm -rf /usr/share/nginx/www/magento/web-root/var/lightspeed/*
      ignore_errors: yes

    - name: Clear Magento Cache
      command: rm -rf /usr/share/nginx/www/magento/web-root/var/cache/*
      ignore_errors: yes

    # Wordpress Repository

    - name: Check Wordpress
      stat: path=../../websites/wordpress/.git
      register: check_wordpress_path

    - name: Clone Wordpress
      git: repo={{ repository_wordpress }} dest={{ local_wordpress_repository_path }}
      when: check_wordpress_path.stat.exists == false

    # Profiler (Aoe_Profiler) Repository

    - name: Check Profiler
      stat: path=../../websites/profiler/.git
      register: check_profiler_path

    - name: Clone Profiler Repo
      git: repo={{ repository_profiler }} dest={{ local_profiler_repository_path }}
      when: check_profiler_path.stat.exists == false

    - name: Install Profile to Magento (app)
      shell: cp -fR {{ local_profiler_repository_path }}/app/* {{ local_magento_web_path }}/app/
      ignore_errors: no

    - name: Install Profile to Magento (skin)
      shell: cp -fR {{ local_profiler_repository_path }}/skin/* {{ local_magento_web_path }}/skin/
      ignore_errors: no

    - name: Remove Profile Repo
      command: rm -fR {{ local_profiler_repository_path }}
      ignore_errors: yes

    - name: Rename Default index.php
      shell: mv -f {{ local_magento_web_path }}/index.php {{ local_magento_web_path }}/index.php.DEFAULT
      ignore_errors: yes

    - name: Copy Profiler index.php to Magento
      shell: cp -fR {{ local_magento_file_path }}/index.php {{ local_magento_web_path }}
      ignore_errors: yes

    - name: Copy Profiler Fixed Css to Magento
      shell: cp -fR {{ local_magento_file_path }}/aoe_profiler/css/styles.css {{ local_magento_web_path }}/skin/frontend/base/default/aoe_profiler/css
      ignore_errors: no
{'fraction_non_alphanumeric': 0.11450848494114049, 'fraction_numerical': 0.0, 'mean_word_length': 2.7086167800453516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6416010', 'n_tokens_mistral': 2083, 'n_tokens_neox': 2061, 'n_words': 456}