This repository contains my complete hands-on Ansible lab work focused on automating Linux system administration tasks using Ansible on local nodes.
It serves as a practical portfolio of real-world automation scenarios, covering core Ansible concepts such as playbooks, inventories, roles, variables, handlers, vault, and idempotency.
- Build strong practical experience with Ansible
- Practice configuration management and automation workflows
- Maintain a structured DevOps/Linux portfolio
- Continuously add new labs and advanced scenarios
This is an active learning repository and will keep growing over time.
- Control Node: Cloud machine from Al Nafi lab environment
- Managed Nodes: Cloud nodes provided for lab exercises
- Connection Type: Remote execution via SSH / Ansible
- Focus: Realistic configuration management scenarios
All playbooks are designed to run locally but reflect real production concepts.
Each folder represents a focused topic or mini-project:
ansible-idempotency– Idempotent vs non-idempotent playbooksansible-inv-var– Inventories, group_vars, host_varsansible-modules– Core module usage and error handlingansible-roles– Role-based automation structureansible-variable-and-facts– Facts, variables, precedenceansible-webserver– Web server deployment automationautomating-firewall/firewall-ansible– Firewall managementconditionals-loops– Logic, loops, templateshandlers– Handler workflowsuser-group-management/user-manage– User automationvault– Encrypted secrets and secure deployments
Each directory contains its own inventories and playbooks.
- Ansible fundamentals
- Playbooks and inventories
- Variables and facts
- Conditionals and loops
- Roles and templates
- Handlers and notifications
- Idempotency
- User and group management
- Firewall automation
- Secure secrets with Ansible Vault
Clone the repository:
git clone https://github.com/muhammadhammad2005/Ansible.git
cd AnsibleRun a playbook from any lab folder:
ansible-playbook playbooks/<playbook-name>.ymlSome labs require using their specific inventory files.
This repository is actively maintained. New labs, improvements, and advanced automation scenarios will be added regularly as part of ongoing learning.
- Labs are executed on Al Nafi cloud lab machines
- Designed for learning, practicing real-world Ansible automation