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

51 lines
1.3 KiB
YAML
Raw Normal View History

2017-08-23 12:58:21 +02:00
---
- name: Install requirements
ansible.builtin.apt:
2017-08-23 12:58:21 +02:00
name:
- git
- dialog
state: present
- name: Test if Yunohost is already installed
ansible.builtin.stat: path=/etc/yunohost/installed
2017-08-23 12:58:21 +02:00
register: yunohost_file_install
- name: Download install script
ansible.builtin.get_url:
2017-08-23 12:58:21 +02:00
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
2017-08-23 12:58:21 +02:00
when: yunohost_file_install.stat.exists == False
- name: Launch postinsstall
ansible.builtin.shell: "
2017-08-23 12:58:21 +02:00
yunohost tools postinstall \
--domain {{ yunohost.domain }} \
--password {{ yunohost.password }} \
{% if yunohost.ignore_dyndns == True %} --ignore-dyndns {% endif %}
"
when: yunohost_file_install.stat.exists == False
2017-08-24 22:39:58 +02:00
- name: Create domains
ansible.builtin.include: domains.yml
2017-08-24 22:39:58 +02:00
when: yunohost.extra_domains
- name: Run diagnosis # Required to install certificates
ansible.builtin.shell: yunohost diagnosis run
2017-08-23 12:58:21 +02:00
- name: Install certificates
ansible.builtin.shell: yunohost domain cert-install
2017-08-24 22:39:58 +02:00
changed_when: False
2017-08-23 15:23:31 +02:00
2017-09-17 21:25:30 +02:00
- name: Add users
ansible.builtin.include: users.yml
2017-09-17 21:25:30 +02:00
when: yunohost.users
2017-08-23 15:23:31 +02:00
- name: Install apps
ansible.builtin.include: apps.yml
2017-08-23 15:23:31 +02:00
when: yunohost.apps