mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-06 12:03:38 +02:00
move prompts to the algo script
This commit is contained in:
parent
55d40a6b27
commit
c6ed3e8472
2 changed files with 25 additions and 25 deletions
26
algo
26
algo
|
@ -332,7 +332,31 @@ Enter the number of your desired provider
|
|||
}
|
||||
|
||||
user_management () {
|
||||
ansible-playbook users.yml
|
||||
|
||||
read -p "
|
||||
Enter IP address of your server: (use localhost for local installation)
|
||||
: " -r server_ip
|
||||
|
||||
read -p "
|
||||
What user should we use to login on the server? (ignore if you're deploying to localhost)
|
||||
[root]: " -r server_user
|
||||
server_user=${server_user:-root}
|
||||
|
||||
read -p "
|
||||
Do you want each user to have their own account for SSH tunneling?
|
||||
[y/N]: " -r ssh_tunneling_enabled
|
||||
ssh_tunneling_enabled=${ssh_tunneling_enabled:-n}
|
||||
|
||||
read -p "
|
||||
Enter the public IP address of your server: (IMPORTANT! This IP is used to verify the certificate)
|
||||
: " -r IP_subject
|
||||
|
||||
read -p "
|
||||
Enter the password for the private CA key:
|
||||
[pasted values will not be displayed]
|
||||
: " -rs easyrsa_CA_password
|
||||
|
||||
ansible-playbook users.yml -e "server_ip=$server_ip server_user=$server_user ssh_tunneling_enabled=$ssh_tunneling_enabled IP_subject=$IP_subject easyrsa_CA_password=$easyrsa_CA_password"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
|
24
users.yml
24
users.yml
|
@ -4,30 +4,6 @@
|
|||
gather_facts: False
|
||||
vars_files:
|
||||
- config.cfg
|
||||
vars_prompt:
|
||||
|
||||
- name: "server_ip"
|
||||
prompt: "Enter IP address of your server: (use localhost for local installation)\n"
|
||||
default: localhost
|
||||
private: no
|
||||
|
||||
- name: "server_user"
|
||||
prompt: "What user should we use to login on the server? (ignore if you're deploying to localhost):\n"
|
||||
default: "root"
|
||||
private: no
|
||||
|
||||
- name: "ssh_tunneling_enabled"
|
||||
prompt: "Do you want each user to have their own account for SSH tunneling? (y/n):\n"
|
||||
default: "n"
|
||||
private: no
|
||||
|
||||
- name: "IP_subject"
|
||||
prompt: "Enter public IP address of your server: (IMPORTANT! This IP is used to verify the certificate)\n"
|
||||
private: no
|
||||
|
||||
- name: "easyrsa_CA_password"
|
||||
prompt: "Enter the password for the private CA key:\n"
|
||||
private: yes
|
||||
|
||||
tasks:
|
||||
- name: Add the server to the vpn-host group
|
||||
|
|
Loading…
Add table
Reference in a new issue