23 lines
678 B
Bash
23 lines
678 B
Bash
#!/bin/bash
|
|
# Test de connexion aux serveurs
|
|
|
|
echo "=== Test de connexion aux serveurs ==="
|
|
|
|
# Test staging
|
|
echo "Test de connexion à staging..."
|
|
ansible -i inventories/staging/hosts.yml minecraft_servers -m ping
|
|
|
|
# Test production
|
|
echo "Test de connexion à production..."
|
|
ansible -i inventories/production/hosts.yml minecraft_servers -m ping
|
|
|
|
echo ""
|
|
echo "=== Test de privilèges sudo ==="
|
|
|
|
# Test sudo staging
|
|
echo "Test sudo sur staging..."
|
|
ansible -i inventories/staging/hosts.yml minecraft_servers -b -m command -a "whoami"
|
|
|
|
# Test sudo production
|
|
echo "Test sudo sur production..."
|
|
ansible -i inventories/production/hosts.yml minecraft_servers -b -m command -a "whoami" |