forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.yml
38 lines (35 loc) · 915 Bytes
/
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
---
- name: Check inventory directory
gather_facts: false
hosts: localhost
tasks:
- include_tasks: tasks/check_inventory.yml
- name: Ensure provisioner hosts exist
gather_facts: false
hosts: localhost
tasks:
- name: Add provisioner hosts to inventory
add_host:
name: "{{ item }}"
ansible_connection: local
ansible_python_interpreter: "{{ ansible_playbook_python }}"
when: not hostvars[item]
changed_when: false
loop: ['aws_nodes_provisioner', 'aws_clients_provisioner']
- name: Provision hosts for nodes
gather_facts: false
hosts: aws_nodes_provisioner
roles:
- role: aws_manage
vars:
aws_group_name: nodes
tags: [ 'nodes' ]
- name: Provision hosts for clients
gather_facts: false
hosts: aws_clients_provisioner
roles:
- role: aws_manage
vars:
aws_group_name: clients
tags: [ 'clients' ]
...