Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: "Add host to load balancer {{ load_balancer_name }}"
- sudo: false
- local_action:
- module: ec2_elb
- state: present
- wait: true
- region: "{{ region }}"
- ec2_elbs: ['{{ load_balancer_name }}']
- instance_id: "{{ ec2_id }}"
- TASK: [Add host to load balancer ApiELB-staging] ******************************
- <127.0.0.1> REMOTE_MODULE ec2_elb region=us-east-1 state=present instance_id=i-eb7e0cc7
- <127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868 && echo $HOME/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868']
- <127.0.0.1> PUT /var/folders/d4/17fw96k107d5kbck6fb2__vc0000gn/T/tmpki4HPF TO /Users/pkaeding/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868/ec2_elb
- <127.0.0.1> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /Users/pkaeding/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868/ec2_elb; rm -rf /Users/pkaeding/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868/ >/dev/null 2>&1']
- failed: [10.0.115.149 -> 127.0.0.1] => {"failed": true}
- msg: The instance i-eb7e0cc7 could not be put in service on LoadBalancer:ApiELB-staging. Reason: Instance has not passed the configured HealthyThreshold number of health checks consecutively.
- FATAL: all hosts have already failed -- aborting
- - name: "Ensure load balancer exists: {{ load_balancer_name }}"
- sudo: false
- local_action:
- module: ec2_elb_lb
- name: "{{ load_balancer_name }}"
- state: present
- region: "{{ region }}"
- subnets: "{{ vpc_public_subnet_ids }}"
- listeners:
- - protocol: https
- load_balancer_port: 443
- instance_protocol: http
- instance_port: 8888
- ssl_certificate_id: "{{ ssl_cert }}"
- health_check:
- ping_protocol: http # options are http, https, ssl, tcp
- ping_port: 8888
- ping_path: "/internal/v1/status"
- response_timeout: 5 # seconds
- interval: 30 # seconds
- unhealthy_threshold: 10
- healthy_threshold: 10
- register: apilb
- - command: /usr/bin/curl -v --fail http://localhost:8888/internal/v1/status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement