<commit_before>{% from 'openssh-server/map.jinja' import openssh_server with context %}
{% set minumum_modulus_size = openssh_server.minumum_modulus_size %}


include:
    - .pillar_check


openssh-server:
    pkg.installed:
        - name: openssh-server

    service.running:
        - name: ssh
        - watch:
            - file: openssh-server

    file.managed:
        - name: /etc/ssh/sshd_config
        - source: salt://openssh-server/sshd_config
        - template: jinja
        - require:
            - pkg: openssh-server


# Delete ssh moduli weaker than 2048 bits
openssh-server-moduli:
    cmd.run:<commit_msg>Ensure ssh service is enabled<commit_after>{% from 'openssh-server/map.jinja' import openssh_server with context %}
{% set minumum_modulus_size = openssh_server.minumum_modulus_size %}


include:
    - .pillar_check


openssh-server:
    pkg.installed:
        - name: openssh-server

    service.running:
        - name: ssh
        - enable: True
        - watch:
            - file: openssh-server

    file.managed:
        - name: /etc/ssh/sshd_config
        - source: salt://openssh-server/sshd_config
        - template: jinja
        - require:
            - pkg: openssh-server


# Delete ssh moduli weaker than 2048 bits
openssh-server-moduli:
    cmd.run:
{'fraction_non_alphanumeric': 0.10038610038610038, 'fraction_numerical': 0.006177606177606178, 'mean_word_length': 2.1842751842751844, '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': '7193515', 'n_tokens_mistral': 457, 'n_tokens_neox': 408, 'n_words': 87}