Skip to content

Commit

Permalink
Waiting for varnish node to be ready.
Browse files Browse the repository at this point in the history
Before sometimes app nodes started first and caused 502 error as backend list on varnish was not updated.
  • Loading branch information
MariuszJozwiak authored and krisdante committed Mar 19, 2024
1 parent aeb5a70 commit d5c81ad
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion site.maintenance.aws-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@
instance_ids: "{{ item.instance_id }}"
region: "{{ aws_region }}"
state: running
wait: no
wait: yes
with_items:
- "{{ aws_persistent_node_instance }}"
- "{{ aws_varnish_node_instance }}"

- name: Wait 300 seconds for port 22 to become open and contain "OpenSSH"
ansible.builtin.wait_for:
port: 22
host: '{{ aws_varnish_node_elastic_ip }}'
search_regex: OpenSSH
delay: 10
connection: local

- name: Scale up App Node ASGs
when: start_asg
block:
Expand Down

0 comments on commit d5c81ad

Please sign in to comment.