diff options
Diffstat (limited to 'keys.mdwn')
-rw-r--r-- | keys.mdwn | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/keys.mdwn b/keys.mdwn new file mode 100644 index 0000000..6d4af2f --- /dev/null +++ b/keys.mdwn @@ -0,0 +1,41 @@ +Repositório de chaves +===================== + + # Configuracao + project="exemplo" + domain="examplo.org" + admin="nodo_admin" + admin_port="porta_ssh" + base="$HOME/coletivos/$project/conf/puppet" + + # Inicializando + keyringer $project init $HOME/coletivos/$project/conf/keyring + + # Gerando chaves para https + keyringer $project genpair ssl cert $project.info + + # Gerando chaves ssh e gpg para novos nodos + # A importacao das chaves gpg nos nodos deve ser feita manualmente + for class in `ls $base/manifests/nodes`; do + node="`basename $class .pp`" + privkey="$base/files/keys/"$node"_id_dsa" + pubkey="$privkey.pub" + if [ ! -e "$privkey" ] || [ ! -e "$pubkey" ]; then + keyringer $project genpair ssh $node/ssh/id_dsa $node.$domain $privkey + keyringer $project genpair gpg $node/gpg/key $node.$domain + fi + done + + # Submetendo + keyringer $project git remote add origin ssh://gitosis@$admin.$domain:$admin_port/keyring.git + keyringer $project git push origin master + +Importação de chaves GPG +------------------------ + +Importando chaves nos seus respectivos nodos: + + gpg --import # colar a chave privada + gpg --edit-key <id> # ajustar confiabilidade dessa chave para 5 com o comando "trust" + gpg --list-keys # atualizar o trust db + |