2022-05-18 20:18:30 +02:00
|
|
|
################################################################################
|
|
|
|
# installation automatique de mon infra
|
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
---
|
2022-06-12 03:40:13 +02:00
|
|
|
- name: site
|
2022-05-18 20:18:30 +02:00
|
|
|
hosts: ubuntu
|
2022-06-12 03:40:13 +02:00
|
|
|
become: yes
|
2022-05-18 20:18:30 +02:00
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- vars/sites.yml
|
|
|
|
vars:
|
2022-06-11 16:29:18 +02:00
|
|
|
pounce_user: "pounce"
|
|
|
|
pounce_home: "/home/{{ pounce_user }}"
|
|
|
|
pounce_build: "{{ pounce_home }}/pounce_build"
|
|
|
|
litterbox_build: "{{ pounce_home}}/litterbox"
|
2022-05-18 20:18:30 +02:00
|
|
|
|
|
|
|
pre_tasks:
|
|
|
|
- name: update de la machine
|
|
|
|
apt:
|
|
|
|
update_cache: true
|
|
|
|
upgrade: yes
|
|
|
|
|
|
|
|
- name: installation des paquets nécessaires
|
|
|
|
apt:
|
|
|
|
name:
|
2022-06-12 03:40:13 +02:00
|
|
|
- acl
|
2023-01-21 20:13:34 +01:00
|
|
|
- apache2-utils
|
2022-05-18 20:18:30 +02:00
|
|
|
- certbot
|
2022-06-24 20:58:53 +02:00
|
|
|
- gcc
|
2022-05-18 20:18:30 +02:00
|
|
|
- git
|
2022-06-24 20:58:53 +02:00
|
|
|
- make
|
|
|
|
- nginx
|
2023-01-21 20:13:34 +01:00
|
|
|
- python3
|
2022-06-11 15:16:46 +02:00
|
|
|
- python3-pip
|
2022-06-24 20:58:53 +02:00
|
|
|
- sudo
|
2023-01-21 20:13:34 +01:00
|
|
|
- ufw
|
2022-05-18 20:18:30 +02:00
|
|
|
|
|
|
|
roles:
|
2022-06-24 20:58:53 +02:00
|
|
|
- libretls
|
2022-06-11 16:29:18 +02:00
|
|
|
- cgit
|
2022-06-12 03:40:13 +02:00
|
|
|
- site
|
2023-01-21 20:13:34 +01:00
|
|
|
- pounce
|
2022-05-18 20:18:30 +02:00
|
|
|
|
|
|
|
post_tasks:
|
|
|
|
- name: démarrage par défaut de nginx
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: nginx
|
|
|
|
enabled: yes
|
|
|
|
state: restarted
|