Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
main.yml 3.68 KiB
---
#-----------------------------------------------------------------------------#
# 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/>.        #
#                                                                             #
#-----------------------------------------------------------------------------#

- name: Install requirements
  ansible.builtin.apt:
    name:
      - git
      - dialog
    state: present
  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

- name: Test if Yunohost is already installed
  ansible.builtin.stat: path=/etc/yunohost/installed
  register: ynh_file_install
  tags:
    - yunohost