diff --git a/README.md b/README.md index def5464a..1f26c90f 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,15 @@ Start the deploy and follow the instructions: When the process is done, you can find `.mobileconfig` files and certificates in the `configs` directory. Send the `.mobileconfig` profile to users with Apple devices. Note that profile installation is supported over AirDrop. Do not send the mobileconfig file over plaintext (e.g., e-mail) since it contains the keys to access the VPN. For those using other clients, like Windows or Android, securely send them the X.509 certificates for the server and their user. + +### Initial Deployment on Local Servers +When installing algo on an existing system such as Ubuntu 16.04, you only need to install ansible using the commands below: + + ``` + sudo apt-get install software-properties-common && sudo apt-add-repository ppa:ansible/ansible + sudo apt-get update && sudo apt-get install ansible + ``` + ### User Management If you want to add or delete users, update the `users` list in `config.cfg` and run the command: diff --git a/algo b/algo index 769c6b37..dc454999 100755 --- a/algo +++ b/algo @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash p12_export_password () { echo -n " @@ -31,12 +31,29 @@ Enter the number of your desired provider p12_export_password - ansible-playbook "${CLOUD}.yml" -e easyrsa_p12_export_password=${P} + # Use a local connection for non-cloud installations + case "${CLOUD}" in + "non-cloud") ansible-playbook "${CLOUD}.yml" -e easyrsa_p12_export_password=${P} --connection=local ;; + *) ansible-playbook "${CLOUD}.yml" -e easyrsa_p12_export_password=${P} ;; + esac } user_management () { p12_export_password - ansible-playbook users.yml -e easyrsa_p12_export_password=${P} + # Use a local connection for non-cloud installations + echo -n " + What provider would you like to use? + 1. Remote Server + 2. Local Server + +: " + + read N + + case "$N" in + 2) ansible-playbook users.yml -e easyrsa_p12_export_password=${P} --connection=local ;; + *) ansible-playbook users.yml -e easyrsa_p12_export_password=${P} ;; + esac } case "$1" in