<commit_before>{% from 'states/git/map.jinja' import git as git_map with context %}

git-group:
  group.present:
    - name: {{ git_map.user }}
    - gid: {{ git_map.gid }}
    - system: True

git-user:
  user.present:
    - name: {{ git_map.user }}
    - home: {{ git_map.home }}
    - uid: {{ git_map.uid }}
    - gid: {{ git_map.gid }}
    - createhome: True
    - system: True
    - require:
      - pkg: git
      - group: git-group<commit_msg>git: Manage allowed users for git user over SSH.<commit_after>#!stateconf
{% from 'states/git/map.jinja' import git as git_map with context %}

.params:
    stateconf.set: []
# --- end of state config ---

git-group:
  group.present:
    - name: {{ git_map.user }}
    - gid: {{ git_map.gid }}
    - system: True

git-user:
  user.present:
    - name: {{ git_map.user }}
    - home: {{ git_map.home }}
    - uid: {{ git_map.uid }}
    - gid: {{ git_map.gid }}
    - createhome: True
    - system: True
    - require:
      - pkg: git
      - group: git-group

{% for user in params.allowed_users %}
git-{{ user.name }}:
  ssh_auth.present:
    - name: {{ user.key }}
    - user: {{ git_map.user }}
    - enc: {{ user.keytype }}
    - comment: {{ user.name }}
    - require:
      - user: git-user
{% endfor %}
{'fraction_non_alphanumeric': 0.17329093799682035, 'fraction_numerical': 0.0, 'mean_word_length': 2.116336633663366, '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': '5032134', 'n_tokens_mistral': 474, 'n_tokens_neox': 456, 'n_words': 104}