<commit_before>---
- name: create {{ nginx_src_dir }} directory
  file: path={{ nginx_src_dir }} state=directory
  sudo: yes

- name: download nginx source
  get_url: url=http://nginx.org/download/nginx-{{ nginx_version }}.tar.gz dest={{ nginx_src_dir }}/nginx-{{ nginx_version }}.tar.gz
  sudo: yes

- name: untar and defeather
  unarchive: src={{ nginx_src_dir }}/nginx-{{ nginx_version }}.tar.gz dest={{ nginx_src_dir }} creates={{ nginx_src_dir }}/nginx-{{ nginx_version }} copy=no
  sudo: yes

- name: install required yum packages
  yum: name={{ item }} state=installed
  with_items:
    - git
    - net-snmp 
    - net-snmp-utils
    - gmp-devel 
    - gcc 
    - openssl-devel 
    - readline-devel 
    - expat-devel 
    - libxml2-devel 
    - freetds-devel 
    - pcre-devel 
    - openldap-devel 
    - automake 
    - autoconf 
    - libtool 
    - make 
    - gcc 
    - perl
  sudo: yes

- name: clone nginx-auth-ldap
  git: repo=https://github.com/kvspb/nginx-auth-ldap.git dest={{ nginx_src_dir }}/nginx-auth-ldap
  sudo: yes

- name: install nginx
  command: creates={{ nginx_prefix }} chdir={{ nginx_src_dir }}/nginx-{{ nginx_version }} {{ item }}
  with_items:
  - ./configure --add-module={{ nginx_src_dir }}/nginx-auth-ldap --prefix={{ nginx_prefix }} --with-http_ssl_module --with-http_stub_status_module
  - make install
  sudo: yes

- name: Create symlink to nginx.conf
  file: src={{ nginx_conf }} dest={{ nginx_prefix }}/conf/nginx.conf state=link force=yes
  sudo: yes
  notify: restart nginx

- name: write init.d/nginx
  template: src=init_nginx.j2 dest=/etc/init.d/nginx mode=0755
  sudo: yes
  
- name: create log directory
  file: path=/var/log/nginx state=directory group=mbxapp<commit_msg>Removes ldap module<commit_after>---
- name: create {{ nginx_src_dir }} directory
  file: path={{ nginx_src_dir }} state=directory
  sudo: yes

- name: download nginx source
  get_url: url=http://nginx.org/download/nginx-{{ nginx_version }}.tar.gz dest={{ nginx_src_dir }}/nginx-{{ nginx_version }}.tar.gz
  sudo: yes

- name: untar and defeather
  unarchive: src={{ nginx_src_dir }}/nginx-{{ nginx_version }}.tar.gz dest={{ nginx_src_dir }} creates={{ nginx_src_dir }}/nginx-{{ nginx_version }} copy=no
  sudo: yes

- name: install required yum packages
  yum: name={{ item }} state=installed
  with_items:
    - net-snmp 
    - net-snmp-utils
    - gmp-devel 
    - gcc 
    - openssl-devel 
    - readline-devel 
    - expat-devel 
    - libxml2-devel 
    - freetds-devel 
    - pcre-devel 
    - automake 
    - autoconf 
    - libtool 
    - make 
    - gcc 
    - perl
  sudo: yes

- name: install nginx
  command: creates={{ nginx_prefix }} chdir={{ nginx_src_dir }}/nginx-{{ nginx_version }} {{ item }}
  with_items:
  - ./configure --prefix={{ nginx_prefix }} --with-http_ssl_module --with-http_stub_status_module
  - make install
  sudo: yes

- name: Create symlink to nginx.conf
  file: src={{ nginx_conf }} dest={{ nginx_prefix }}/conf/nginx.conf state=link force=yes
  sudo: yes
  notify: restart nginx

- name: write init.d/nginx
  template: src=init_nginx.j2 dest=/etc/init.d/nginx mode=0755
  sudo: yes
  
- name: create log directory
  file: path=/var/log/nginx state=directory group=mbxapp
{'fraction_non_alphanumeric': 0.14047029702970298, 'fraction_numerical': 0.0037128712871287127, 'mean_word_length': 2.991358024691358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5581490', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1196, 'n_words': 274}