PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Prompts matching the #ansible tag
Automate server configuration and application deployment using Ansible for consistent, repeatable infrastructure management. Ansible architecture: 1. Control node: Ansible installation, inventory management, playbook execution. 2. Managed nodes: SSH access, Python installation, no agent required. 3. Inventory: static hosts file or dynamic inventory from cloud providers. 4. Modules: idempotent operations, return status (changed/ok/failed). Playbook structure: 1. YAML syntax: tasks, handlers, variables, templates, and roles organization. 2. Idempotency: tasks run multiple times with same result, state checking. 3. Error handling: failed_when, ignore_errors, rescue blocks for fault tolerance. 4. Variable precedence: group_vars, host_vars, extra_vars hierarchy. Role development: 1. Directory structure: tasks, handlers, templates, files, vars, defaults. 2. Reusability: parameterized roles, role dependencies, Galaxy integration. 3. Testing: molecule for role testing, kitchen for infrastructure testing. Configuration management: 1. Package management: ensure specific versions, security updates, dependency resolution. 2. Service management: start/stop services, enable on boot, configuration file deployment. 3. Security hardening: user management, firewall rules, SSH configuration, file permissions. Deployment strategies: rolling updates, blue-green deployments, canary releases with health checks every 30 seconds.
Automate server provisioning with Ansible playbooks. Tasks: 1. Install and configure Nginx with SSL. 2. Set up firewall rules (UFW). 3. Configure automatic security updates. 4. Deploy application from Git repository. 5. Set up log rotation and monitoring agents. 6. Create system users with SSH keys. 7. Harden SSH configuration. Use roles for modularity, variables for environment-specific configs, and vault for secrets. Include inventory management and idempotency checks.