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.72 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: Update all packages and index
  ansible.builtin.apt:
    upgrade: dist
    update_cache: yes
  tags:
    - pkg
    - linux

- name: Install requirements
  ansible.builtin.apt:
    name:
      - git
      - dialog
    state: present
  tags:
    - pkg
    - linux

- name: Create backup directory
  ansible.builtin.file:
    path: "/home/yunohost.backup/archives"
    state: directory
    mode: "0755"
  tags:
    - linux
  when: ynh_data_dirs_enabled

- name: Create data and config subdirs of Yunohost
  ansible.builtin.file:
    path: "{{ item.path }}"
    state: directory
    mode: "0755"
  with_items:
    - "{{ ynh_data_dirs }}"
  tags:
    - linux
  when: ynh_data_dirs_enabled

- name: Create symbolic links for Yunohost subdirs
  ansible.builtin.file:
    src: "{{ item.path }}"
    dest: "{{ item.link }}"
    state: link
    force: yes
  with_items:
    - "{{ ynh_data_dirs }}"
  tags:
    - linux
  when: ynh_data_dirs_enabled

- name: Test if Yunohost is already installed