You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
687 B
27 lines
687 B
#!/bin/bash
|
|
|
|
|
|
. ./user.config
|
|
|
|
. ../Makefile.variable
|
|
|
|
echo '[service]' > ./inventory.yml
|
|
echo "$RSERVER" >> ./inventory.yml
|
|
|
|
|
|
/bin/rm -f files/$RUSER
|
|
/bin/rm -f files/$RUSER.pub
|
|
/bin/rm -f files/authorized_keys
|
|
|
|
ssh-keygen -t ecdsa -f files/$RUSER -q -N ""
|
|
|
|
/bin/cp -f files/$RUSER.pub files/authorized_keys
|
|
|
|
ansible-playbook -u $USER -i inventory.yml ./adduser/run.yml -f 5 --private-key=$PKEY --extra-vars "ruser=$RUSER rpassword=$RPASSWORD"
|
|
|
|
/bin/cp -f files/$RUSER /data/appl/vpn/server-esxi-keys/$RUSER
|
|
/bin/cp -f files/$RUSER.pub /data/appl/vpn/server-esxi-keys/$RUSER.pub
|
|
|
|
/bin/rm -f files/$RUSER
|
|
/bin/rm -f files/$RUSER.pub
|
|
/bin/rm -f files/authorized_keys
|
|
|