Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- # Open the listS
- instancefile = open('instances', 'r')
- lbfile = open('loadbalancers', 'r')
- # Create Python lists
- with instancefile as f:
- instances = [x.strip('\n') for x in f.readlines()]
- with lbfile as f:
- loadbalancers = [x.strip('\n') for x in f.readlines()]
- for lb in loadbalancers:
- for i in instances:
- command = str("elb-register-instances-with-lb " + lb + " --instances " + i)
- os.system(command)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement