Add pubkey to ansible user
WHOOPSIE
This commit is contained in:
parent
a5a965adbd
commit
dd9ba13e6b
@ -312,6 +312,10 @@ build-gentoo-chroot() {
|
||||
if ! id ansible > /dev/null 2>&1; then
|
||||
useradd ansible -m -s /bin/bash -u 1001 -U
|
||||
fi
|
||||
sudo -u ansible -i mkdir .ssh
|
||||
sudo -u ansible -i chmod 0700 .ssh
|
||||
sudo -u ansible -i echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDfXVgMHeD2wtCAIVoDYQ+R19vKfhmR2FgUTkHhAzE2156fB/+IMB+6Qc4X3aFRIcUp+Ls8Vm8JQ3d0jvbcGQkgbAjRExQa71XGBmhxJCxzlCLBoQzBmTSnryL09LExoMynzVgrso8TQP92vZBGJFI/lLGAaop2l9pu+3cgM3sRaK+A11lcRCrS25C3hqPQhKC44zjzOt7sIoaG6RqG3CQ8jhE35bthQdBySOZVDgDKfjDyPuDzVxiKjsuNm4Ojzm0QW5gq6GkLOg2B8OSQ1TGQgBHQu4b8zsKBOUOdbZb0JLM8NdpH1cMntC0QBofy3DzqR/CFaSaBzUx+dnkBH0/pjBOrhHzzqZGOJayfC1igYki67HqzFV5IjhAVa+c4S9L/zbFk0+YZYdgMoKNlMU2LgzrSEastuXHD7NUy3fMP4BZbqg37SjQzFRXoUp5+ctVs9tCoy/qvvjT3UVGcn312eJrRRfWrYagU2nWKGyqbTOpsuOJ5OLlhopy6eP9+yRM= ansible" > ~ansible/.ssh/authorized_keys
|
||||
sudo -u ansible -i chmod 0600 .ssh/authorized_keys
|
||||
# Configure services
|
||||
systemctl enable NetworkManager sshd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user