<commit_before>---
- name: Checking installed version of GDAL
  shell: /usr/bin/test $(ogrinfo --version |  sed -n 's/GDAL \(.*\), released.*/\1/p') = {{gdal.version}}
  register: gdal_installed
  ignore_errors: True

- name: Add UbuntuGIS Unstable repository
  apt_repository: repo='{{ gdal.repo }}' state=present

- name: Add repository key
  apt_key: data="{{ lookup('file', '314DF160.asc') }}"  state=present
  when: gdal_installed.rc != 0

- name: Install gdal dependencies
  apt: pkg=$item state=installed update-cache=yes
  when: gdal_installed.rc != 0
  with_items:
    - build-essential
    - python-all-dev
    - libgdal1h

- name: Download gdal
  when: gdal_installed.rc != 0
  get_url: url={{gdal.url}} dest=/tmp/gdal-{{ gdal.version }}.tar.gz

- name: Extract gdal
  when: gdal_installed.rc != 0
  command: tar -xvf /tmp/gdal-{{ gdal.version }}.tar.gz -C /tmp/gdal-{{ gdal.version }} chdir=/tmp
  sudo: yes

- name: Make, configure, and install gdal
  when: gdal_installed.rc != 0
  command: chdir=/tmp/gdal-{{ gdal.version }} {{item}}
  with_items:
    - ./configure --with-python
    - make
    - sudo make install<commit_msg>Ansible provisioner symlinks geos to fix RGeo on ubuntu<commit_after>---
- name: Checking installed version of GDAL
  shell: /usr/bin/test $(ogrinfo --version |  sed -n 's/GDAL \(.*\), released.*/\1/p') = {{gdal.version}}
  register: gdal_installed
  ignore_errors: True

- name: Add UbuntuGIS Unstable repository
  apt_repository: repo='{{ gdal.repo }}' state=present

- name: Add repository key
  apt_key: data="{{ lookup('file', '314DF160.asc') }}"  state=present
  when: gdal_installed.rc != 0

- name: Install gdal dependencies
  apt: pkg=$item state=installed update-cache=yes
  when: gdal_installed.rc != 0
  with_items:
    - build-essential
    - python-all-dev
    - libgdal1h

- name: Download gdal
  when: gdal_installed.rc != 0
  get_url: url={{gdal.url}} dest=/tmp/gdal-{{ gdal.version }}.tar.gz

- name: Extract gdal
  when: gdal_installed.rc != 0
  command: tar -xvf /tmp/gdal-{{ gdal.version }}.tar.gz -C /tmp/gdal-{{ gdal.version }} chdir=/tmp
  sudo: yes

- name: Make, configure, and install gdal
  when: gdal_installed.rc != 0
  command: chdir=/tmp/gdal-{{ gdal.version }} {{item}}
  with_items:
    - ./configure --with-python
    - make
    - sudo make install

- name: Get GEOS version
  shell: geos-config --version
  register: geos_version

- name: Symlink libgeos to correct place for use by RGeo
  file: src=/usr/lib/libgeos-{{geos_version.stdout}}.so dest=/usr/lib/libgeos.so state=link
  sudo: yes
{'fraction_non_alphanumeric': 0.15186915887850466, 'fraction_numerical': 0.010124610591900311, 'mean_word_length': 3.3322091062394605, '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': '1683326', 'n_tokens_mistral': 979, 'n_tokens_neox': 913, 'n_words': 242}