79151917

Date: 2024-11-03 02:07:07
Score: 0.5
Natty:
Report link

For the other folks that might be using dictionaries in jinja2 templates :

per an ai generator:

{% set users = [
    {
        'username': 'user1',
        'password': 'password1',
        'group': 'admin',
        'ssh_key': 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArX...'
    },
    {
        'username': 'user2',
        'password': 'password2',
        'group': 'developer',
        'ssh_key': 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArY...'
    },
    {
        'username': 'user3',
        'password': 'password3',
        'group': 'user',
        'ssh_key': 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArZ...'
    }
] %}
{% for user in users %}
User: {{ user.username }}
Password: {{ user.password }}
Group: {{ user.group }}
SSH Key: {{ user.ssh_key }}
---
{% endfor %}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: dj423