1
0
Fork 0
ynh-lydra-ansible-yunohost/tasks/domains.yml

14 lines
477 B
YAML
Raw Normal View History

2017-08-24 22:39:58 +02:00
---
- name: List currently installed domains
ansible.builtin.command: yunohost domain list --output-as json
register: ynh_installed_domains_raw
2017-08-24 22:39:58 +02:00
changed_when: False
- name: Format json of domains
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
ansible.builtin.command: yunohost domain add {{ item }}
with_items: "{{ ynh_extra_domains }}"
when: item not in ynh_installed_domains.domains