<commit_before>---

- name: Ensure COmanage Registry root directory exists
  file:
    path: "{{ comanage_root_dir }}"
    state: directory
    owner: root
    group: root
  become: yes

- name: Ensure COmanage Registry source is cloned under root directory
  git:
    repo: "{{ comanage_repo }}"
    dest: "{{ comanage_root_dir }}/comanage-registry-{{ comanage_version }}"
    version: "{{ comanage_version }}"
    accept_hostkey: yes
  ignore_errors: yes
  become: yes

- name: Ensure symbolic link to current COmanage Registry installation exists
  file:
    src: "{{ comanage_root_dir }}/comanage-registry-{{ comanage_version }}"
    dest: "{{ comanage_path }}"
    force: yes
    state: link
    owner: root
    group: root
  become: yes

- name: Ensure COmanage Registry webroot directory exists
  file:
    src: "{{ comanage_path }}/app/webroot"
    dest: "{{ comanage_webroot }}"
    state: link
    force: yes
    owner: root
    group: root
  become: yes

- name: Ensure COmanage Registry temp directory tree is initialised
  command: "cp -r {{ comanage_path }}/app/tmp.dist {{ comanage_temp_dir }}"
  args:
    creates: "{{ comanage_temp_dir }}"
  become: yes

- name: Ensure COmanage Registry temp directory exists and is writable by webserver only
  file:
    path: "{{ comanage_temp_dir }}"
    state: directory
    owner: "{{ comanage_webserver_user }}"
    group: "{{ comanage_webserver_group }}"
    mode: 0701
  become: yes

- name: Ensure COmanage Registry temp directory tree is owned by webserver
  file:
    path: "{{ comanage_temp_dir }}"
    owner: "{{ comanage_webserver_user }}"
    group: "{{ comanage_webserver_group }}"
    recurse: yes
  become: yes

- name: Ensure link to COmanage Registry temp directory exists
  file:
    src: "{{ comanage_temp_dir }}"
    dest: "{{ comanage_path }}/local/tmp"
    state: link
    owner: root
    group: root
  become: yes<commit_msg>COmanage tmp directory permissions<commit_after>---

- name: Ensure COmanage Registry root directory exists
  file:
    path: "{{ comanage_root_dir }}"
    state: directory
    owner: root
    group: root
  become: yes

- name: Ensure COmanage Registry source is cloned under root directory
  git:
    repo: "{{ comanage_repo }}"
    dest: "{{ comanage_root_dir }}/comanage-registry-{{ comanage_version }}"
    version: "{{ comanage_version }}"
    accept_hostkey: yes
  ignore_errors: yes
  become: yes

- name: Ensure symbolic link to current COmanage Registry installation exists
  file:
    src: "{{ comanage_root_dir }}/comanage-registry-{{ comanage_version }}"
    dest: "{{ comanage_path }}"
    force: yes
    state: link
    owner: root
    group: root
  become: yes

- name: Ensure COmanage Registry webroot directory exists
  file:
    src: "{{ comanage_path }}/app/webroot"
    dest: "{{ comanage_webroot }}"
    state: link
    force: yes
    owner: root
    group: root
  become: yes

- name: Ensure COmanage Registry temp directory tree is initialised
  command: "cp -r {{ comanage_path }}/app/tmp.dist {{ comanage_temp_dir }}"
  args:
    creates: "{{ comanage_temp_dir }}"
  become: yes

- name: Ensure COmanage Registry temp directory exists and is writable by webserver only
  file:
    path: "{{ comanage_temp_dir }}"
    state: directory
    owner: "{{ comanage_webserver_user }}"
    group: "{{ comanage_webserver_group }}"
    mode: 0700
    recurse: yes
  become: yes

- name: Ensure link to COmanage Registry temp directory exists
  file:
    src: "{{ comanage_temp_dir }}"
    dest: "{{ comanage_path }}/local/tmp"
    state: link
    owner: root
    group: root
    follow: no
  become: yes
{'fraction_non_alphanumeric': 0.10886985355070461, 'fraction_numerical': 0.0022105554020447637, 'mean_word_length': 3.324970131421744, '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': '2877362', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1210, 'n_words': 354}