1
0
Fork 0
ynh-lydra-ansible-yunohost/tasks/domains.yml
Arthur BOUDREAULT b76b876750 refactor: changed vars to reflect new variable names
refactor: changed variables pattern to be more consistent with ansible good practises and more flexible to use.
refactor: remove useless comment
doc: Readme in English and French
2021-10-12 12:27:37 +00:00

13 lines
473 B
YAML

---
- name: List currently installed domains
ansible.builtin.shell: yunohost domain list --output-as json
register: ynh_installed_domains_raw
changed_when: False
- name: Format json of domains
ansible.builtin.set_fact: ynh_installed_domains="{{ ynh_installed_domains_raw.stdout | from_json }}"
- name: Create domains
ansible.builtin.shell: yunohost domain add {{ item }}
with_items: "{{ ynh_extra_domains }}"
when: item not in ynh_installed_domains.domains