-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.yml
executable file
·53 lines (49 loc) · 1.68 KB
/
setup.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/local/bin/ansible-playbook --inventory=inventory
- name: ' Konductor | Devkit | Build VPC'
hosts: local
vars:
module: "build"
state_provider: "local"
tf_module_path: "{{ dir_terraform }}/devkit-vpc"
ansible_name_module: " Konductor | Devkit VPC | {{ module }}"
vars_files:
- vars/global.yml
#vars_prompt:
# name: aws_cloud_region
# prompt: "Please enter your AWS region"
# private: no
# - name: cluster_name
# prompt: "Please enter your AWS VPC Name"
# private: no
# name: aws_access_key
# prompt: "Please enter your AWS Access Key ID"
# private: no
# name: aws_secret_key
# prompt: "Please enter your AWS Access Key Secret"
# private: no
# - name: cluster_domain
# prompt: "Please enter the top level Domain space"
# private: no
# - name: rhcos_ami
# prompt: "Please enter the rhcos ami id"
# private: no
# - name: ssh_public_key
# prompt: "Please enter the aws public key string"
# private: no
# - name: aws_ssh_key
# prompt: "Please enter the aws ssh key name"
# private: no
tasks:
- name: '{{ ansible_name_module }} | file | Create ~/.aws'
file:
path: "/root/.aws"
state: directory
####### Stage Variables & AWS Creds
- name: '{{ ansible_name_module }} | template | Terraform Vars & aws credentials'
template:
src: "{{ item.name }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
loop:
- { mode: '755', name: "templates/terraform/global.tfvars.j2", dest: "{{ tf_module_path }}/global.tfvars"}
- { mode: '600', name: "templates/aws/credentials.j2", dest: "{{ local_home }}/.aws/credentials"}