This commit is contained in:
Bryan Konowitz 2018-10-14 07:29:38 +00:00 committed by GitHub
commit f9c1ca77c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 10 deletions

View file

@ -21,7 +21,7 @@ Resources:
InstanceTenancy: default
Tags:
- Key: Name
Value: Algo
Value: !Ref AWS::StackName
- Key: Environment
Value: Algo
@ -38,7 +38,7 @@ Resources:
- Key: Environment
Value: Algo
- Key: Name
Value: Algo
Value: !Ref AWS::StackName
Subnet:
Type: AWS::EC2::Subnet
@ -49,7 +49,7 @@ Resources:
- Key: Environment
Value: Algo
- Key: Name
Value: Algo
Value: !Ref AWS::StackName
VpcId: !Ref VPC
VPCGatewayAttachment:
@ -66,7 +66,7 @@ Resources:
- Key: Environment
Value: Algo
- Key: Name
Value: Algo
Value: !Ref AWS::StackName
Route:
Type: AWS::EC2::Route
@ -140,7 +140,7 @@ Resources:
CidrIp: 0.0.0.0/0
Tags:
- Key: Name
Value: Algo
Value: !Ref AWS::StackName
- Key: Environment
Value: Algo
@ -181,7 +181,7 @@ Resources:
cfn-signal -e $? --stack ${AWS::StackName} --resource EC2Instance --region ${AWS::Region}
Tags:
- Key: Name
Value: Algo
Value: !Ref AWS::StackName
- Key: Environment
Value: Algo

View file

@ -1,4 +1,3 @@
---
- name: Deploy the template
cloudformation:
aws_access_key: "{{ access_key }}"

View file

@ -79,7 +79,12 @@ Save the embedded CA cert and encrypted user PKCS12 file.
$ErrorActionPreference = "Stop"
$VpnServerAddress = "{{ IP_subject_alt_name }}"
$VpnName = "Algo VPN {{ IP_subject_alt_name }} IKEv2"
{% if (algo_server_name == 'algo') or (algo_server_name == 'algo.local') %}
{% set vpn_server_name = 'Algo VPN '+IP_subject_alt_name+' IKEv2' %}
{% else %}
{% set vpn_server_name = algo_server_name+' VPN' %}
{% endif %}
$VpnName = "{{ vpn_server_name }}"
$VpnUser = "{{ item.0 }}"
$CaCertificateBase64 = "{{ PayloadContentCA }}"
$UserPkcs12Base64 = "{{ item.1.stdout }}"

View file

@ -1,3 +1,8 @@
{% if (algo_server_name == 'algo') or (algo_server_name == 'algo.local') %}
{% set vpn_server_name = 'Algo VPN '+IP_subject_alt_name+' IKEv2' %}
{% else %}
{% set vpn_server_name = algo_server_name+' VPN' %}
{% endif %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@ -129,7 +134,7 @@
<integer>0</integer>
</dict>
<key>UserDefinedName</key>
<string>Algo VPN {{ IP_subject_alt_name }} IKEv2</string>
<string>{{ vpn_server_name }}</string>
<key>VPNType</key>
<string>IKEv2</string>
</dict>
@ -175,7 +180,7 @@
</dict>
</array>
<key>PayloadDisplayName</key>
<string>{{ IP_subject_alt_name }} IKEv2</string>
<string>{{ vpn_server_name }}</string>
<key>PayloadIdentifier</key>
<string>donut.local.{{ 500000 | random | to_uuid | upper }}</string>
<key>PayloadRemovalDisallowed</key>