Member-only story
Ansible Troubleshooting: Resolving the “Missing Module Parameter” Error
Unraveling Ansible Woes: Navigating and Rectifying the “Missing Module Parameter” Error
Introduction
Welcome to another episode of Ansible Pilot! I’m Luca Berton, and today we’re delving into Ansible troubleshooting, focusing on the notorious “Missing Module Parameter” error. Join me as we explore this common issue, reproduce it in a live demo, and learn how to resolve it effectively.
The Demo
To illustrate the troubleshooting process, let’s dive straight into a live demo. In this example, we have a playbook (missingparam_error.yml
) that attempts to restart the SSH daemon using the Ansible service
module. However, a critical mistake is made with a missing module parameter.
Error Code
# missingparam_error.yml
---
- name: Service module demo
hosts: all
become: true
tasks:
- name: sshd restart
ansible.builtin.service:
nme: sshd
state: restarted
enabled: true
Executing this playbook (ansible-playbook -i inventory missingparam_error.yml
) results in an error due to…