<commit_before>unattended-upgrades:
    pkg.installed:
        - pkgs:
            - apt-listchanges
            - unattended-upgrades

    file.managed:
        - name: /etc/apt/apt.conf.d/50unattended-upgrades
        - source: salt://unattended-upgrades/50unattended-upgrades
        - template: jinja


unattended-upgrades-periodic-upgrade:
    file.managed:
        - name: /etc/apt/apt.conf.d/02periodic
        - source: salt://unattended-upgrades/02periodic
        - template: jinja


unattended-upgrades-apt-listchanges:
    file.managed:
        - name: /etc/apt/listchanges.conf
        - source: salt://unattended-upgrades/listchanges.conf
        - template: jinja<commit_msg>unattended-upgrades: Allow apt through firewall<commit_after>unattended-upgrades:
    pkg.installed:
        - pkgs:
            - apt-listchanges
            - unattended-upgrades

    file.managed:
        - name: /etc/apt/apt.conf.d/50unattended-upgrades
        - source: salt://unattended-upgrades/50unattended-upgrades
        - template: jinja


unattended-upgrades-periodic-upgrade:
    file.managed:
        - name: /etc/apt/apt.conf.d/02periodic
        - source: salt://unattended-upgrades/02periodic
        - template: jinja


unattended-upgrades-apt-listchanges:
    file.managed:
        - name: /etc/apt/listchanges.conf
        - source: salt://unattended-upgrades/listchanges.conf
        - template: jinja


{% for family in ('ipv4', 'ipv6') %}
unattended-upgrades-outbound-firewall-{{ family }}:
    firewall.append:
        - family: {{ family }}
        - chain: OUTPUT
        - protocol: tcp
        - dports: 80,443
        - match:
            - comment
            - owner
        - comment: 'unattended-upgrades: Allow root access to apt mirrors/HTTP(S)'
        - uid-owner: root
        - jump: ACCEPT
{% endfor %}
{'fraction_non_alphanumeric': 0.1183206106870229, 'fraction_numerical': 0.012540894220283533, 'mean_word_length': 2.0230642504118617, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '106815', 'n_tokens_mistral': 621, 'n_tokens_neox': 576, 'n_words': 91}