<commit_before>iptables-rules:
  file.managed:
{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
    - name: /etc/iptables.up.rules
{% elif grains['os'] == 'Arch' or grains['os'] == 'Fedora' %}
    - name: /etc/iptables/iptables.rules
{% endif %}
    - user: root
    - group: root
    - mode: 644
    - makedirs: True
    - source: salt://iptables/rules.j2
    - template: jinja
    - defaults:
        ssh_port: 22
    - context:
        ssh_port: {{ pillar['ssh_port'] }}
        saltminion_private_ips: {{ pillar['saltminion_private_ips'] }}
    - require:
{% for user in pillar['users'] %}
      - ssh_auth: {{ user }}-sshkeys
{% endfor %}
{% if grains['os'] == 'Arch' or grains['os'] == 'Fedora' %}
      - pkg: iptables
{% endif %}

{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
/etc/network/if-pre-up.d/iptables:
  file.managed:
    - source: salt://iptables/iptables
    - user: root
    - group: root
    - mode: 744
    - makedirs: True
  cmd:
    - run
    - require:
      - file: /etc/network/if-pre-up.d/iptables
      - file: /etc/iptables.up.rules
<commit_msg>try users instead of ssh_auth<commit_after>iptables-rules:
  file.managed:
{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
    - name: /etc/iptables.up.rules
{% elif grains['os'] == 'Arch' or grains['os'] == 'Fedora' %}
    - name: /etc/iptables/iptables.rules
{% endif %}
    - user: root
    - group: root
    - mode: 644
    - makedirs: True
    - source: salt://iptables/rules.j2
    - template: jinja
    - defaults:
        ssh_port: 22
    - context:
        ssh_port: {{ pillar['ssh_port'] }}
        saltminion_private_ips: {{ pillar['saltminion_private_ips'] }}
    - require:
{% for user in pillar['users'] %}
      - user: {{ user }}-sshkeys
{% endfor %}
{% if grains['os'] == 'Arch' or grains['os'] == 'Fedora' %}
      - pkg: iptables
{% endif %}

{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
/etc/network/if-pre-up.d/iptables:
  file.managed:
    - source: salt://iptables/iptables
    - user: root
    - group: root
    - mode: 744
    - makedirs: True
  cmd:
    - run
    - require:
      - file: /etc/network/if-pre-up.d/iptables
      - file: /etc/iptables.up.rules

{'fraction_non_alphanumeric': 0.19171917191719173, 'fraction_numerical': 0.008100810081008101, 'mean_word_length': 2.457231726283048, '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': '5451998', 'n_tokens_mistral': 905, 'n_tokens_neox': 798, 'n_words': 168}