template up the users

master
Marek Isalski 5 years ago
parent e6b58a06f8
commit 64d2556102

@ -1014,13 +1014,27 @@ system {
}
login {
user vyos {
{% for user, user_data in pillar['users'].items() %}
user {{ user }} {
{% if 'authentication' in user_data %}
authentication {
encrypted-password $6$fXZ3cwEft1XFJTH$twZmVheX0PEi21KqQfv/zvKhuXVc1UwVVXI3Y7KCXYk0osil3QmJqmAYgNQyNqGUROydxp7R6yiPe4N06QnBH1
{% if 'encrypted-password' in user_data['authentication'] %}
encrypted-password {{ user_data['authentication']['encrypted-password'] }}
plaintext-password ""
{% else %}
plaintext-password '{{ user_data['authentication']['plaintext-password'] }}'
{% endif %}
{% for key, key_data in user_data['authentication'].get('public-keys',{}).items() %}
public-keys {{ key }} {
key {{ key_data['key'] }}
type {{ key_data.get('type','ssh-rsa') }}
}
{% endfor %}
}
level admin
{% endif %}
level {{ user_data.get('level','operator') }}
}
{% endfor %}
}
{% for nameserver in pillar['nameservers'] %}

Loading…
Cancel
Save