<commit_before>---
- name: Copy 'is_cluster_ready' file
  copy: dest=/bin/is_cluster_ready src=is_cluster_ready mode=0755 force=no

- name: Set hostname
  command: hostname {{sge_server_name}}

# Manage the /etc/hosts file
- name: Edit /etc/hosts file
  shell: |
    for i in `seq 1 {{max_number_of_nodes}}`; do
      item="{{vnode_prefix}}${i}";
      grep -q "\<${item}\>" /etc/hosts || echo "127.0.0.1 ${item}.localdomain ${item}" >> /etc/hosts;
    done

# SGE configuration Specific tasks
- command: qconf -as {{sge_server_name}}

#- copy:
#    content: |
#       hostname {{vnode_prefix}}{{item}}
#       {{NODE_DEF}}
#    dest: /tmp/{{vnode_prefix}}{{item}}.def
#  with_sequence: start=1 end={{max_number_of_nodes}}

- name: Create the nodes config files
  template: /tmp/{{vnode_prefix}}{{item}}.def src=node.def
  with_sequence: start=1 end={{max_number_of_nodes}}

- shell: qconf -se {{vnode_prefix}}{{item}} || qconf -Ae /tmp/{{vnode_prefix}}{{item}}.def
  with_sequence: start=1 end={{max_number_of_nodes}}

- shell: qconf -ah {{vnode_prefix}}{{item}}
  with_sequence: start=1 end={{max_number_of_nodes}}

- name: Copy 'all_q.conf' file
  copy: dest=/tmp/all.q src=all_q.conf mode=0644 force=no

- copy:
    content: |<commit_msg>Fix error in template command<commit_after>---
- name: Copy 'is_cluster_ready' file
  copy: dest=/bin/is_cluster_ready src=is_cluster_ready mode=0755 force=no

- name: Set hostname
  command: hostname {{sge_server_name}}

# Manage the /etc/hosts file
- name: Edit /etc/hosts file
  shell: |
    for i in `seq 1 {{max_number_of_nodes}}`; do
      item="{{vnode_prefix}}${i}";
      grep -q "\<${item}\>" /etc/hosts || echo "127.0.0.1 ${item}.localdomain ${item}" >> /etc/hosts;
    done

# SGE configuration Specific tasks
- command: qconf -as {{sge_server_name}}

#- copy:
#    content: |
#       hostname {{vnode_prefix}}{{item}}
#       {{NODE_DEF}}
#    dest: /tmp/{{vnode_prefix}}{{item}}.def
#  with_sequence: start=1 end={{max_number_of_nodes}}

- name: Create the nodes config files
  template: dest=/tmp/{{vnode_prefix}}{{item}}.def src=node.def
  with_sequence: start=1 end={{max_number_of_nodes}}

- shell: qconf -se {{vnode_prefix}}{{item}} || qconf -Ae /tmp/{{vnode_prefix}}{{item}}.def
  with_sequence: start=1 end={{max_number_of_nodes}}

- shell: qconf -ah {{vnode_prefix}}{{item}}
  with_sequence: start=1 end={{max_number_of_nodes}}

- name: Copy 'all_q.conf' file
  copy: dest=/tmp/all.q src=all_q.conf mode=0644 force=no

- copy:
    content: |
{'fraction_non_alphanumeric': 0.17764471057884232, 'fraction_numerical': 0.015169660678642715, 'mean_word_length': 4.167010309278351, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '301421', 'n_tokens_mistral': 963, 'n_tokens_neox': 937, 'n_words': 206}