#!/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