-
Notifications
You must be signed in to change notification settings - Fork 0
/
bastion.yml
36 lines (35 loc) · 974 Bytes
/
bastion.yml
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
---
- hosts: localhost
connection: local
gather_facts: no
environment:
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
AWS_REGION: "{{ AWS_REGION }}"
vars_files:
- keys
tasks:
- name: Get VPC information
include_role:
name: vpc
vars:
fetch_vpc_info: True
when: hostvars['localhost']['create_initial_vpc'] is not defined
- hosts: bastion
gather_facts: no
become: true
tasks:
- name: Patch bastion host
include_role:
name: patching
when: hostvars['localhost']['create_initial_vpc'] is defined
- name: Install common packages
include_role:
name: common
when: hostvars['localhost']['create_initial_vpc'] is defined
- name: Configure bastion host
include_role:
name: bastion
vars:
configure_bastion_host: True
when: hostvars['localhost']['create_initial_vpc'] is defined