86 lines
1.7 KiB
Markdown

# PLAYBOOK POUR CONFIGURER UN SERVER DU GARAGE
Projet qui vise à automatiser l'installation et la configuration d'une machine serveur du garage sous Linux Debian.
## PAQUETS / TASKS
- Tasks:
- apt_update.yml
- basic_install.yml
- create_workspace.yml
- nginx.yml
- docker.yml
- certbot.yml
- clamav
- fail2ban.yml
- ufw.yml
- ssh.yml
- Dépendances:
- rsyslog
- wget
- curl
- git
- vim
- htop
- btop
- net-tools
- unzip
- gnupg
- lsb-release
- ca-certificates
- software-properties-common
- apt-transport-https
- bash-completion
- Services:
- git
- nginx
- docker
- docker-compose
- fail2ban
- ufw
- clamAV
## PRE REQUIS
- Debian 13
- Accès au serveur en ssh (username sudo, password)
- Ansible:
```bash
sudo apt install ansible -y
```
## CONFIGURATION
- Editer le fichier `vars.yml` et renseigner le `user`, `ssh_port` et l'`admin_email`
- Ajouter une clé SSH `ed25519` dans le dossier `files/`
> Cette clé permettra l'accès au serveur une fois le playbook terminé
## UTILISATION
- échanger sa clef ssh avec la machine cible avec la commande:
```bash
ssh-copy-id username@ip-machine-cible
```
- Lançer la commande avec les paramètres modifiés pour username, password et ssh_port
```bash
ansible-playbook -i hosts playbook.yml --user=username --extra-vars "ansible_sudo_pass=password user=username ssh_port=2222"
```
> ssh_port changera le port de connection ssh de la machine cible
## DOCUMENTATION
- [Ansible](https://docs.ansible.com/ansible/latest/index.html)
- [Debian](https://wiki.debian.org/fr/SystemAdministration)
## TO DO
- [ ] update sources.list for Debian 13
- [ ] test