1
0
Fork 0
ynh-lydra-ansible-yunohost/tasks/main.yml
Arthur BOUDREAULT 9448739cf2 refactor: removed action related to admin_users task
This feature is system-related, not yunohost-related
2021-10-08 08:51:45 +00:00

50 lines
1.3 KiB
YAML

---
- name: Install requirements
ansible.builtin.apt:
name:
- git
- dialog
state: present
- name: Test if Yunohost is already installed
ansible.builtin.stat: path=/etc/yunohost/installed
register: yunohost_file_install
- name: Download install script
ansible.builtin.get_url:
url: "{{ yunohost.install_script_url }}"
dest: /tmp/install_yunohost.sh
mode: 700
when: yunohost_file_install.stat.exists == False
- name: Launch script
ansible.builtin.command: /tmp/install_yunohost.sh -a
when: yunohost_file_install.stat.exists == False
- name: Launch postinsstall
ansible.builtin.shell: "
yunohost tools postinstall \
--domain {{ yunohost.domain }} \
--password {{ yunohost.password }} \
{% if yunohost.ignore_dyndns == True %} --ignore-dyndns {% endif %}
"
when: yunohost_file_install.stat.exists == False
- name: Create domains
ansible.builtin.include: domains.yml
when: yunohost.extra_domains
- name: Run diagnosis # Required to install certificates
ansible.builtin.shell: yunohost diagnosis run
- name: Install certificates
ansible.builtin.shell: yunohost domain cert-install
changed_when: False
- name: Add users
ansible.builtin.include: users.yml
when: yunohost.users
- name: Install apps
ansible.builtin.include: apps.yml
when: yunohost.apps