Skip to content

Commit

Permalink
Optional health check
Browse files Browse the repository at this point in the history
  • Loading branch information
ahelal committed Jul 4, 2016
1 parent 2bd3a4b commit 30f99ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
---

aws_route53_healthcheck_enabled : True
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
type: "{{ aws_route53_healthcheck_type | default(omit) }}"
validate_certs: "{{ aws_route53_healthcheck_validate_certs | default(omit) }}"
register: aws_route53_healthcheck_output
when: aws_route53_healthcheck_enabled
connection: local
delegate_to: localhost

Expand All @@ -34,8 +35,7 @@
retry_interval: "{{ item.retry | default(omit) }}"
weight: "{{ item.weight | default(1) }}"
identifier: "{{ aws_route53_healthcheck_identifier | default(inventory_hostname) }}"

health_check: "{{ aws_route53_healthcheck_output.health_check.id }}"
health_check: "{{ aws_route53_healthcheck_output.health_check.id if aws_route53_healthcheck_enabled else omit }}"
with_items: "{{ aws_route53_healthcheck_route53_value }}"
when: aws_route53_healthcheck_route53_value | default("") != ""
connection: local
Expand Down

0 comments on commit 30f99ef

Please sign in to comment.