Advertisement
Guest User

Untitled

a guest
Aug 27th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. - name: "Add host to load balancer {{ load_balancer_name }}"
  2. sudo: false
  3. local_action:
  4. module: ec2_elb
  5. state: present
  6. wait: true
  7. region: "{{ region }}"
  8. ec2_elbs: ['{{ load_balancer_name }}']
  9. instance_id: "{{ ec2_id }}"
  10.  
  11. TASK: [Add host to load balancer ApiELB-staging] ******************************
  12. <127.0.0.1> REMOTE_MODULE ec2_elb region=us-east-1 state=present instance_id=i-eb7e0cc7
  13. <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']
  14. <127.0.0.1> PUT /var/folders/d4/17fw96k107d5kbck6fb2__vc0000gn/T/tmpki4HPF TO /Users/pkaeding/.ansible/tmp/ansible-tmp-1409156786.81-113716163813868/ec2_elb
  15. <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']
  16. failed: [10.0.115.149 -> 127.0.0.1] => {"failed": true}
  17. 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.
  18.  
  19. FATAL: all hosts have already failed -- aborting
  20.  
  21. - name: "Ensure load balancer exists: {{ load_balancer_name }}"
  22. sudo: false
  23. local_action:
  24. module: ec2_elb_lb
  25. name: "{{ load_balancer_name }}"
  26. state: present
  27. region: "{{ region }}"
  28. subnets: "{{ vpc_public_subnet_ids }}"
  29. listeners:
  30. - protocol: https
  31. load_balancer_port: 443
  32. instance_protocol: http
  33. instance_port: 8888
  34. ssl_certificate_id: "{{ ssl_cert }}"
  35. health_check:
  36. ping_protocol: http # options are http, https, ssl, tcp
  37. ping_port: 8888
  38. ping_path: "/internal/v1/status"
  39. response_timeout: 5 # seconds
  40. interval: 30 # seconds
  41. unhealthy_threshold: 10
  42. healthy_threshold: 10
  43. register: apilb
  44.  
  45. - command: /usr/bin/curl -v --fail http://localhost:8888/internal/v1/status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement