add ssh pubkey for cpe.ap

This commit is contained in:
Astro 2017-02-07 02:11:32 +01:00
parent b5c20fcd6e
commit 565feefd28
3 changed files with 20 additions and 1 deletions

17
salt-pillar/keys.sls Normal file
View File

@ -0,0 +1,17 @@
#!yaml|gpg
ssh:
pubkey: |
-----BEGIN PGP MESSAGE-----
hQEMA2PKcvDMvlKLAQf/ePGt4Mpiuyp1rRaIA09QFJWxDZc84xo5r9oWxqW/liaC
0WmygDAlf0VGS6AeQg5p0SSwkca7Jky/uXYSCjqfYNTc0iO2UVKDsnyRpcWd+Y0B
pEJiNQzb3vbXdhmC3vvbBcHAOzZpnNZm/bYyJIqir5JeyEFQuqNkzHg08BhSy83y
kE9Jc6QePoNiK5TsBWxwfsq6/A79YFtSq+t0d7ZcoxgOuHw7kSAsQa5uWsXcL79L
fAhAUbzhlbkHO8IZpYDIwUstLJGfMSKxN1MRLHzhKhhoSbxna1IeiiAXKPUIQLRX
bNIMnobIleieMC8wGeJpIkbITsZSrPfzYOy0Z88S+9KUAco6RAetf9Vs+QcmwdSf
M8Igs9LyE1su2+EGSiihigLja6BQrAqbaFVp8r+UOI8fihmaluqAUCB0GBntym7P
eZY5whLu877ZxpXKqop5N+3BXDV/VnNjqHEarVGQ2AUeh9gt60g7HF7tAJs9Batk
ZbCED5wsM6oevCsGwEdEUCfjW5paVFu0XxQiqWrSy4utOPlo7A==
=vkYs
-----END PGP MESSAGE-----

View File

@ -9,6 +9,7 @@ base:
- switches
- cpe.aps
- collectd.server1
- keys
'priv*-gw':
- dhcp
- bird.radv

View File

@ -13,7 +13,8 @@ ssh root@{{ pillar['hosts-inet']['mgmt'][hostname] }} \
# Set root password
echo -e '{{ conf['password'] }}\n{{ conf['password'] }}' | passwd
# TODO: add ssh pubkey
# add ssh pubkey
echo "{{ pillar['ssh']['pubkey'] }}" > /etc/dropbear/authorized_keys
# System configuration
uci batch <<__UCI__