<commit_before>---

- fail:
    msg="ansible-role-girder only supports Ubuntu Trusty/Xenial and Redhat/CentOS 7."
  when: (ansible_distribution_release != "trusty") and
        (ansible_distribution_release != "xenial") and
        (ansible_os_family == "RedHat" and ansible_distribution_major_version != "7")

- name: Ensure girder base directory exists
  file:
    path: "{{ girder_path }}"
    state: directory
    group: "{{ ansible_user_id }}"
    owner: "{{ ansible_user_id }}"
    mode: 0755
  become: yes
  become_user: root

- include: npm-RedHat.yml
  when:
    - girder_web
    - ansible_os_family == "RedHat"

- include: npm-Debian.yml
  when:
    - girder_web
    - ansible_os_family == "Debian"

- name: Install virtualenv
  apt:
    name: python-virtualenv
    state: latest
  become: yes
  become_user: root
  when:
    - girder_virtualenv is defined
    - ansible_os_family == "Debian"

- name: Install virtualenv
  yum:
    name: python-virtualenv
    state: latest
  become: yes
  become_user: root
  when:
    - girder_virtualenv is defined
    - ansible_os_family == "RedHat"

- include: girder.yml

- include: pip.yml
  when: girder_virtualenv is not defined
  become: yes
  become_user: root

- include: pip.yml
  when: girder_virtualenv is defined

- include: daemon.yml
  when: girder_daemonize

- name: Install Girder Plugins
  command: "{{ girder_install_executable|default('girder-install') }} plugin {{ item.args|default('') }} {{ item.path }}"
  with_items: "{{ girder_plugins }}"

- name: Build Girder (web)
  command: "{{ girder_install_executable|default('girder-install') }} web {{ girder_web_extra_args }}"
  args:
    chdir: "{{ girder_path }}"
  # ensure that the install is one that uses web assets and
  # the assets are always supposed to be rebuilt, or the files have changed (from git)
  when: girder_web and (girder_always_build_assets or girder_files_updated)<commit_msg>allow items to be strings -- use them as item.path<commit_after>---

- fail:
    msg="ansible-role-girder only supports Ubuntu Trusty/Xenial and Redhat/CentOS 7."
  when: (ansible_distribution_release != "trusty") and
        (ansible_distribution_release != "xenial") and
        (ansible_os_family == "RedHat" and ansible_distribution_major_version != "7")

- name: Ensure girder base directory exists
  file:
    path: "{{ girder_path }}"
    state: directory
    group: "{{ ansible_user_id }}"
    owner: "{{ ansible_user_id }}"
    mode: 0755
  become: yes
  become_user: root

- include: npm-RedHat.yml
  when:
    - girder_web
    - ansible_os_family == "RedHat"

- include: npm-Debian.yml
  when:
    - girder_web
    - ansible_os_family == "Debian"

- name: Install virtualenv
  apt:
    name: python-virtualenv
    state: latest
  become: yes
  become_user: root
  when:
    - girder_virtualenv is defined
    - ansible_os_family == "Debian"

- name: Install virtualenv
  yum:
    name: python-virtualenv
    state: latest
  become: yes
  become_user: root
  when:
    - girder_virtualenv is defined
    - ansible_os_family == "RedHat"

- include: girder.yml

- include: pip.yml
  when: girder_virtualenv is not defined
  become: yes
  become_user: root

- include: pip.yml
  when: girder_virtualenv is defined

- include: daemon.yml
  when: girder_daemonize

- name: Install Girder Plugins
  command: "{{ girder_install_executable|default('girder-install') }} plugin {{ item.args|default('') }} {{ item.path|default(item) }}"
  with_items: "{{ girder_plugins }}"

- name: Build Girder (web)
  command: "{{ girder_install_executable|default('girder-install') }} web {{ girder_web_extra_args }}"
  args:
    chdir: "{{ girder_path }}"
  # ensure that the install is one that uses web assets and
  # the assets are always supposed to be rebuilt, or the files have changed (from git)
  when: girder_web and (girder_always_build_assets or girder_files_updated)
{'fraction_non_alphanumeric': 0.10976552434939449, 'fraction_numerical': 0.003091986601391394, 'mean_word_length': 3.604982206405694, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2546485', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1343, 'n_words': 343}