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

14 lines
498 B
YAML
Raw Normal View History

2017-08-24 22:39:58 +02:00
---
- name: List currently installed domains
ansible.builtin.shell: yunohost domain list --output-as json
2017-08-24 22:39:58 +02:00
register: yunohost_installed_domains_raw
changed_when: False
- name: Format json of domains
ansible.builtin.set_fact: yunohost_installed_domains="{{ yunohost_installed_domains_raw.stdout | from_json }}"
2017-08-24 22:39:58 +02:00
- name: Create domains
ansible.builtin.shell: yunohost domain add {{ item }}
2017-08-24 22:39:58 +02:00
with_items: "{{ yunohost.extra_domains }}"
when: item not in yunohost_installed_domains.domains