<commit_before>---
- name: Download current version
  get_url: url="{{ engine_download_url }}" dest="{{ engine_build_path }}"

- name: Install current version
  unarchive: src={{ engine_build_path }} dest={{ openconext_releases_dir }} copy=no

- name: Install Apache vhost
  template: src={{ item }}.j2 dest=/etc/httpd/conf.d/{{ item }}
  with_items:
    - engine.conf
    - profile.conf
  notify:
    - restart httpd

- name: copy over the engineblock keys
  copy: content="{{ lookup('file', 'files/' + env_name + '/certs/' + item.value.privateKey) | vault(env) }}" dest={{ item.value.privateFile }}
  with_dict: engine_keys

- name: copy engineblock certificates to correct location
  copy: src=files/{{ env_name }}/certs/{{ item.value.publicKey }} dest={{ item.value.publicFile }}
  with_dict: engine_keys

- name: Configure EngineBlock
  template: src={{ item }}.j2 dest=/etc/openconext/{{ item }}
  with_items:
    - engineblock.ini

- name: Run EngineBlock migrations
  command: ./bin/migrate
  args:
    chdir: "{{ engine_release_dir }}"
  register: migrate_output
  changed_when: "'no update needed' not in migrate_output.stderr"

- name: Activate new EngineBlock
  file: src={{ engine_release_dir }} dest={{ engine_current_release_symlink }} state=link
  notify:
    - restart httpd

- name: import entries
  shell: ldapmodify -x -D cn=admin,cn=config -h {{ ldap_host }} -w {{ ldap_password | vault(env) }} -f {{ openconext_releases_dir }}/OpenConext-engineblock/ldap/changes/addDeprovisionWarningSentAttributes.ldif
  register: add_deprevision_output
  when: env == "vm"
  changed_when: "add_deprevision_output.rc != 20"
  failed_when: "add_deprevision_output.rc not in [20,0]"
  tags: ldap

- name: import entries
  shell: ldapmodify -x -D cn=admin,cn=config -h {{ ldap_host }} -w {{ ldap_password | vault(env) }} -f {{ openconext_releases_dir }}/OpenConext-engineblock/ldap/changes/addCollabPersonUUID.ldif
  register: add_collab_output
  when: env == "vm"
  changed_when: "add_collab_output.rc != 20"
  failed_when: "add_collab_output.rc not in [20,0]"<commit_msg>Don't exclude T-A-P from adding ldap datatypes.<commit_after>---
- name: Download current version
  get_url: url="{{ engine_download_url }}" dest="{{ engine_build_path }}"

- name: Install current version
  unarchive: src={{ engine_build_path }} dest={{ openconext_releases_dir }} copy=no

- name: Install Apache vhost
  template: src={{ item }}.j2 dest=/etc/httpd/conf.d/{{ item }}
  with_items:
    - engine.conf
    - profile.conf
  notify:
    - restart httpd

- name: copy over the engineblock keys
  copy: content="{{ lookup('file', 'files/' + env_name + '/certs/' + item.value.privateKey) | vault(env) }}" dest={{ item.value.privateFile }}
  with_dict: engine_keys

- name: copy engineblock certificates to correct location
  copy: src=files/{{ env_name }}/certs/{{ item.value.publicKey }} dest={{ item.value.publicFile }}
  with_dict: engine_keys

- name: Configure EngineBlock
  template: src={{ item }}.j2 dest=/etc/openconext/{{ item }}
  with_items:
    - engineblock.ini

- name: Run EngineBlock migrations
  command: ./bin/migrate
  args:
    chdir: "{{ engine_release_dir }}"
  register: migrate_output
  changed_when: "'no update needed' not in migrate_output.stderr"

- name: Activate new EngineBlock
  file: src={{ engine_release_dir }} dest={{ engine_current_release_symlink }} state=link
  notify:
    - restart httpd

- name: import entries
  shell: ldapmodify -x -D cn=admin,cn=config -h {{ ldap_host }} -w {{ ldap_password | vault(env) }} -f {{ openconext_releases_dir }}/OpenConext-engineblock/ldap/changes/addDeprovisionWarningSentAttributes.ldif
  register: add_deprevision_output
  changed_when: "add_deprevision_output.rc != 20"
  failed_when: "add_deprevision_output.rc not in [20,0]"
  tags: ldap

- name: import entries
  shell: ldapmodify -x -D cn=admin,cn=config -h {{ ldap_host }} -w {{ ldap_password | vault(env) }} -f {{ openconext_releases_dir }}/OpenConext-engineblock/ldap/changes/addCollabPersonUUID.ldif
  register: add_collab_output
  changed_when: "add_collab_output.rc != 20"
  failed_when: "add_collab_output.rc not in [20,0]"
{'fraction_non_alphanumeric': 0.1364513018322083, 'fraction_numerical': 0.0057859209257473485, 'mean_word_length': 4.4164490861618795, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7637661', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1421, 'n_words': 343}