-
Notifications
You must be signed in to change notification settings - Fork 30
Set & delete users template #112
Set & delete users template #112
Conversation
1 similar comment
At least when using ansible's implementation of jinja, it will fail if the key doesn't exist. I would suggest the following:
|
I agree with @itdependsnetworks. We should check the variables are present before trying to configure them. Newest EOS release support users without password, only with keys. And there might be people using passwords only instead of keys. |
@@ -0,0 +1,16 @@ | |||
{%- for user_name, user_details in users.iteritems() %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it enough to do something like:
{%- for user_name, user_details in users_to_delete %}
default username {{ user_name}}
{%- endfor %}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does:
default username {{ user_name}}
do more specifically?
Can't agree more - that's why I have:
Which works in pure python.. but it seems to fail in other obscure implementations. But I agree on the additional level of safety. |
7191c12
to
3a40477
Compare
No description provided.