<commit_before>---

- name: ZZ CUDA Restart server
  command: sleep 2 && /sbin/shutdown -r now "Node software upgrade reboot"
  async: 1
  poll: 0
  ignore_errors: true
  when: cuda_packages_installation.changed and cuda_restart_node_on_install == True

- name: ZZ CUDA Wait for server to restart
  local_action: wait_for host="{{ ansible_ssh_host | default(inventory_hostname) }}" 
                state=started 
                delay=30 
                timeout=300
  become: false
  when: cuda_restart_node_on_install == True<commit_msg>only use the wait_for reboot handler if we are running ansible-push<commit_after>---

- name: ZZ CUDA Restart server
  command: sleep 2 && /sbin/shutdown -r now "Node software upgrade reboot"
  async: 1
  poll: 0
  ignore_errors: true
  when: cuda_packages_installation.changed and cuda_restart_node_on_install == True

# define the variable running_as_ansible_pull in the ansible-pull playbook, like local.yml 
- name: ZZ CUDA Wait for server to restart on ansible-push
  local_action: wait_for host="{{ ansible_ssh_host | default(inventory_hostname) }}" 
                state=started 
                delay=30 
                timeout=300
  become: false
  when: cuda_restart_node_on_install == True and (running_as_ansible_pull is not defined or running_as_ansible_pull == False)
{'fraction_non_alphanumeric': 0.07256235827664399, 'fraction_numerical': 0.012093726379440665, 'mean_word_length': 3.384105960264901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '760337', 'n_tokens_mistral': 439, 'n_tokens_neox': 406, 'n_words': 125}