<commit_before>- name: install required packages
  apt:
    name: "{{ item }}"
  with_items:
    - debootstrap
    - qemu-utils
    - curl
    - uuid-runtime
    - parted
    - libssl-dev
    - python-dev
    - libffi-dev

- name: Create group.
  group:
    name: nodepool

- name: Create user.
  user:
    createhome: yes
    group: nodepool
    home: /var/lib/nodepool
    name: nodepool

- name: Ensure clouds.yaml directory
  file:
    path: /var/lib/nodepool/.config/openstack
    state: directory
    owner: nodepool
    group: nodepool

- name: Write clouds.yaml
  template:
    src: var/lib/nodepool/config/openstack/clouds.yaml
    dest: /var/lib/nodepool/.config/openstack/clouds.yaml
    owner: nodepool
    group: nodepool
    mode: 0600

- name: install nodepool sudoers file (for DIB builds)
  copy:
    dest: /etc/sudoers.d/99_nodepool_suoders
    mode: 0400
    owner: root
    content: "nodepool ALL=(ALL) NOPASSWD:ALL"

- name: ensure image build directory
  file:
    path: /opt/nodepool/images
    state: directory
    owner: nodepool
    group: nodepool

- name: Git clone nodepool
  git:
    dest: "{{ nodepool_source_dir }}"
    repo: https://git.openstack.org/openstack-infra/nodepool
    version: master

- name: Install nodepool
  pip:
    name: "{{ nodepool_source_dir }}"
    virtualenv: "{{ nodepool_venv_dir }}"
    state: latest
  notify:
    - Restart nodepool
<commit_msg>Fix nodepool pip install to only run with new commits<commit_after>- name: install required packages
  apt:
    name: "{{ item }}"
  with_items:
    - debootstrap
    - qemu-utils
    - curl
    - uuid-runtime
    - parted
    - libssl-dev
    - python-dev
    - libffi-dev

- name: Create group.
  group:
    name: nodepool

- name: Create user.
  user:
    createhome: yes
    group: nodepool
    home: /var/lib/nodepool
    name: nodepool

- name: Ensure clouds.yaml directory
  file:
    path: /var/lib/nodepool/.config/openstack
    state: directory
    owner: nodepool
    group: nodepool

- name: Write clouds.yaml
  template:
    src: var/lib/nodepool/config/openstack/clouds.yaml
    dest: /var/lib/nodepool/.config/openstack/clouds.yaml
    owner: nodepool
    group: nodepool
    mode: 0600

- name: install nodepool sudoers file (for DIB builds)
  copy:
    dest: /etc/sudoers.d/99_nodepool_suoders
    mode: 0400
    owner: root
    content: "nodepool ALL=(ALL) NOPASSWD:ALL"

- name: ensure image build directory
  file:
    path: /opt/nodepool/images
    state: directory
    owner: nodepool
    group: nodepool

- name: Git clone nodepool
  git:
    dest: "{{ nodepool_source_dir }}"
    repo: https://git.openstack.org/openstack-infra/nodepool
    version: master
  register: nodepool_git

- name: Install nodepool
  pip:
    name: "{{ nodepool_source_dir }}"
    virtualenv: "{{ nodepool_venv_dir }}"
    state: latest
  when: nodepool_git.changed
  notify: Restart nodepool

{'fraction_non_alphanumeric': 0.10351966873706005, 'fraction_numerical': 0.006901311249137336, 'mean_word_length': 2.6557377049180326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '1336916', 'n_tokens_mistral': 1011, 'n_tokens_neox': 1040, 'n_words': 251}