-
Notifications
You must be signed in to change notification settings - Fork 2
/
ise_in_aws.yaml
103 lines (91 loc) · 3.11 KB
/
ise_in_aws.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
#------------------------------------------------------------------------------
# Main YAML Playbook to launch ISE with Meraki vMX in AWS
#------------------------------------------------------------------------------
- name: Provision AWS VPC with Cisco ISE and Meraki vMX
hosts: localhost
gather_facts: no
vars_files: vars/main.yaml
tasks:
- name: Check Required Environment Variables
delegate_to: localhost
vars:
env_vars:
- AWS_REGION
- MERAKI_ORG_NAME
- MERAKI_ORG_ID
- ISE_USERNAME
- ISE_PASSWORD
- ISE_RADIUS_SECRET
- ISE_TACACS_SECRET
loop: "{{ env_vars }}"
ansible.builtin.assert:
that:
- lookup('env', item) # is defined does not work
fail_msg: |
X Please set the required environment variable {{ item }} in your terminal:
export {{ item }}=__________
success_msg: |
✔ Environment variable {{ item }} is set
- name: Create SSH KeyPair
ansible.builtin.include_tasks: ssh_key_pair.yaml
- name: Create VPC
ansible.builtin.include_tasks: ise_in_aws.vpc.yaml
- name: Create vMX
ansible.builtin.include_tasks: ise_in_aws.vmx.yaml
tags: meraki,vmx
- name: Create PingVM
ansible.builtin.include_tasks: ise_in_aws.ping_vm.yaml
- name: Create ISE (no wait)
ansible.builtin.include_tasks: ise_in_aws.ise.yaml
- name: Create Meraki MR SSIDs
ansible.builtin.include_tasks: ise_in_aws.mr_ssids.yaml
- name: Refresh AWS Inventory to get the new Instance(s)
ansible.builtin.meta: refresh_inventory
- name: Initialize ISE Node(s)
hosts: ise
gather_facts: no
vars_files: vars/main.yaml
tasks:
- name: Wait for ISE Application Server Initialization
ansible.builtin.include_tasks: tasks/ise_initialized.yaml
- name: Show ISE Node Login URLs
loop: "{{ ise_nodes }}"
ansible.builtin.debug:
msg: |
.
/|\
/|||\
@ /|||||\ @
@ \|/ \|/ @ https://{{ ansible_host }}
@ @ https://{{ inventory_hostname }}.{{ domain_name }}
@. .@
`Y@ @ @Y`
# - name: Press Enter to Continue
# ansible.builtin.pause:
# prompt: |
#
# █ █
# █ █ Press Enter to Continue and Configure ISE!
# █ █
#
- name: Configure ISE
ansible.builtin.include_tasks: ise.configuration.yaml
- name: ISE ({{ inventory_hostname }}) is Ready!
ansible.builtin.pause:
seconds: 1
prompt: |
.
/|\
@ /|||\ @ ___ _ _
@ /|||||\ @ | _ \ ___ __ _ __| | _ _ | |
@ \|/ \|/ @ | // -_)/ _` |/ _` || || ||_|
@. .@ |_|_\\___|\__,_|\__,_| \_, |(_)
`Y@ @ @Y` |__/