<commit_before>---
  - name: check to see if a vault exists
    stat:
      path: ./files/vault.encrypted
    register: vault_file

  - include: user_input.yml
    when: vault_file.stat.exists != true

  - name: decrypt vault to a file
    command: ansible-vault decrypt ./files/vault.encrypted --output=./files/vault.decrypted
    when: vault_file.stat.exists

  - name: read in variables
    include_vars: ./files/vault.decrypted

    # set all variables for deployment here
  - name: set host facts
    set_fact:
      aws_access_key: '{{ vault_aws_access_key }}'
      aws_secret_key: '{{ vault_aws_secret_key }}'
      ldapadminpassword: '{{ <PASSWORD> }}'
      caldavduserpassword: '{{ <PASSWORD> }}'
      postfixuserpassword: '{{ <PASSWORD> }}'
      domain: '{{ vault_domain }}'
      admin_email: '{{ vault_username }}@{{ vault_domain }}'
      ldap_org_name: '{{ vault_first_name }} {{ vault_last_name }}'
      emailusers:
        - username: '{{ vault_username }}'
          lastname: '{{ vault_last_name }}'
          firstname: '{{ vault_first_name }}'
          password: '{{ <PASSWORD> }}'
          uidnumber: 10001
          gidnumber: 5000
          fullname: '{{ vault_first_name }} {{ vault_last_name }}'

  # - debug: msg="{{ user_domain }} {{ first_name }} {{ last_name }} {{ username }} {{ password1 }} {{ password2 }}"

  - name: encrypt vault
    command: ansible-vault encrypt ./files/vault.decrypted --output ./files/vault.encrypted
    when: vault_file.stat.exists != true

  - name: delete decrypted
    file:
      path: ./files/vault.decrypted
      state: absent

  - name: generate ssh key if it doesn't exist
    user:
      name: pi
      generate_ssh_key: yes
      ssh_key_type: rsa
      ssh_key_bits: 2048

  - name: copy raspberry pi public ssh key to temp location
    copy:
      dest: ~/.ansible/tmp/temp_client_pubkey_file.pub
      src: ~/.ssh/id_rsa.pub<commit_msg>fixed issue when running in vagrant box<commit_after>---
  - name: check to see if a vault exists
    stat:
      path: ./files/vault.encrypted
    register: vault_file

  - include: user_input.yml
    when: vault_file.stat.exists != true

  - name: decrypt vault to a file
    command: ansible-vault decrypt ./files/vault.encrypted --output=./files/vault.decrypted
    when: vault_file.stat.exists

  - name: read in variables
    include_vars: ./files/vault.decrypted

    # set all variables for deployment here
  - name: set host facts
    set_fact:
      aws_access_key: '{{ vault_aws_access_key }}'
      aws_secret_key: '{{ vault_aws_secret_key }}'
      ldapadminpassword: '{{ <PASSWORD> }}'
      caldavduserpassword: '{{ <PASSWORD> }}'
      postfixuserpassword: '{{ <PASSWORD> }}'
      domain: '{{ vault_domain }}'
      admin_email: '{{ vault_username }}@{{ vault_domain }}'
      ldap_org_name: '{{ vault_first_name }} {{ vault_last_name }}'
      emailusers:
        - username: '{{ vault_username }}'
          lastname: '{{ vault_last_name }}'
          firstname: '{{ vault_first_name }}'
          password: '{{ <PASSWORD> }}'
          uidnumber: 10001
          gidnumber: 5000
          fullname: '{{ vault_first_name }} {{ vault_last_name }}'

  # - debug: msg="{{ user_domain }} {{ first_name }} {{ last_name }} {{ username }} {{ password1 }} {{ password2 }}"

  - name: encrypt vault
    command: ansible-vault encrypt ./files/vault.decrypted --output ./files/vault.encrypted
    when: vault_file.stat.exists != true

  - name: delete decrypted
    file:
      path: ./files/vault.decrypted
      state: absent

  - name: generate ssh key if it doesn't exist
    user:
      name: "{{ ansible_user_id }}"
      generate_ssh_key: yes
      ssh_key_type: rsa
      ssh_key_bits: 2048

  - name: copy raspberry pi public ssh key to temp location
    copy:
      dest: ~/.ansible/tmp/temp_client_pubkey_file.pub
      src: ~/.ssh/id_rsa.pub
{'fraction_non_alphanumeric': 0.1305806451612903, 'fraction_numerical': 0.007741935483870968, 'mean_word_length': 2.6949475691134412, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6419353', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1236, 'n_words': 291}