<commit_before>---
- block:
    - name: instala pacotes necessários
      apt:
        name:
          - libconfig-inifiles-perl
          - libcapture-tiny-perl
          - lzop
          - mbuffer
          - pv
        state: present

    - name: faz download do pacote do sanoid
      get_url:
        url: "https://github.com/jimsalterjrs/sanoid/archive/v{{ sanoid_version }}.tar.gz"
        dest: "/usr/src/sanoid-{{ sanoid_version }}.tar.gz"

    - name: descompacta pacote do sanoid
      shell: warn=no
        creates=/usr/src/sanoid-{{ sanoid_version }}
        tar -C /usr/src/ -xf /usr/src/sanoid-{{ sanoid_version }}.tar.gz

    - name: instala scripts em /usr/local/sbin
      copy:
        remote_src: yes
        src: "/usr/src/sanoid-{{ sanoid_version }}/{{ item }}"
        dest: "/usr/local/sbin/{{ item }}"
        mode: 0755
        owner: root
        group: root
      loop:
        - sanoid
        - syncoid
        - findoid
        - sleepymutex

    - name: cria diretório de configurações
      file:
        state: directory
        path: "/etc/sanoid"

    - name: copia arquivo de configuração default
      template:
        src: "/usr/src/sanoid-{{ sanoid_version }}/sanoid.defaults.conf"
        dest: "/etc/sanoid/sanoid.defaults.conf"

    - name: copia arquivo de configuração
      template:
        src: "{{ sanoid_conf }}"
        dest: "/etc/sanoid/sanoid.conf"

    - name: copia units de serviços do systemd
      template:
        src: "{{ item }}.service"
        dest: "/etc/systemd/system/{{ item }}.service"
      loop:
        - sanoid
        - sanoid-prune

    - name: copia units de timers do systemd
      template:
        src: "{{ item }}.timer"
        dest: "/etc/systemd/system/{{ item }}.timer"
      loop:
        - sanoid

    - name: ativa os units do systemd
      systemd:
        daemon_reload: yes
        name: "{{ item }}"
        enabled: yes
      loop:
        - sanoid-prune.service
        - sanoid.timer

    - name: inicia os units do systemd
      systemd:
        daemon_reload: yes
        name: "{{ item }}"
        state: started
      loop:
        - sanoid.timer

  tags: sanoid
<commit_msg>corrige cópia de arquivo de configuração default<commit_after>---
- block:
    - name: instala pacotes necessários
      apt:
        name:
          - libconfig-inifiles-perl
          - libcapture-tiny-perl
          - lzop
          - mbuffer
          - pv
        state: present

    - name: faz download do pacote do sanoid
      get_url:
        url: "https://github.com/jimsalterjrs/sanoid/archive/v{{ sanoid_version }}.tar.gz"
        dest: "/usr/src/sanoid-{{ sanoid_version }}.tar.gz"

    - name: descompacta pacote do sanoid
      shell: warn=no
        creates=/usr/src/sanoid-{{ sanoid_version }}
        tar -C /usr/src/ -xf /usr/src/sanoid-{{ sanoid_version }}.tar.gz

    - name: instala scripts em /usr/local/sbin
      copy:
        remote_src: yes
        src: "/usr/src/sanoid-{{ sanoid_version }}/{{ item }}"
        dest: "/usr/local/sbin/{{ item }}"
        mode: 0755
        owner: root
        group: root
      loop:
        - sanoid
        - syncoid
        - findoid
        - sleepymutex

    - name: cria diretório de configurações
      file:
        state: directory
        path: "/etc/sanoid"

    - name: copia arquivo de configuração default
      copy:
        src: "/usr/src/sanoid-{{ sanoid_version }}/sanoid.defaults.conf"
        dest: "/etc/sanoid/sanoid.defaults.conf"
        remote_src: yes

    - name: copia arquivo de configuração
      template:
        src: "{{ sanoid_conf }}"
        dest: "/etc/sanoid/sanoid.conf"

    - name: copia units de serviços do systemd
      template:
        src: "{{ item }}.service"
        dest: "/etc/systemd/system/{{ item }}.service"
      loop:
        - sanoid
        - sanoid-prune

    - name: copia units de timers do systemd
      template:
        src: "{{ item }}.timer"
        dest: "/etc/systemd/system/{{ item }}.timer"
      loop:
        - sanoid

    - name: ativa os units do systemd
      systemd:
        daemon_reload: yes
        name: "{{ item }}"
        enabled: yes
      loop:
        - sanoid-prune.service
        - sanoid.timer

    - name: inicia os units do systemd
      systemd:
        daemon_reload: yes
        name: "{{ item }}"
        state: started
      loop:
        - sanoid.timer

  tags: sanoid

{'fraction_non_alphanumeric': 0.1191286589516678, 'fraction_numerical': 0.0018152938506920807, 'mean_word_length': 1.6253722453841573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1033008', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1432, 'n_words': 356}