<commit_before>- name: Confirm host OS is Tails.
  assert:
    that:
      - ansible_lsb.id == "Tails"
      - ansible_lsb.major_release >= 9
    msg: >-
      SecureDrop requires Tails 3 or greater for workstation environments.

- name: Check for persistence volume.
  stat:
    path: /live/persistence/TailsData_unlocked/persistence.conf
  register: tails_persistence_check_result
  with_items:
    - /live/persistence/TailsData_unlocked/persistence.conf
    - /live/persistence/TailsData_unlocked/openssh-client
    - /home/amnesia/Persistent/securedrop

- name: Confirm persistence volume is configured.
  assert:
    that:
      - item.stat.exists
    msg: >-
      Persistence must configured on the Tails device for the Admin
      Workstation, and the SSH option for persistent dotfiles must be enabled.
      The SecureDrop git repository should be cloned
      to `~/Persistent/securedrop`.
  with_items: "{{ tails_persistence_check_result.results }}"

- name: Check for v3 SSH auth files
  stat:
    path: "/home/amnesia/Persistent/securedrop/install_files/ansible-base/{{ item }}"
  register: v3_ssh_auth_files
  with_items:
    - app-ssh.auth_private
    - mon-ssh.auth_private

- name: Count the number of v3 SSH auth files
  set_fact:
    v3_ssh_auth_file_count: "{{ v3_ssh_auth_files.results | selectattr('stat.exists') | list | count }}"

- name: Check for Journalist client auth file
  stat:
    path: "/home/amnesia/Persistent/securedrop/install_files/ansible-base/app-journalist.auth_private"
  register: v3_journalist_auth_file

- name: Check for Tor v3 key file
  stat:<commit_msg>Default v3_onion_services to off in validate_tails_environment.yml<commit_after>- name: Confirm host OS is Tails.
  assert:
    that:
      - ansible_lsb.id == "Tails"
      - ansible_lsb.major_release >= 9
    msg: >-
      SecureDrop requires Tails 3 or greater for workstation environments.

- name: Check for persistence volume.
  stat:
    path: /live/persistence/TailsData_unlocked/persistence.conf
  register: tails_persistence_check_result
  with_items:
    - /live/persistence/TailsData_unlocked/persistence.conf
    - /live/persistence/TailsData_unlocked/openssh-client
    - /home/amnesia/Persistent/securedrop

- name: Confirm persistence volume is configured.
  assert:
    that:
      - item.stat.exists
    msg: >-
      Persistence must configured on the Tails device for the Admin
      Workstation, and the SSH option for persistent dotfiles must be enabled.
      The SecureDrop git repository should be cloned
      to `~/Persistent/securedrop`.
  with_items: "{{ tails_persistence_check_result.results }}"

- name: Default v3_onion_services to false
  set_fact:
    v3_onion_services: "{{ v3_onion_services | default(False) }}"

- name: Check for v3 SSH auth files
  stat:
    path: "/home/amnesia/Persistent/securedrop/install_files/ansible-base/{{ item }}"
  register: v3_ssh_auth_files
  with_items:
    - app-ssh.auth_private
    - mon-ssh.auth_private

- name: Count the number of v3 SSH auth files
  set_fact:
    v3_ssh_auth_file_count: "{{ v3_ssh_auth_files.results | selectattr('stat.exists') | list | count }}"

- name: Check for Journalist client auth file
  stat:
    path: "/home/amnesia/Persistent/securedrop/install_files/ansible-base/app-journalist.auth_private"
  register: v3_journalist_auth_file

- name: Check for Tor v3 key file
  stat:
{'fraction_non_alphanumeric': 0.08873114463176575, 'fraction_numerical': 0.006506950606329488, 'mean_word_length': 3.521390374331551, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1893680', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1092, 'n_words': 273}