forked from IBMSpectrumComputing/lsf-hybrid-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Step6-install-LSF.yml
66 lines (58 loc) · 1.87 KB
/
Step6-install-LSF.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
54
55
56
57
58
59
60
61
62
63
64
65
66
#
#-----------------------------------
# Copyright IBM Corp. 1992, 2017. All rights reserved.
# US Government Users Restricted Rights - Use, duplication or disclosure
# restricted by GSA ADP Schedule Contract with IBM Corp.
#-----------------------------------
#
---
- name: Read in EC2 inventory file and assemble a host list
hosts: LSF_Masters[0]
tasks:
- name: Reload EC2 server inventory
include_vars: "{{ RC_PLAY_TOP }}/inventory_ec2servers.yml"
- name: Make a hostgroup from the private IPs for ansible to connect to
add_host:
hostname: "{{ item.prv_ip }}"
groupname: ec2servers
prv_ip: "{{ item.prv_ip }}"
pub_ip: "{{ item.pub_ip }}"
awsid: "{{ item.awsid }}"
awsname: "{{ item.name }}"
prv_name: "{{ item.prv_name }}"
isvpn: "{{ item.isvpn }}"
with_items: "{{ ec2servers }}"
- name: Reconfigure LSF Master
hosts: LSF_Masters[0]
roles:
- gather-lsf-rpms
- reconfig-lsf-master
- name: Configure EC2 main instance as part of LSF Cluster
hosts: ec2servers[0]
gather_facts: true
tasks:
- include_vars: "AWS/AWS-config.yml"
- include_vars: "{{ RC_PLAY_TOP }}/inventory_ec2servers.yml"
- name: include deploy-lsf role
include_role:
name: deploy-lsf
when:
- hybrid_cluster is defined
- hybrid_cluster == true
- name: include deploy-cloud-lsf-master role
include_role:
name: deploy-cloud-lsf-master
when:
- multi_cluster is defined
- multi_cluster == true
- name: Configure Additional EC2 server instances to be LSF Servers
hosts: ec2servers[1:]
gather_facts: true
tasks:
- include_vars: "AWS/AWS-config.yml"
- name: include deploy-cloud-server role
include_role:
name: deploy-cloud-server
when:
- hybrid_cluster is defined
- hybrid_cluster == true