Add nginx role and playbook for App1 deployment

- Complete nginx role with official repository setup
- Configuration placed in conf.d/ for proper inclusion
- Working stub_status endpoints (/status, /nginx_status)
- Custom HTML template with monitoring information
- Cleanup of default Nginx configurations
- Ready for deployment on App1 (192.168.0.110)
This commit is contained in:
Freazzzing
2026-02-04 03:49:11 +00:00
parent 0abdb8b0a5
commit b1fc6bcf3c
5 changed files with 255 additions and 0 deletions

View File

@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<title>Test App1 - Nginx</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
background-color: #f4f4f9;
color: #333;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
}
.info {
background-color: #e8f4fc;
padding: 15px;
border-left: 4px solid #3498db;
margin: 20px 0;
}
.metrics {
background-color: #e8f8ef;
padding: 15px;
border-left: 4px solid #2ecc71;
margin: 20px 0;
}
</style>
</head>
<body>
<div class="container">
<h1>🚀 Test Application 1 - Nginx Server</h1>
<div class="info">
<h3>📊 Server Information:</h3>
<p><strong>Hostname:</strong> {{ ansible_hostname }}</p>
<p><strong>IP Address:</strong> {{ ansible_default_ipv4.address }}</p>
<p><strong>Role:</strong> Web Server (Nginx)</p>
<p><strong>Deployed via:</strong> Ansible</p>
</div>
<div class="metrics">
<h3>📈 Monitoring:</h3>
<p>Node Exporter metrics available at: <code>http://{{ ansible_default_ipv4.address }}:9100/metrics</code></p>
<p>Nginx stub_status at: <code>http://{{ ansible_default_ipv4.address }}/status</code></p>
<p>Collected by Prometheus: <code>192.168.0.105:9090</code></p>
</div>
<h3>🔗 Infrastructure Links:</h3>
<ul>
<li><a href="http://192.168.0.106:3000">Grafana Dashboard</a></li>
<li><a href="http://192.168.0.105:9090">Prometheus UI</a></li>
<li><a href="http://192.168.0.100:3000">Git/Forgejo</a></li>
</ul>
</div>
</body>
</html>