blob: 6a8c8a07cd8c621a92ae60b22130673a25adc212 [file] [log] [blame]
Zack Williamsc047c872017-01-11 08:38:15 -07001---
2# juju-finish/tasks/main.yml
3
Andy Bavier50f9a532016-11-17 11:05:56 -08004# run another time, so services will be in juju_services list
5- name: Obtain Juju Facts after service creation
6 juju_facts:
7 register: result
8 until: result | success
9 retries: 3
10 delay: 15
11
12# 1800s = 30m. Usually takes 10-12m on cloudlab for relations to come up
13# Only checks for first port in list
14- name: Wait for juju services to have open ports
15 wait_for:
16 host={{ item.name }}
17 port={{ item.forwarded_ports[0].int }}
18 timeout=1800
19 with_items: "{{ head_lxd_list | selectattr('forwarded_ports', 'defined') | list }}"
20
21# secondary wait, as waiting on ports isn't enough. Probably only need one of these...
22# 160*15s = 2400s = 40m max wait
23- name: Wait for juju services to start
24 command: juju status --format=summary
25 register: juju_summary
26 until: juju_summary.stdout.find("pending:") == -1
27 retries: 160
28 delay: 15
29 tags:
30 - skip_ansible_lint # checking/waiting on a system to be up
31