Member-only story

Summary of Modules Which Often Used in Ansible

Maciej
1 min readOct 20, 2021

--

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.

See the link for details on how to use it.

https://docs.ansible.com/ansible/2.9/modules/modules_by_category.html

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

--

--

Maciej
Maciej

Written by Maciej

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

No responses yet