<commit_before>---
- name: download go-ipfs binary
  get_url: url={{ binary_url }} checksum=sha256:{{ binary_hash }} dest=/tmp/go-ipfs.tar.gz
  register: binary
- block:
    - name: extract go-ipfs archive
      unarchive: copy=no src=/tmp/go-ipfs.tar.gz dest=/tmp/
    - name: install go-ipfs
      copy: remote_src=True src=/tmp/go-ipfs/ipfs dest="{{ ipfs_binary }}" mode=755
      become: true
      notify:
      - restart ipfs
    - name: remove temporary files
      file: state=absent path=/tmp/go-ipfs
  when: binary.changed
- block:
    - group: name=ipfs system=true state=present
    - user: name=ipfs comment="IPFS daemon" group=ipfs system=true state=present home="{{ ipfs_path }}"
    - file: path="{{ ipfs_path }}" owner=ipfs group=ipfs mode=750 state=directory
    - include: fuse_mount.yml
      when: ipfs_mount
    - name: initialize IPFS repository
      command: "{{ ipfs_binary }} init"
      args:
        creates: "{{ ipfs_path }}/version"
      environment:
        IPFS_PATH: "{{ ipfs_path }}"
      become: true
      become_user: ipfs
    - template: src=ipfs_config dest=/var/lib/ipfs/config<commit_msg>Make sure ipfs account has nologin set.<commit_after>---
- name: download go-ipfs binary
  get_url: url={{ binary_url }} checksum=sha256:{{ binary_hash }} dest=/tmp/go-ipfs.tar.gz
  register: binary
- block:
    - name: extract go-ipfs archive
      unarchive: copy=no src=/tmp/go-ipfs.tar.gz dest=/tmp/
    - name: install go-ipfs
      copy: remote_src=True src=/tmp/go-ipfs/ipfs dest="{{ ipfs_binary }}" mode=755
      become: true
      notify:
      - restart ipfs
    - name: remove temporary files
      file: state=absent path=/tmp/go-ipfs
  when: binary.changed
- block:
    - group: name=ipfs system=true state=present
    - user: name=ipfs comment="IPFS daemon" group=ipfs system=true state=present home="{{ ipfs_path }}" shell=/usr/sbin/nologin
    - file: path="{{ ipfs_path }}" owner=ipfs group=ipfs mode=750 state=directory
    - include: fuse_mount.yml
      when: ipfs_mount
    - name: initialize IPFS repository
      command: "{{ ipfs_binary }} init"
      args:
        creates: "{{ ipfs_path }}/version"
      environment:
        IPFS_PATH: "{{ ipfs_path }}"
      become: true
      become_user: ipfs
    - template: src=ipfs_config dest=/var/lib/ipfs/config
{'fraction_non_alphanumeric': 0.13267070008643042, 'fraction_numerical': 0.007778738115816767, 'mean_word_length': 2.937074829931973, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6330106', 'n_tokens_mistral': 801, 'n_tokens_neox': 781, 'n_words': 188}