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