| # juju-finish/tasks/main.yml |
| # run another time, so services will be in juju_services list |
| - name: Obtain Juju Facts after service creation |
| # 1800s = 30m. Usually takes 10-12m on cloudlab for relations to come up |
| # Only checks for first port in list |
| - name: Wait for juju services to have open ports |
| port={{ item.forwarded_ports[0].int }} |
| with_items: "{{ head_lxd_list | selectattr('forwarded_ports', 'defined') | list }}" |
| # secondary wait, as waiting on ports isn't enough. Probably only need one of these... |
| # 160*15s = 2400s = 40m max wait |
| - name: Wait for juju services to start |
| command: juju status --format=summary |
| until: juju_summary.stdout.find("pending:") == -1 |
| - skip_ansible_lint # checking/waiting on a system to be up |
| - name: Create admin-openrc.sh credentials file |
| dest="{{ item }}/admin-openrc.sh" |
| - "{{ ansible_user_dir }}" |
| - "{{ cord_profile_dir }}" |