forked from IBMSpectrumComputing/lsf-hybrid-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Step3-setup-env.yml
38 lines (34 loc) · 1005 Bytes
/
Step3-setup-env.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
#
#-----------------------------------
# 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: Gather the Users, Groups and Hosts from the LSF Master
hosts: LSF_Masters[0]
tasks:
- include_vars: "AWS/AWS-config.yml"
roles:
- gather-local-env
- name: Read in EC2 inventory file and assemble a host list
hosts: LSF_Masters[0]
tasks:
- name: Load in playbook provided VPN data (ok to fail)
include_vars: "inventory_ec2.yml"
ignore_errors: True
- name: Make the ec2vpn host list
add_host:
hostname: "{{ item.prv_ip }}"
groupname: ec2vpn
with_items: "{{ ec2vpn }}"
when:
- ec2vpn is defined
- name: Push the config to the EC2 nodes
hosts: ec2vpn
vars_files:
- AWS/AWS-config.yml
gather_facts: true
roles:
- update-remote-env