forked from linode/ansible_linode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yml
50 lines (40 loc) · 873 Bytes
/
deploy.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
---
- name: Deploy MySQL/Adminer infra
hosts: localhost
gather_facts: yes
# Load in our config file
vars_files:
- config.yml
# Create groups for the provisioned infra
vars:
hosts_mysql:
hosts_adminer:
roles:
- role: infra
- name: Deploy MySQL
gather_facts: yes
hosts: hosts_mysql
remote_user: root
vars_files:
- config.yml
vars:
ansible_ssh_private_key_file: "{{ ssh_key_output_path }}"
roles:
- role: configure_mysql
- name: Deploy Adminer
hosts: hosts_adminer
remote_user: root
vars_files:
- config.yml
vars:
ansible_ssh_private_key_file: "{{ ssh_key_output_path }}"
roles:
- role: configure_adminer
- name: Display Outputs
hosts: localhost
tasks:
- debug:
var: groups
- debug:
msg:
- "Adminer Access URL: http://{{ groups['hosts_adminer'][0] }}/"