Newer
Older
#-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-present Lydra https://www.lydra.fr/ #
# #
# this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# this program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
#-----------------------------------------------------------------------------#
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
tags:
- pkg
- linux
- yunohost
- name: Create apps and config directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0770
loop:
- "{{ ynh_symlink.appdata_dir }}"
- "{{ ynh_symlink.conf_dir }}"
tags:
- linux
- yunohost
when: ynh_symlink.enabled
- name: Create symbolic link for Yunohost apps data directory
ansible.builtin.file:
src: /var/www/
dest: "{{ ynh_symlink.appdata_dir }}/www_symlink"
state: link
tags:
- linux
- yunohost
when: ynh_symlink.enabled
- name: Create symbolic link for Yunohost configuration directory
ansible.builtin.file:
src: /etc/yunohost/
dest: "{{ ynh_symlink.conf_dir }}/yunohost_symlink"
state: link
tags:
- linux
- yunohost
when: ynh_symlink.enabled
ansible.builtin.stat: path=/etc/yunohost/installed
register: ynh_file_install
- name: Download Yunohost install script
url: "{{ ynh_install_script_url }}"
- name: Launch Yunohost install script
ansible.builtin.command: /tmp/install_yunohost.sh -a
- name: Launch Yunohost postinstall
ansible.builtin.command:
--domain "{{ ynh_main_domain }}" \
--password "{{ ynh_admin_password }}" \
{% if ynh_ignore_dyndns_server %} --ignore-dyndns {% endif %}
when: not ynh_file_install.stat.exists
tags:
- yunohost
- domains
- name: Create extra domains

Arthur BOUDREAULT
committed
ansible.builtin.include_tasks: domains.yml
when: ynh_extra_domains
tags:
- yunohost
- domains
- name: Run first Yunohost diagnosis
ansible.builtin.command: yunohost diagnosis run
tags:
- yunohost
- name: Install domain certificates
ansible.builtin.command: yunohost domain cert-install
tags:
- yunohost
- name: Add Yunohost users

Arthur BOUDREAULT
committed
ansible.builtin.include_tasks: users.yml
when: ynh_users
tags:
- yunohost
- users