<commit_before>include:
    - php

drupal:
    file.managed:
        - unless: ls {{ salt['pillar.get']('drupal:home', '/var/www/drupal') }}/sites/default/settings.php
        - name: /tmp/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}.tar.gz
        - source: http://ftp.drupal.org/files/projects/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}.tar.gz
        - source_hash: {{ salt['pillar.get']('drupal:source_hash') }}

extract-drupal:
    module.run:
        - name: archive.gunzip
        - options: zxf
        - gunzip: /tmp/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}.tar.gz
        - dest: {{ salt['pillar.get']('drupal:home', '/var/www/') }}{{ salt['pillar.get']('drupal:name', 'drupal') }}

<commit_msg>Fixed extracting and added where drupal should finally rest.<commit_after>include:
    - php

drupal:
    file.managed:
        - unless: ls {{ salt['pillar.get']('drupal:home', '/var/www/drupal') }}/sites/default/settings.php
        - name: /tmp/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}.tar.gz
        - source: http://ftp.drupal.org/files/projects/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}.tar.gz
        - source_hash: {{ salt['pillar.get']('drupal:source_hash') }}


{{ salt['pillar.get']('drupal:home', '/var/www/') }}:
    file.directory:
        - user: www-data
        - group: www-data
        - dir_mode: 755
        - file_mode: 644
        - makedirs: True

extract-drupal:
    module.run:
        - name: archive.tar
        - options: zxf
        - tarfile: /tmp/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}.tar.gz
        - dest: {{ salt['pillar.get']('drupal:home', '/var/www/') }}

rename-drupal:
    file.rename:
        - name: {{ salt['pillar.get']('drupal:home', '/var/www/') }}/drupal-{{ salt['pillar.get']('drupal:name') }}
        - source: {{ salt['pillar.get']('drupal:home', '/var/www/') }}/drupal-{{ salt['pillar.get']('drupal:version', '7.26') }}

{'fraction_non_alphanumeric': 0.23353596757852077, 'fraction_numerical': 0.013677811550151976, 'mean_word_length': 2.872549019607843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 9, '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': '7342013', 'n_tokens_mistral': 765, 'n_tokens_neox': 745, 'n_words': 106}