<commit_before>---
- hosts: "{{host}}"
  become: true
  gather_facts: true

  pre_tasks:
    - name: Update apt cache if needed.
      apt: update_cache=yes cache_valid_time=3600

  tasks:
  - name: update apt and autoremove
    apt:
      update_cache: yes
      cache_valid_time: 3600
      autoremove: yes

  - name: Install linux-image-extra-* for Ubuntu Trusty 14.04 (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: linux-image-extra-3.13.0-106-generic
      state: latest
    become: true

  - name: Install linux-image-extra-* for Ubuntu Trusty 14.04 (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: linux-image-extra-virtual
      state: latest
    become: true

  - name: Install apt-transport-https (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: apt-transport-https
      state: latest
    become: true

  - name: Install ca-certificates (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: ca-certificates
      state: latest
    become: true

  - name: Install software-properties-common (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: software-properties-common
      state: latest
    become: true

  - name: Add Docker apt key
    apt_key:
      url: https://download.docker.com/linux/ubuntu/gpg
      id: <KEY>
      state: present
    register: add_repository_key
    ignore_errors: true

  - name: Ensure curl is present (on older systems without SNI).
    apt:
      name: curl
      state: latest
    become: true
    when: add_repository_key|failed

  - name: Add Docker apt key (alternative for older systems without SNI).
    shell: "curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -"
    args:
      warn: no
    when: add_repository_key|failed

  - name: Add docker apt repo
    apt_repository:
      repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_lsb.codename}} edge"
      update_cache: yes
    become: true

  - name: Install Docker apt package
    apt:
      pkg: docker-ce
      state: latest
      update_cache: yes
    become: true

  - name: Ensure Docker service is installed and restarted
    service:
      name: docker
      state: restarted
      enabled: yes

  - name: Install Docker Compose (if configured).
    get_url:
      url: https://github.com/docker/compose/releases/download/1.15.0/docker-compose-Linux-x86_64
      dest: /usr/local/bin/docker-compose
      mode: 0755

  - name: Add vagrant user to docker group.
    user:
      name: vagrant
      groups: docker
      append: yes
    become: true<commit_msg>Docker Compose 1.15.0 --> 1.21.0<commit_after>---
- hosts: "{{host}}"
  become: true
  gather_facts: true

  pre_tasks:
    - name: Update apt cache if needed.
      apt: update_cache=yes cache_valid_time=3600

  tasks:
  - name: update apt and autoremove
    apt:
      update_cache: yes
      cache_valid_time: 3600
      autoremove: yes

  - name: Install linux-image-extra-* for Ubuntu Trusty 14.04 (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: linux-image-extra-3.13.0-106-generic
      state: latest
    become: true

  - name: Install linux-image-extra-* for Ubuntu Trusty 14.04 (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: linux-image-extra-virtual
      state: latest
    become: true

  - name: Install apt-transport-https (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: apt-transport-https
      state: latest
    become: true

  - name: Install ca-certificates (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: ca-certificates
      state: latest
    become: true

  - name: Install software-properties-common (see https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)
    apt:
      name: software-properties-common
      state: latest
    become: true

  - name: Add Docker apt key
    apt_key:
      url: https://download.docker.com/linux/ubuntu/gpg
      id: <KEY>
      state: present
    register: add_repository_key
    ignore_errors: true

  - name: Ensure curl is present (on older systems without SNI).
    apt:
      name: curl
      state: latest
    become: true
    when: add_repository_key|failed

  - name: Add Docker apt key (alternative for older systems without SNI).
    shell: "curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -"
    args:
      warn: no
    when: add_repository_key|failed

  - name: Add docker apt repo
    apt_repository:
      repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_lsb.codename}} edge"
      update_cache: yes
    become: true

  - name: Install Docker apt package
    apt:
      pkg: docker-ce
      state: latest
      update_cache: yes
    become: true

  - name: Ensure Docker service is installed and restarted
    service:
      name: docker
      state: restarted
      enabled: yes

  - name: Install Docker Compose (if configured).
    get_url:
      url: https://github.com/docker/compose/releases/download/1.21.0/docker-compose-Linux-x86_64
      dest: /usr/local/bin/docker-compose
      mode: 0755

  - name: Add vagrant user to docker group.
    user:
      name: vagrant
      groups: docker
      append: yes
    become: true
{'fraction_non_alphanumeric': 0.10639026897378791, 'fraction_numerical': 0.020901147849922905, 'mean_word_length': 2.6972767574414185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2147948', 'n_tokens_mistral': 2039, 'n_tokens_neox': 1834, 'n_words': 462}