<commit_before>---
- name: "wait for server to respond on ssh port"
  local_action: wait_for
    host={{ ansible_ssh_host | default(inventory_hostname) }}
    port=22
    search_regex=OpenSSH
    delay=10
    timeout=300

- name: "render node count"
  local_action: >
    shell
    cat terraform.tfvars |
    grep '[node|edge]_count' |
    awk '{print $3;}' |
    tr -d '"' |
    awk '{s+=$1} END {print s}'
  args:
    chdir: "{{playbook_dir}}/.."
  register: get_nodes_count
  when:
    - nodes_count is undefined

- set_fact:
    # +1 because master is also one node
    nodes_count: "{{(get_nodes_count.stdout | int) + 1}}"<commit_msg>allow for connecting on arbitrary ssh port which for example could be specified in inventoryfile - Vagrant uses other ssh ports than 22<commit_after>---
- name: "wait for server to respond on ssh port"
  local_action: wait_for
    host={{ ansible_ssh_host | default(inventory_hostname) }}
    port={{ ansible_port | default(22) }}
    search_regex=OpenSSH
    delay=5
    timeout=300

- name: "render node count"
  local_action: >
    shell
    cat terraform.tfvars |
    grep '[node|edge]_count' |
    awk '{print $3;}' |
    tr -d '"' |
    awk '{s+=$1} END {print s}'
  args:
    chdir: "{{playbook_dir}}/.."
  register: get_nodes_count
  when:
    - nodes_count is undefined

- set_fact:
    # +1 because master is also one node
    nodes_count: "{{(get_nodes_count.stdout | int) + 1}}"
{'fraction_non_alphanumeric': 0.12876137158852344, 'fraction_numerical': 0.01609517144856543, 'mean_word_length': 3.132947976878613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4142266', 'n_tokens_mistral': 512, 'n_tokens_neox': 497, 'n_words': 142}