-
Notifications
You must be signed in to change notification settings - Fork 413
/
aws_provision.yml
50 lines (47 loc) · 1.51 KB
/
aws_provision.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
---
- hosts: workstation
become: true
gather_facts: false
tasks:
- name: create bin directory
file:
path: /root/bin
state: directory
- name: get script common.sh
get_url:
url: "{{ param_repo_base }}/scripts/common.sh"
dest: /root/common.sh
mode: 0755
- name: get script jq
get_url:
url: "{{ param_repo_base }}/scripts/jq-linux64"
dest: /root/bin/jq
mode: 0755
- name: get script order_svc.sh
get_url:
url: "{{ param_repo_base }}/scripts/order_svc.sh"
dest: /root/order_svc.sh
mode: 0755
- name: create credentials
copy:
content: |
export username={{ param_user }}
export password={{ param_password }}
export uri=https://labs.opentlc.com
dest: /root/credential.rc
mode: 0755
# Fix the existing shell scripts to reference jq command with bin/jq
- name: fix scripts
shell: "sed -i 's/ jq/ bin\\/jq/g' {{ item }}"
with_items:
- /root/common.sh
- /root/order_svc.sh
# Using this script will always deploy environments in the us-east-1 region.
# TODO: this shell task is not working yet!
- name: order service on opentlc
shell: source /root/credential.rc; ./order_svc.sh -y -c 'OPENTLC Automation' -i 'Ansible Advanced - Three Tier App' -t 1 -d 'dialog_expiration=7;region=na;nodes=1;dialog_runtime=8'
args:
chdir: /root
- name: Wait for mail
pause:
minutes: 10