blob: e173e0c4f9625245087494c52800a8a261e1a748 [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
32- name: Create admin-openrc.sh credentials file
33 template:
34 src=admin-openrc.sh.j2
Andy Baviera6cffe12017-03-15 17:33:42 -040035 dest="{{ item }}/admin-openrc.sh"
36 with_items:
37 - "{{ ansible_user_dir }}"
38 - "{{ cord_profile_dir }}"