<commit_before>---
- name: Create user
  user: name=aa system=yes home={{ aa_dir }} shell=/sbin/nologin

- name: create apache folder
  file: path=/var/www/aa owner=apache group=apache mode=2755 state=directory

- name: download html archive
  maven_artifact:
    group_id: org.openconext
    artifact_id: aa-gui
    extension: tar.gz
    version: "{{ aa_version }}"
    repository_url: "{{ maven_snapshot_repo if 'SNAPSHOT' in aa_version else maven_repo }}"
    dest: /var/www/aa
  register: maven_result
  tags: aa

- name: extract html archive
  unarchive:
    src: "{{ maven_result.dest }}"
    dest: /var/www/aa
    copy: no
    owner: root
    group: apache
  register: unarchive_result
  tags: aa
  when: maven_result.changed

- name: create symlink to downloaded version
  file:
    src: "{{ unarchive_result.dest }}/aa-gui-{{ aa_version }}"
    dest: current
    state: link
    force: yes
  tags: aa
  when: unarchive_result.changed

- name: remove downloaded version
  file: path=/var/www/aa/aa-gui-{{ aa_version }}.tar.gz state=absent
  tags: aa
  when: maven_result.changed

- name: copy virtual host config
  template: src=httpd/aa.conf.j2 dest=/etc/httpd/conf.d/aa.conf
  tags: aa
  notify: restart httpd

- name: Create logging directory
  file: path=/var/log/{{ springapp_service_name }} state=directory owner=aa group=aa mode=0755

- name: download aa-server.war
  maven_artifact:
    group_id: org.openconext
    artifact_id: aa-server
    extension: jar
    version: "{{ aa_version }}"
    repository_url: "{{ maven_snapshot_repo if 'SNAPSHOT' in aa_version else maven_repo }}"
    dest: "{{ aa_dir }}"
  tags: aa
  register: maven_result

- name: set ownership of application artifact
  file: path={{ maven_result.dest }} owner=aa group=aa mode=0500
  tags: aa

- name: Copy logging config
  template: src=logback.xml.j2 dest={{ aa_dir }}/logback.xml owner=aa group=aa mode=0740
  notify: restart aa-server

- name: Copy application config
  template: src=application.properties.j2 dest={{ aa_dir }}/application.properties owner=aa group=aa mode=0740
  notify: restart aa-server

- name: Copy attributeAuthorities config
  template: src=attributeAuthorities.yml.j2 dest={{ aa_dir }}/attributeAuthorities.yml owner=aa group=aa mode=0740
  notify: restart aa-server

- name: copy boot startup config
  template:
    src: aa-server.conf.j2
    dest: "{{ aa_dir }}/aa-server.conf"
    owner: root
    group: root
    mode: 0400
  tags: aa
  notify: restart aa-server

- name: link boot startup config
  file:
    src: "{{ aa_dir }}/aa-server.conf"
    dest: "{{ aa_dir }}/aa-server-{{ maven_result.version }}.conf"
    state: link
  when: maven_result.changed
  tags: aa

- name: link init.d service
  file:
    src: "{{ maven_result.dest }}"
    dest: /etc/init.d/aa-server
    force: yes
    state: link
  tags: aa

- name: enable aa-server service
  service: name=aa-server enabled=yes

- name: restart aa-server
  service: name=aa-server state=restarted
  tags: aa
  when: maven_result.changed<commit_msg>remove unneccesary tags<commit_after>---
- name: Create user
  user: name=aa system=yes home={{ aa_dir }} shell=/sbin/nologin

- name: create apache folder
  file: path=/var/www/aa owner=apache group=apache mode=2755 state=directory

- name: download html archive
  maven_artifact:
    group_id: org.openconext
    artifact_id: aa-gui
    extension: tar.gz
    version: "{{ aa_version }}"
    repository_url: "{{ maven_snapshot_repo if 'SNAPSHOT' in aa_version else maven_repo }}"
    dest: /var/www/aa
  register: maven_result

- name: extract html archive
  unarchive:
    src: "{{ maven_result.dest }}"
    dest: /var/www/aa
    copy: no
    owner: root
    group: apache
  register: unarchive_result
  when: maven_result.changed

- name: create symlink to downloaded version
  file:
    src: "{{ unarchive_result.dest }}/aa-gui-{{ aa_version }}"
    dest: current
    state: link
    force: yes
  when: unarchive_result.changed

- name: remove downloaded version
  file: path=/var/www/aa/aa-gui-{{ aa_version }}.tar.gz state=absent
  when: maven_result.changed

- name: copy virtual host config
  template: src=httpd/aa.conf.j2 dest=/etc/httpd/conf.d/aa.conf
  notify: restart httpd

- name: Create logging directory
  file: path=/var/log/{{ springapp_service_name }} state=directory owner=aa group=aa mode=0755

- name: download aa-server.war
  maven_artifact:
    group_id: org.openconext
    artifact_id: aa-server
    extension: jar
    version: "{{ aa_version }}"
    repository_url: "{{ maven_snapshot_repo if 'SNAPSHOT' in aa_version else maven_repo }}"
    dest: "{{ aa_dir }}"
  register: maven_result

- name: set ownership of application artifact
  file: path={{ maven_result.dest }} owner=aa group=aa mode=0500

- name: Copy logging config
  template: src=logback.xml.j2 dest={{ aa_dir }}/logback.xml owner=aa group=aa mode=0740
  notify: restart aa-server

- name: Copy application config
  template: src=application.properties.j2 dest={{ aa_dir }}/application.properties owner=aa group=aa mode=0740
  notify: restart aa-server

- name: Copy attributeAuthorities config
  template: src=attributeAuthorities.yml.j2 dest={{ aa_dir }}/attributeAuthorities.yml owner=aa group=aa mode=0740
  notify: restart aa-server

- name: copy boot startup config
  template:
    src: aa-server.conf.j2
    dest: "{{ aa_dir }}/aa-server.conf"
    owner: root
    group: root
    mode: 0400
  notify: restart aa-server

- name: link boot startup config
  file:
    src: "{{ aa_dir }}/aa-server.conf"
    dest: "{{ aa_dir }}/aa-server-{{ maven_result.version }}.conf"
    state: link
  when: maven_result.changed

- name: link init.d service
  file:
    src: "{{ maven_result.dest }}"
    dest: /etc/init.d/aa-server
    force: yes
    state: link

- name: enable aa-server service
  service: name=aa-server enabled=yes

- name: restart aa-server
  service: name=aa-server state=restarted
  when: maven_result.changed
{'fraction_non_alphanumeric': 0.11732031644504293, 'fraction_numerical': 0.01110924086854065, 'mean_word_length': 3.5884169884169883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4476722', 'n_tokens_mistral': 2129, 'n_tokens_neox': 2027, 'n_words': 549}