<commit_before>---
# tasks file for ansible-role-fgci-install
#
- name: install EPEL
  yum: name=epel-release state=present

- name: create dhcp.d directory
  file: path=/etc/dhcp/dhcpd.d state=directory

- name: creates nodes.conf file
  file: path=/etc/dhcp/dhcpd.d/nodes.conf state=touch owner=root mode=0644

- name: create group_vars_dest directory - /var/www/html/group_vars by default
  file: path={{ group_vars_dest }} state=directory

- name: template in /var/www/html/pull_variables.yml
  template: src=pull_variables.yml.j2 dest=/var/www/html/pull_variables.yml mode=0644 backup=yes

- name: copy hosts file to /var/www/html/hosts.yml - for ansible-pull
  copy: src={{ hosts_file_src }} dest={{ hosts_file_dest }} mode=0644 backup=yes

- name: synchronize group_vars/ to /var/www/html/group_vars/ - for ansible-pull - secrets and firewalls are not needed
  synchronize:
                src: "{{ group_vars_src }}"
                dest: "{{ group_vars_dest }}"
                archive: no
                recursive: yes
                times: no
                set_remote_user: yes
                perms: no
                owner: no
                group: no
                rsync_opts:
                 - '--exclude=secrets.yml'
                 - '--exclude=trusted_networks.yml'
  when: ansible_virtualization_type != "docker"

- name: synchronize host_vars for ansible-pull
  synchronize: src="{{ host_vars_src }}" dest="{{ host_vars_dest }}" owner=no group=no
  when: ansible_virtualization_type != "docker"

- name: template the ansible-pull-script.sh to /var/www/html - for ansible-pull
  template: src=ansible-pull-script.sh.j2 dest=/var/www/html/ansible-pull-script.sh mode=0644 backup=yes
  when: ansible_virtualization_type != "docker"

- name: copy in reinstall script
  copy: src=reinstall dest=/usr/local/sbin/reinstall mode=0755 owner=root group=root backup=no

- name: Copy requirements.yml
  copy: src={{ playbook_dir }}/requirements.yml dest=/tmp/requirements.yml

- name: Copy gitmirror config generation tool
  copy: src={{ playbook_dir }}/tools/gitmirror_conf_generate.py dest=/tmp/gitmirror_conf_generate.py

- name: Make sure PyYAML is installed
  yum: name=PyYAML

- name: Run gitmirror config generation tool
  command: python /tmp/gitmirror_conf_generate.py /tmp/requirements.yml {{ pull_install_ip }} /var/www/html/requirements_mirror.yml {{ gitmirror_config }} {{ gitmirror_basepath }}

- name: Bounce gitmirror service, but do not fail if it does not exist yet
  service: name=gitmirror state=restarted
  ignore_errors: yes<commit_msg>make the syntax in this task the same as the previous synchronize task<commit_after>---
# tasks file for ansible-role-fgci-install
#
- name: install EPEL
  yum: name=epel-release state=present

- name: create dhcp.d directory
  file: path=/etc/dhcp/dhcpd.d state=directory

- name: creates nodes.conf file
  file: path=/etc/dhcp/dhcpd.d/nodes.conf state=touch owner=root mode=0644

- name: create group_vars_dest directory - /var/www/html/group_vars by default
  file: path={{ group_vars_dest }} state=directory

- name: template in /var/www/html/pull_variables.yml
  template: src=pull_variables.yml.j2 dest=/var/www/html/pull_variables.yml mode=0644 backup=yes

- name: copy hosts file to /var/www/html/hosts.yml - for ansible-pull
  copy: src={{ hosts_file_src }} dest={{ hosts_file_dest }} mode=0644 backup=yes

- name: synchronize group_vars/ to /var/www/html/group_vars/ - for ansible-pull - secrets and firewalls are not needed
  synchronize:
                src: "{{ group_vars_src }}"
                dest: "{{ group_vars_dest }}"
                archive: no
                recursive: yes
                times: no
                set_remote_user: yes
                perms: no
                owner: no
                group: no
                rsync_opts:
                 - '--exclude=secrets.yml'
                 - '--exclude=trusted_networks.yml'
  when: ansible_virtualization_type != "docker"

- name: synchronize host_vars for ansible-pull
  synchronize: 
                src: "{{ host_vars_src }}" 
                dest: "{{ host_vars_dest }}" 
                owner: no 
                group: no
  when: ansible_virtualization_type != "docker"

- name: template the ansible-pull-script.sh to /var/www/html - for ansible-pull
  template: src=ansible-pull-script.sh.j2 dest=/var/www/html/ansible-pull-script.sh mode=0644 backup=yes
  when: ansible_virtualization_type != "docker"

- name: copy in reinstall script
  copy: src=reinstall dest=/usr/local/sbin/reinstall mode=0755 owner=root group=root backup=no

- name: Copy requirements.yml
  copy: src={{ playbook_dir }}/requirements.yml dest=/tmp/requirements.yml

- name: Copy gitmirror config generation tool
  copy: src={{ playbook_dir }}/tools/gitmirror_conf_generate.py dest=/tmp/gitmirror_conf_generate.py

- name: Make sure PyYAML is installed
  yum: name=PyYAML

- name: Run gitmirror config generation tool
  command: python /tmp/gitmirror_conf_generate.py /tmp/requirements.yml {{ pull_install_ip }} /var/www/html/requirements_mirror.yml {{ gitmirror_config }} {{ gitmirror_basepath }}

- name: Bounce gitmirror service, but do not fail if it does not exist yet
  service: name=gitmirror state=restarted
  ignore_errors: yes
{'fraction_non_alphanumeric': 0.10793410338950957, 'fraction_numerical': 0.00833175534936565, 'mean_word_length': 3.0351413292589764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 16, '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': '871057', 'n_tokens_mistral': 1776, 'n_tokens_neox': 1683, 'n_words': 419}