<commit_before># Here, we add an `update-etc-environment-path` script that will help us
# add the golang bin folder to the PATH environment variable.

- name: check if update-etc-environment-path script exists
  shell: command -v update-etc-environment-path >/dev/null 2>&1
  register: update_etc_environment_path_script_exists
  ignore_errors: true

- name: compute SHA256 sum of local update-etc-environment-path script
  shell: sha256sum update-etc-environment-path.py
  args:
    chdir: ~/myvagrant/ansible/roles/vagrant/files
  register: update_etc_environment_path_script_local_sha256_sum
  connection: local
  sudo_user: yh
  delegate_to: 127.0.0.1

- name: get SHA256sum of update-etc-environment-path script on server
  shell: sha256sum {{update_etc_environment_path_script_path}}
  register: update_etc_environment_path_script_server_sha256_sum
  when: update_etc_environment_path_script_exists.rc == 0

- name: copy update-etc-environment-path script to the server
  copy: src=update-etc-environment-path.py
        dest="{{update_etc_environment_path_script_path}}"
        owner=root
        group=root
        mode=755
  when: update_etc_environment_path_script_exists.rc != 0 or
        (update_etc_environment_path_script_server_sha256_sum is defined and
         update_etc_environment_path_script_server_sha256_sum.split()[0] !=
         update_etc_environment_path_script_local_sha256_sum.split()[0])

- name: ensure that {{golang_bin_folder_path}} is in PATH
  shell: update-etc-environment-path --folder {{golang_bin_folder_path}}<commit_msg>install_golang.yml - use `shasum` program for Mac OS X<commit_after># Here, we add an `update-etc-environment-path` script that will help us
# add the golang bin folder to the PATH environment variable.

- name: check if update-etc-environment-path script exists
  shell: command -v update-etc-environment-path >/dev/null 2>&1
  register: update_etc_environment_path_script_exists
  ignore_errors: true

- name: compute SHA256 sum of local update-etc-environment-path script
  shell: sha256sum update-etc-environment-path.py
  args:
    chdir: ~/myvagrant/ansible/roles/vagrant/files
  register: update_etc_environment_path_script_local_sha256_sum
  connection: local
  sudo_user: yh
  delegate_to: 127.0.0.1
  ignore_errors: true

- name: compute SHA256 sum of local update-etc-environment-path script (Mac OS X)
  shell: shasum -a 256 update-etc-environment-path.py
  args:
    chdir: ~/myvagrant/ansible/roles/vagrant/files
  register: osx_update_etc_environment_path_script_local_sha256_sum
  connection: local
  sudo_user: yh
  delegate_to: 127.0.0.1
  when: update_etc_environment_path_script_local_sha256_sum.rc != 0

- name: get SHA256sum of update-etc-environment-path script on server
  shell: sha256sum {{update_etc_environment_path_script_path}}
  register: update_etc_environment_path_script_server_sha256_sum
  when: update_etc_environment_path_script_exists.rc == 0

- name: copy update-etc-environment-path script to the server
  copy: src=update-etc-environment-path.py
        dest="{{update_etc_environment_path_script_path}}"
        owner=root
        group=root
        mode=755
  when: update_etc_environment_path_script_exists.rc != 0 or
        (update_etc_environment_path_script_server_sha256_sum is defined and
         ((update_etc_environment_path_script_server_sha256_sum.split()[0] !=
           update_etc_environment_path_script_local_sha256_sum.split()[0]) or
          (update_etc_environment_path_script_server_sha256_sum.split()[0] !=
           osx_update_etc_environment_path_script_local_sha256_sum.split()[0])
         )
        )

- name: ensure that {{golang_bin_folder_path}} is in PATH
  shell: update-etc-environment-path --folder {{golang_bin_folder_path}}
{'fraction_non_alphanumeric': 0.08043535970268118, 'fraction_numerical': 0.029466418900982214, 'mean_word_length': 4.674698795180723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '4618084', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1191, 'n_words': 259}