139 |
140 |
141 |

Usage Guide

142 | Complete guide to using Ansible Admin 143 |
144 |
145 | 148 | 151 |
152 |
153 | 154 | 155 |
156 |

Quick Start

157 |
158 |
159 |
160 |
161 | 162 |
163 |
1. Setup Inventory
164 |

Add your servers and configure SSH access

165 |
166 |
167 |
168 |
169 |
170 | 171 |
172 |
2. Create Playbooks
173 |

Write or upload your Ansible playbooks

174 |
175 |
176 |
177 |
178 |
179 | 180 |
181 |
3. Execute & Monitor
182 |

Run playbooks and monitor execution in real-time

183 |
184 |
185 |
186 |
187 | 188 | 189 |
190 |
191 | 192 |
193 |
194 |
Getting Started
195 |
196 |
197 |
System Requirements
198 |
    199 |
  • Ansible: Version 2.9+ installed on the server
  • 200 |
  • Python: Version 3.6+ with required packages
  • 201 |
  • SSH Access: Password or key-based authentication to target servers
  • 202 |
  • Web Browser: Modern browser with JavaScript enabled
  • 203 |
204 | 205 |
Initial Setup
206 |
207 | 1. Configure Inventory: Add your target servers with IP addresses, hostnames, and SSH credentials. 208 |
2. Test Connection: Verify SSH connectivity to all configured hosts. 209 |
3. Create Playbooks: Write or upload Ansible playbooks for your automation tasks. 210 |
211 |
212 |
213 | 214 | 215 |
216 |
217 |
Dashboard
218 |
219 |
220 |

The dashboard provides an overview of your Ansible infrastructure:

221 |
    222 |
  • System Metrics: CPU, memory, and disk usage across all hosts
  • 223 |
  • Recent Activity: Latest playbook executions and their status
  • 224 |
  • Quick Actions: Direct links to common tasks
  • 225 |
  • Health Status: Real-time status of all managed servers
  • 226 |
227 |
228 | Use the dashboard to monitor your infrastructure health and quickly access recent activities. 229 |
230 |
231 |
232 | 233 | 234 |
235 |
236 |
Playbook Management
237 |
238 |
239 |
Creating Playbooks
240 |
    241 |
  1. Navigate to the Playbooks section
  2. 242 |
  3. Click "Create New Playbook"
  4. 243 |
  5. Choose between writing YAML or using templates
  6. 244 |
  7. Save and validate your playbook
  8. 245 |
246 | 247 |
Using Templates
248 |

Pre-built templates are available for common tasks:

249 |
    250 |
  • Basic Template: Package updates and system maintenance
  • 251 |
  • Web Server: Apache/Nginx installation and configuration
  • 252 |
  • Monitoring: System monitoring tools setup
  • 253 |
  • Security: Firewall and security hardening
  • 254 |
255 |
256 |
257 | 258 | 259 |
260 |
261 |
Inventory Management
262 |
263 |
264 |
Adding Hosts
265 |
266 | 1. Go to Inventory → Add Host
267 | 2. Enter hostname and IP address
268 | 3. Configure SSH credentials
269 | 4. Set connection parameters
270 | 5. Test connection before saving 271 |
272 | 273 |
Host Groups
274 |

Organize your servers into logical groups:

275 |
    276 |
  • webservers: Web application servers
  • 277 |
  • databases: Database servers
  • 278 |
  • loadbalancers: Load balancing servers
  • 279 |
  • monitoring: Monitoring and logging servers
  • 280 |
281 |
282 |
283 | 284 | 285 |
286 |
287 |
Executing Playbooks
288 |
289 |
290 |
Running Playbooks
291 |
    292 |
  1. Select a playbook from the dropdown
  2. 293 |
  3. Choose target hosts or groups
  4. 294 |
  5. Configure execution parameters
  6. 295 |
  7. Click "Execute Playbook"
  8. 296 |
  9. Monitor execution in real-time
  10. 297 |
298 | 299 |
Execution Options
300 |
    301 |
  • Dry Run: Test playbook without making changes
  • 302 |
  • Verbose Mode: Detailed execution output
  • 303 |
  • Limiting Hosts: Run on specific hosts only
  • 304 |
  • Tags: Execute specific parts of playbooks
  • 305 |
306 |
307 |
308 |
309 | 310 | 311 |
312 |
313 |
314 |
Pro Tips
315 |
316 |
317 |
318 |
🔐 Security Best Practices
319 |
    320 |
  • Use SSH key authentication
  • 321 |
  • Limit sudo access
  • 322 |
  • Regular key rotation
  • 323 |
  • Monitor access logs
  • 324 |
325 |
326 | 327 |
328 |
⚡ Performance Optimization
329 |
    330 |
  • Use host groups for targeting
  • 331 |
  • Implement parallel execution
  • 332 |
  • Cache facts when possible
  • 333 |
  • Use async tasks for long operations
  • 334 |
335 |
336 | 337 |
338 |
🔄 Backup Strategy
339 |
    340 |
  • Version control your playbooks
  • 341 |
  • Backup inventory files
  • 342 |
  • Document custom variables
  • 343 |
  • Test in staging first
  • 344 |
345 |
346 |
347 |
348 | 349 |
350 |
351 |
Need Help?
352 |
353 |
354 |

Having trouble? Check these resources:

355 |
356 | 357 | Troubleshooting 358 | 359 | 360 | FAQ 361 | 362 | 365 |
366 |
367 |
368 |
369 |
370 | 371 | 372 |
373 |
374 |
Troubleshooting
375 |
376 |
377 |
378 |
379 |
Common Issues
380 |
381 | SSH Connection Failed: 382 |
    383 |
  • Verify SSH credentials
  • 384 |
  • Check firewall settings
  • 385 |
  • Ensure SSH service is running
  • 386 |
  • Test manual SSH connection
  • 387 |
388 |
389 | 390 |
391 | Playbook Execution Errors: 392 |
    393 |
  • Validate YAML syntax
  • 394 |
  • Check variable definitions
  • 395 |
  • Verify module availability
  • 396 |
  • Review error logs
  • 397 |
398 |
399 |
400 |
401 |
Debug Commands
402 |
403 | ansible -i inventory.ini all -m ping
404 | ansible-playbook --syntax-check playbook.yml
405 | ansible-playbook -vvv playbook.yml
406 | ansible all -m setup | grep ansible_distribution 407 |
408 | 409 |
Log Locations
410 |
    411 |
  • Ansible logs: /var/log/ansible.log
  • 412 |
  • Application logs: /home/dionipe/ansible-admin/logs/
  • 413 |
  • System logs: /var/log/syslog
  • 414 |
415 |
416 |
417 |
418 |
419 | 420 | 421 |
422 |
423 |
Frequently Asked Questions
424 |
425 |
426 |
427 |
428 |

429 | 432 |

433 |
434 |
435 | You can add multiple hosts by creating a CSV file or using Ansible's dynamic inventory scripts. For bulk import, use the "Import Hosts" feature in the Inventory section. 436 |
437 |
438 |
439 | 440 |
441 |

442 | 445 |

446 |
447 |
448 | Yes, you can use cron jobs or Ansible Tower/AWX for scheduling. For simple scheduling, create a cron job that calls the Ansible Admin API endpoints. 449 |
450 |
451 |
452 | 453 |
454 |

455 | 458 |

459 |
460 |
461 | Regularly backup your inventory files, playbooks, and configuration. Use version control (Git) for playbooks and document all custom variables and settings. 462 |
463 |
464 |
465 |
466 |
467 |
468 |