deploiement/roles/bubger/tasks/main.yml
2022-06-26 13:26:59 +02:00

67 lines
1.9 KiB
YAML

################################################################################
# création des dossiers pour les archives mails
#
# Copyright (C) 2022 rick G. <rick@gnous.eu>
#
# 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 <https://www.gnu.org/licenses/>.
################################################################################
---
- name: installation des paquets nécessaires
apt:
name:
- rsync
- name: création dossier principal
ansible.builtin.file:
path: "{{ path }}"
state: directory
- name: création des sous dossiers
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ user_default }}"
group: "{{ user_default }}"
with_items:
- "{{ public }}"
- "{{ private }}"
- name: création du dossier du site
ansible.builtin.file:
path: "{{ path_site }}"
state: directory
- name: lien symbolique pour le dossier publique
ansible.builtin.file:
src: "{{ public }}"
dest: "{{ path_site_public }}"
state: link
- name: lien symbolique pour le dossier privé
ansible.builtin.file:
src: "{{ private }}"
dest: "{{ path_site_private }}"
state: link
- name: configuration de Nginx
template:
src: "archives-nginx"
dest: "{{ ava }}/archives.conf"
mode: 0644
- name: lien symbolique pour Nginx
file:
src: "{{ ava }}/archives.conf"
dest: "{{ ena }}/archives.conf"
state: link