<commit_before>---
- name: ensure local machine has necessary virt packages
  yum: name=libguestfs-tools-c state=latest

- name: download base image file
  get_url: url={{ base_image_url }} dest=/tmp/

- name: add 20G empty space to disk image
  shell: qemu-img resize /tmp/{{ base_image_filename }} +20G

- name: create tmp disk for first resize pass
  shell: qemu-img create -f qcow2 -o preallocation=metadata /tmp/osptmp1.qcow2 31G

- name: resize root partition from 6 to 10G
  shell: virt-resize --quiet --resize /dev/sda1=+4G /tmp/{{ base_image_filename }} /tmp/osptmp1.qcow2

- name: create tmp disk for adding second partition for docker thinpool
  shell: qemu-img create -f qcow2 -o preallocation=metadata /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2 32G

- name: resize second partition to use all free space
  shell: virt-resize --quiet --expand /dev/sda2 /tmp/osptmp1.qcow2 /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2

- name: set root password in image
  shell: virt-customize --root-password password:{{ root_password }} -a /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2

- name: compress disk image
  shell: tar cvzf /tmp/{{ base_image_filename }}_resized.qcow2.tar.gz /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2
<commit_msg>bad idea to compress the image by default<commit_after>---
- name: ensure local machine has necessary virt packages
  yum: name=libguestfs-tools-c state=latest

- name: download base image file
  get_url: url={{ base_image_url }} dest=/tmp/

- name: add 20G empty space to disk image
  shell: qemu-img resize /tmp/{{ base_image_filename }} +20G

- name: create tmp disk for first resize pass
  shell: qemu-img create -f qcow2 -o preallocation=metadata /tmp/osptmp1.qcow2 31G

- name: resize root partition from 6 to 10G
  shell: virt-resize --quiet --resize /dev/sda1=+4G /tmp/{{ base_image_filename }} /tmp/osptmp1.qcow2

- name: create tmp disk for adding second partition for docker thinpool
  shell: qemu-img create -f qcow2 -o preallocation=metadata /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2 32G

- name: resize second partition to use all free space
  shell: virt-resize --quiet --expand /dev/sda2 /tmp/osptmp1.qcow2 /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2

- name: set root password in image
  shell: virt-customize --root-password password:{{ root_password }} -a /tmp/{{ base_image_filename }}_resized_{{ image_tag }}.qcow2

{'fraction_non_alphanumeric': 0.11591276252019386, 'fraction_numerical': 0.0210016155088853, 'mean_word_length': 4.055102040816327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2402593', 'n_tokens_mistral': 868, 'n_tokens_neox': 830, 'n_words': 280}