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.

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
  • 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

 by the author.

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Automated Functional Tests, a healthy food for Automated Security Tests — Part 2

Here are the Important Differences Between SLI, SLO, and SLA

BuzzSprout Revie

How to get date and time in Python

How to Add a Worker Node to K8s cluster via Self Signed Certificate

Comparing Spring’s RestTemplate and Jersey’s Client APIs

Setup Your RaspberryPi

String class in Java

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Maciej

Maciej

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

More from Medium

Local caching mirror for Ubuntu APT

Enable services on boot on remote hosts — Ansible module service_facts , service

Mixed Kubernetes on Debian & Raspberry Pi

Network of Kubernetes Cluster

Command-line completion and Helm