2017-08-24 22:39:58 +02:00
|
|
|
---
|
|
|
|
- name: List currently installed domains
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.shell: yunohost domain list --output-as json
|
2021-10-12 14:27:37 +02:00
|
|
|
register: ynh_installed_domains_raw
|
2017-08-24 22:39:58 +02:00
|
|
|
changed_when: False
|
|
|
|
|
|
|
|
- name: Format json of domains
|
2021-10-12 14:27:37 +02:00
|
|
|
ansible.builtin.set_fact: ynh_installed_domains="{{ ynh_installed_domains_raw.stdout | from_json }}"
|
2017-08-24 22:39:58 +02:00
|
|
|
|
|
|
|
- name: Create domains
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.shell: yunohost domain add {{ item }}
|
2021-10-12 14:27:37 +02:00
|
|
|
with_items: "{{ ynh_extra_domains }}"
|
|
|
|
when: item not in ynh_installed_domains.domains
|