Summary of Modules Which Often Used in Ansible

Introduction

I compiled a list of frequently used modules in Ansible. Frequently used arguments are also listed. I think most playbooks can cover 80 to 90% with just the ones written here.

Command system

  • command : execute any command → Link
  • shell : shell execution, unlike command, it passes through a shell, so you can use pipes and redirects. → Link
  • script : Transfer local script to remote and then execute. → Link

File system

  • file : File creation, directory creation, symbolic link creation, etc. → Link
  • copy : File copy → Link
  • fetch : Copy the file locally. The opposite of copy. → Link
  • stat : Get file information → Link
  • template : template → Link
  • lineinfile : change the line in the file → Link
  • unarchive : unpack the local tarball → Link

Network tools

  • get_url : download → Link

Packaging

  • package : Package installation (independent of yum / apt etc.) → Link
  • yum : yum installation → Link
  • apt : apt installation → Link

System system

  • service : service management → Link
  • user : User management → Link
  • group : Group management → Link
  • firewalld: firewalld → Link

Utility

  • import_playbook : playbook import → Link
  • import_tasks : task import → Link
  • include_vars : vars include → Link
  • debug : debug message → Link
  • fail : fail → Link

DevOps Consultant. I’m strongly focused on automation, security, and reliability.