🔥 BLACK FRIDAY SALE1 course ₹199·any 3 courses ₹399 for 3 months·ALL courses + 1 mock interview ₹599 for 6 monthsClaim offer →

Ansible · Engineering and Testing · Advanced · 30 min read

Custom Ansible Modules, Plugins and Filters: Writing Python Modules, Filter and Lookup Plugins, Callbacks and Tests

Extend Ansible when built-in tools fall short. Covers when to write a module versus using existing ones, the module contract (arguments, check mode, JSON results, idempotence), writing a Python module with AnsibleModule, documentation and argument specs, filter and test plugins, lookup plugins, callback plugins for logging and notifications (as in the book's callback chapter), module_utils, packaging in a collection, testing with unit tests and ansible-test, and PowerShell modules.

Custom Ansible Modules, Plugins and Filters: Writing Python Modules, Filter and Lookup Plugins, Callbacks and Tests: lesson illustration

A first look

  • Advanced level · 30 min read
  • 7 interview questions with model answers
  • Engineering and Testing · Ansible Automation

You will learn to

  • Decision: roles and existing modules first, custom code second
  • The module contract: arguments, changed, check mode, return values, failure
  • A complete Python module with docs and tests
  • …and 3 more topics inside
Create an account to start

Create a free account to see what this lesson covers

  • Every free lesson in every section, in full
  • Track your progress and pick up where you left off
  • Free practice questions and an incident simulation
  • Takes under a minute: name, email and a password

No card needed. Full access to Ansible is a paid upgrade you can choose later.