<commit_before>
- name: Make sure persistent storage home directory exists
  file: name="{{ homedir_path }}" state=directory
  sudo_user: root

- name: Make sure passlib is installed
  pip: name=passlib state=present
  sudo_user: root
  when: use_ubuntu_password == "no"

- name: Retrieve ubuntu password
  getent: database=shadow key=ubuntu split=":"
  register: debug_password
  sudo_user: root
  sudo: yes
  when: use_ubuntu_password == "yes"

# Generate both hashes for linux and for ipython
- name: Ask for new user password
  shell: python -c "from passlib.hash import sha512_crypt; import getpass, IPython; pwd=getpass.getpass(); print sha512_crypt.encrypt(pwd), IPython.lib.passwd(passphrase=pwd)"
  register: user_specified_password_hashes
  when: use_ubuntu_password == "no"
<commit_msg>Use correct pip to install passlib<commit_after>
- name: Make sure persistent storage home directory exists
  file: name="{{ homedir_path }}" state=directory
  sudo_user: root

- name: Make sure passlib is installed
  pip: name=passlib state=present executable=/usr/local/bin/pip2
  sudo_user: root
  when: use_ubuntu_password == "no"

- name: Retrieve ubuntu password
  getent: database=shadow key=ubuntu split=":"
  register: debug_password
  sudo_user: root
  sudo: yes
  when: use_ubuntu_password == "yes"

# Generate both hashes for linux and for ipython
- name: Ask for new user password
  shell: python -c "from passlib.hash import sha512_crypt; import getpass, IPython; pwd=getpass.getpass(); print sha512_crypt.encrypt(pwd), IPython.lib.passwd(passphrase=pwd)"
  register: user_specified_password_hashes
  when: use_ubuntu_password == "no"

{'fraction_non_alphanumeric': 0.09295261239368165, 'fraction_numerical': 0.007897934386391251, 'mean_word_length': 5.215094339622642, 'pattern_counts': {'":': 2, '<': 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': '6811477', 'n_tokens_mistral': 566, 'n_tokens_neox': 518, 'n_words': 164}