mirror of
https://github.com/jerikan-network/cmdb.git
synced 2024-05-06 04:54:50 +00:00
d191613ab8
No history. If you have the original history, you can use: ``` git replace THISCOMMIT b0b998bd1c651e308ac71a9158e07e5c3521a281 ```
21 lines
609 B
Django/Jinja
21 lines
609 B
Django/Jinja
enable secret {{ lookup('system', 'passwords').root }}
|
|
!
|
|
{% for user, value in lookup("system", "users").items() %}
|
|
{% filter replace("\n", " ") %}
|
|
username {{ user }} privilege 15
|
|
{% if value["ios-password"] is defined %}
|
|
secret {{ value["ios-password"] }}
|
|
{% endif %}
|
|
{% endfilter %}
|
|
|
|
{% endfor %}
|
|
!
|
|
ip ssh version 2
|
|
ip ssh pubkey-chain
|
|
{% for user, value in lookup("system", "users").items() if value.ssh is defined and value.ssh.startswith("ssh-rsa ") %}
|
|
username {{ user }}
|
|
key-hash ssh-rsa {{ value.ssh.split()[1] | b64decode | hash('md5') | upper }} {{ user }}
|
|
{% endfor %}
|
|
ip scp server enable
|
|
!
|