mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-06 15:13:56 +02:00
p12 moved into playbooks
This commit is contained in:
parent
16df24f9af
commit
7085a594fc
9 changed files with 33 additions and 13 deletions
14
algo
14
algo
|
@ -1,12 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
p12_export_password () {
|
|
||||||
echo -n "
|
|
||||||
Enter the password for p12 certificates (default: vpn):
|
|
||||||
: "
|
|
||||||
read -s P
|
|
||||||
P=${P:-vpn}
|
|
||||||
}
|
|
||||||
|
|
||||||
algo_provisioning () {
|
algo_provisioning () {
|
||||||
echo -n "
|
echo -n "
|
||||||
|
@ -29,14 +22,11 @@ Enter the number of your desired provider
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
p12_export_password
|
ansible-playbook "${CLOUD}.yml"
|
||||||
|
|
||||||
ansible-playbook "${CLOUD}.yml" -e easyrsa_p12_export_password=${P}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
user_management () {
|
user_management () {
|
||||||
p12_export_password
|
ansible-playbook users.yml
|
||||||
ansible-playbook users.yml -e easyrsa_p12_export_password=${P}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
|
@ -59,6 +59,11 @@
|
||||||
default: "Y"
|
default: "Y"
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
|
- name: "easyrsa_p12_export_password"
|
||||||
|
prompt: "Enter the password for p12 certificates:\n"
|
||||||
|
default: "vpn"
|
||||||
|
private: yes
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- cloud-digitalocean
|
- cloud-digitalocean
|
||||||
|
|
||||||
|
|
5
ec2.yml
5
ec2.yml
|
@ -67,6 +67,11 @@
|
||||||
default: "Y"
|
default: "Y"
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
|
- name: "easyrsa_p12_export_password"
|
||||||
|
prompt: "Enter the password for p12 certificates:\n"
|
||||||
|
default: "vpn"
|
||||||
|
private: yes
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- cloud-ec2
|
- cloud-ec2
|
||||||
|
|
||||||
|
|
5
gce.yml
5
gce.yml
|
@ -63,6 +63,11 @@
|
||||||
default: "Y"
|
default: "Y"
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
|
- name: "easyrsa_p12_export_password"
|
||||||
|
prompt: "Enter the password for p12 certificates:\n"
|
||||||
|
default: "vpn"
|
||||||
|
private: yes
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- cloud-gce
|
- cloud-gce
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
default: "Y"
|
default: "Y"
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
|
- name: "easyrsa_p12_export_password"
|
||||||
|
prompt: "Enter the password for p12 certificates:\n"
|
||||||
|
default: "vpn"
|
||||||
|
private: yes
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Add the server to the vpn-host group
|
- name: Add the server to the vpn-host group
|
||||||
add_host:
|
add_host:
|
||||||
|
@ -32,6 +37,7 @@
|
||||||
ansible_python_interpreter: "/usr/bin/python2.7"
|
ansible_python_interpreter: "/usr/bin/python2.7"
|
||||||
dns_enabled: "{{ dns_enabled }}"
|
dns_enabled: "{{ dns_enabled }}"
|
||||||
auditd_enabled: " {{ auditd_enabled }}"
|
auditd_enabled: " {{ auditd_enabled }}"
|
||||||
|
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
|
||||||
|
|
||||||
- name: Wait for SSH to become available
|
- name: Wait for SSH to become available
|
||||||
local_action: "wait_for port=22 host={{ server_ip }} timeout=320"
|
local_action: "wait_for port=22 host={{ server_ip }} timeout=320"
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
do_droplet_id: "{{ do.droplet.id }}"
|
do_droplet_id: "{{ do.droplet.id }}"
|
||||||
dns_enabled: "{{ dns_enabled }}"
|
dns_enabled: "{{ dns_enabled }}"
|
||||||
auditd_enabled: " {{ auditd_enabled }}"
|
auditd_enabled: " {{ auditd_enabled }}"
|
||||||
|
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
|
||||||
|
|
||||||
- name: Wait for SSH to become available
|
- name: Wait for SSH to become available
|
||||||
local_action: "wait_for port=22 host={{ do.droplet.ip_address }} timeout=320"
|
local_action: "wait_for port=22 host={{ do.droplet.ip_address }} timeout=320"
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
ansible_python_interpreter: "/usr/bin/python2.7"
|
ansible_python_interpreter: "/usr/bin/python2.7"
|
||||||
dns_enabled: "{{ dns_enabled }}"
|
dns_enabled: "{{ dns_enabled }}"
|
||||||
auditd_enabled: " {{ auditd_enabled }}"
|
auditd_enabled: " {{ auditd_enabled }}"
|
||||||
|
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
|
||||||
with_items: "{{ ec2.instances }}"
|
with_items: "{{ ec2.instances }}"
|
||||||
|
|
||||||
- name: Wait for SSH to become available
|
- name: Wait for SSH to become available
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
ansible_python_interpreter: "/usr/bin/python2.7"
|
ansible_python_interpreter: "/usr/bin/python2.7"
|
||||||
dns_enabled: "{{ dns_enabled }}"
|
dns_enabled: "{{ dns_enabled }}"
|
||||||
auditd_enabled: " {{ auditd_enabled }}"
|
auditd_enabled: " {{ auditd_enabled }}"
|
||||||
|
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
|
||||||
|
|
||||||
- name: Firewall configured
|
- name: Firewall configured
|
||||||
local_action:
|
local_action:
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
default: "root"
|
default: "root"
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
|
- name: "easyrsa_p12_export_password"
|
||||||
|
prompt: "Enter the password for p12 certificates:\n"
|
||||||
|
default: "vpn"
|
||||||
|
private: yes
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Add the server to the vpn-host group
|
- name: Add the server to the vpn-host group
|
||||||
add_host:
|
add_host:
|
||||||
|
@ -22,6 +27,7 @@
|
||||||
groupname: vpn-host
|
groupname: vpn-host
|
||||||
ansible_ssh_user: "{{ server_user }}"
|
ansible_ssh_user: "{{ server_user }}"
|
||||||
ansible_python_interpreter: "/usr/bin/python2.7"
|
ansible_python_interpreter: "/usr/bin/python2.7"
|
||||||
|
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
|
||||||
|
|
||||||
- name: Wait for SSH to become available
|
- name: Wait for SSH to become available
|
||||||
local_action: "wait_for port=22 host={{ server_ip }} timeout=320"
|
local_action: "wait_for port=22 host={{ server_ip }} timeout=320"
|
||||||
|
|
Loading…
Add table
Reference in a new issue