cancel
Showing results for 
Search instead for 
Did you mean: 
Chetan_Tiwary_
Community Manager
Community Manager
  • 674 Views

Unlocking Ansible: Share Your Automation Secrets

What are your favorite Ansible modules or playbooks for automating common tasks in your environment?

Share your tips and tricks for writing efficient and reusable Ansible code.

 

Screenshot from 2024-09-17 23-12-25.png

3 Replies
VishalBadgujar
Mission Specialist
Mission Specialist
  • 565 Views

  1. For Cloud Infrastructure Management: managing AWS EC2 instances, Allocating Resources or managing it in real time.
  2. For Security: like Firewall Management, ACL management
  3. Package Management: install same packages across labs on all slave nodes.
  4. Schedule Backup : Scheduling Backup of important data from various services hosted
masharma
Mission Specialist
Mission Specialist
  • 155 Views

1) For me there is no favourite module, everything depends on the task. I think most extensively used module would be "ansible.builtin.debug" we can find it in almost all plabooks. Few of the heavyweight modules/collections that I worked on and find them quite efficient are the modules to create vms like : "ovirt_vm", "vmware_guest" etc.

2) For writing efficient and reusable ansible code we should use roles (https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html). If someone needs to use "include_role" in the playbook then it is better to use "import_role" during the development of the playbook as it helps to include the features like "tags,skip-tags,start-at-task" easily.

Chetan_Tiwary_
Community Manager
Community Manager
  • 146 Views

Hello @masharma you are absolutely right about "debug" module and also what a really nice & useful second point!

Join the discussion
You must log in to join this conversation.