<commit_before>---

- name: "Include OS specific variables"
  include_vars: "{{ item }}"
  with_first_found:
    - "{{ ansible_distribution }}-{{ ansible_distribution_version}}.yml"
    - "{{ ansible_distribution }}.yml"
  tags: "always"

- name: "Install AtoM dependencies"
  block:
    - include: "deps.yml"
      tags:
        - "atom-deps"
      when:
        - ansible_distribution == "Ubuntu"

    - include: "deps-rh.yml"
      tags:
        - "atom-deps"
      when:
        - ansible_os_family == "RedHat"

    - include: "php.yml"
      tags:
        - "atom-php"
      when:
        - ansible_distribution == "Ubuntu"

    - include: "php-rh.yml"
      environment:
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      tags:
        - "atom-php"
      when:
        - ansible_os_family == "RedHat"

    - include: "fop.yml"
      environment:
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      tags:
        - "fop"

  when: atom_install_dependencies|bool == true

- name: "Define default atom_extra_path"
  set_fact:
    atom_extra_path: ""
  tags:
    - "atom-basic"
    - "atom-build"
    - "atom-cli"
    - "atom-devbox"
    - "atom-downloads"
    - "atom-flush"
    - "atom-plugins"
    - "atom-search"
    - "atom-site"
    - "atom-uploads"
    - "atom-worker"
    - "drmc-mock"

- include: "revision-dir.yml"
  when:
    - "atom_revision_directory_latest_symlink_dir is defined"
    - "atom_revision_directory|bool"
  tags:
    - "atom-basic"
    - "atom-build"
    - "atom-cli"
    - "atom-devbox"
    - "atom-downloads"
    - "atom-flush"
    - "atom-plugins"
    - "atom-search"
    - "atom-site"
    - "atom-uploads"
    - "atom-worker"
    - "drmc-mock"

- name: "Install AtoM site"
  block:
    - include: "php-pool-cfg.yml"
      tags:
        - "atom-php-pool-cfg"

    - include: "basic.yml"
      tags:
        - "atom-basic"

    - include: "init.yml"
      when:
        - "atom_auto_init is defined and atom_auto_init|bool"
      tags:
        - "atom-site"

    - include: "flush.yml"
      become_user: "{{ atom_user }}"
      environment:
        - "{{ atom_pool_php_envs }}"
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      when: "uninitialized or (atom_flush_data is defined and atom_flush_data|bool)"
      tags:
        - "atom-flush"

    - include: "plugins.yml"
      become_user: "{{ atom_user }}"
      environment:
        - "{{ atom_pool_php_envs }}"
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      tags:
        - "atom-plugins"

    - include: "cli_tools.yml"
      become_user: "{{ atom_user }}"
      tags:
        - "atom-search"<commit_msg>Check if uninitialized is defined<commit_after>---

- name: "Include OS specific variables"
  include_vars: "{{ item }}"
  with_first_found:
    - "{{ ansible_distribution }}-{{ ansible_distribution_version}}.yml"
    - "{{ ansible_distribution }}.yml"
  tags: "always"

- name: "Install AtoM dependencies"
  block:
    - include: "deps.yml"
      tags:
        - "atom-deps"
      when:
        - ansible_distribution == "Ubuntu"

    - include: "deps-rh.yml"
      tags:
        - "atom-deps"
      when:
        - ansible_os_family == "RedHat"

    - include: "php.yml"
      tags:
        - "atom-php"
      when:
        - ansible_distribution == "Ubuntu"

    - include: "php-rh.yml"
      environment:
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      tags:
        - "atom-php"
      when:
        - ansible_os_family == "RedHat"

    - include: "fop.yml"
      environment:
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      tags:
        - "fop"

  when: atom_install_dependencies|bool == true

- name: "Define default atom_extra_path"
  set_fact:
    atom_extra_path: ""
  tags:
    - "atom-basic"
    - "atom-build"
    - "atom-cli"
    - "atom-devbox"
    - "atom-downloads"
    - "atom-flush"
    - "atom-plugins"
    - "atom-search"
    - "atom-site"
    - "atom-uploads"
    - "atom-worker"
    - "drmc-mock"

- include: "revision-dir.yml"
  when:
    - "atom_revision_directory_latest_symlink_dir is defined"
    - "atom_revision_directory|bool"
  tags:
    - "atom-basic"
    - "atom-build"
    - "atom-cli"
    - "atom-devbox"
    - "atom-downloads"
    - "atom-flush"
    - "atom-plugins"
    - "atom-search"
    - "atom-site"
    - "atom-uploads"
    - "atom-worker"
    - "drmc-mock"

- name: "Install AtoM site"
  block:
    - include: "php-pool-cfg.yml"
      tags:
        - "atom-php-pool-cfg"

    - include: "basic.yml"
      tags:
        - "atom-basic"

    - include: "init.yml"
      when:
        - "atom_auto_init is defined and atom_auto_init|bool"
      tags:
        - "atom-site"

    - include: "flush.yml"
      become_user: "{{ atom_user }}"
      environment:
        - "{{ atom_pool_php_envs }}"
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      when: >
        (uninitialized is defined and uninitialized|bool) or
        (atom_flush_data is defined and atom_flush_data|bool)
      tags:
        - "atom-flush"

    - include: "plugins.yml"
      become_user: "{{ atom_user }}"
      environment:
        - "{{ atom_pool_php_envs }}"
        - PATH: "{{ ansible_env.PATH }}:/opt/rh/rh-php{{ php_version }}/root/bin/"
      tags:
        - "atom-plugins"

    - include: "cli_tools.yml"
      become_user: "{{ atom_user }}"
      tags:
        - "atom-search"
{'fraction_non_alphanumeric': 0.16175413371675054, 'fraction_numerical': 0.0, 'mean_word_length': 1.947563559322034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2076492', 'n_tokens_mistral': 2127, 'n_tokens_neox': 2028, 'n_words': 345}