2017-08-23 12:58:21 +02:00
|
|
|
---
|
|
|
|
- name: Install requirements
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.apt:
|
2017-08-23 12:58:21 +02:00
|
|
|
name:
|
|
|
|
- git
|
|
|
|
- dialog
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Test if Yunohost is already installed
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.stat: path=/etc/yunohost/installed
|
2021-10-12 14:27:37 +02:00
|
|
|
register: ynh_file_install
|
2017-08-23 12:58:21 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Download Yunohost install script
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.get_url:
|
2021-10-12 14:27:37 +02:00
|
|
|
url: "{{ ynh_install_script_url }}"
|
2017-08-23 12:58:21 +02:00
|
|
|
dest: /tmp/install_yunohost.sh
|
|
|
|
mode: 700
|
2021-10-12 14:27:37 +02:00
|
|
|
when: ynh_file_install.stat.exists == False
|
2017-08-23 12:58:21 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Launch Yunohost install script
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.command: /tmp/install_yunohost.sh -a
|
2021-10-12 14:27:37 +02:00
|
|
|
when: ynh_file_install.stat.exists == False
|
2017-08-23 12:58:21 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Launch Yunohost postinstall
|
2021-10-12 16:00:56 +02:00
|
|
|
ansible.builtin.command:
|
2017-08-23 12:58:21 +02:00
|
|
|
yunohost tools postinstall \
|
2021-10-12 16:00:56 +02:00
|
|
|
--domain "{{ ynh_main_domain }}" \
|
|
|
|
--password "{{ ynh_admin_password }}" \
|
|
|
|
{% if ynh_ignore_dyndns_server == True %} --ignore-dyndns {% endif %}
|
2021-10-12 14:27:37 +02:00
|
|
|
when: ynh_file_install.stat.exists == False
|
2017-08-23 12:58:21 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Create extra domains
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.include: domains.yml
|
2021-10-12 14:27:37 +02:00
|
|
|
when: ynh_extra_domains
|
2017-08-24 22:39:58 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Run first Yunohost diagnosis
|
2021-10-12 16:00:56 +02:00
|
|
|
ansible.builtin.command: yunohost diagnosis run
|
2020-11-16 07:52:20 +01:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Install domain certificates
|
2021-10-12 16:00:56 +02:00
|
|
|
ansible.builtin.command: yunohost domain cert-install
|
2017-08-24 22:39:58 +02:00
|
|
|
changed_when: False
|
2017-08-23 15:23:31 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Add Yunohost users
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.include: users.yml
|
2021-10-12 14:27:37 +02:00
|
|
|
when: ynh_users
|
2017-09-17 21:25:30 +02:00
|
|
|
|
2021-10-12 14:27:37 +02:00
|
|
|
- name: Install Yunohost apps
|
2021-05-01 17:13:18 +02:00
|
|
|
ansible.builtin.include: apps.yml
|
2021-10-12 14:27:37 +02:00
|
|
|
when: ynh_apps
|