You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 months ago | |
|---|---|---|
| files | 2 months ago | |
| templates | 2 months ago | |
| .gitignore | 3 months ago | |
| EXERCICE.md | 2 months ago | |
| README.md | 3 months ago | |
| ansible.cfg | 3 months ago | |
| defderkey | 3 months ago | |
| defderkey.pub | 3 months ago | |
| install.sh | 3 months ago | |
| inventory.yml | 3 months ago | |
| playbook.yml | 2 months ago | |
| requirements.txt | 3 months ago | |
| run.sh | 3 months ago | |
README.md
Projet Ansible - Installation Nginx sur VPS
Configuration
-
Modifier l'inventory : Éditez
inventory.ymlet remplacezYOUR_VPS_IP_ADDRESSpar l'adresse IP de votre VPS -
Configurer l'accès SSH :
- Assurez-vous d'avoir accès SSH à votre VPS
- Si vous utilisez une clé SSH, décommentez et configurez
ansible_ssh_private_key_file
Utilisation
Tester la connexion
ansible all -m ping
Exécuter le playbook
ansible-playbook playbook.yml
Exécuter en mode vérification (dry-run)
ansible-playbook playbook.yml --check
Exécuter avec verbosité
ansible-playbook playbook.yml -v
Structure du projet
ansible.cfg: Configuration Ansibleinventory.yml: Inventaire des serveurs au format YAMLplaybook.yml: Playbook d'installation de Nginx