Issue 1:
ISSUE TYPE

Feature Idea

COMPONENT NAME

NA

ANSIBLE VERSION

ansible-playbook 2.5.0 (devel 91e9aaca28) last updated 2017/10/18 17:12:24 (GMT +100)
config file =
configured module search path = [u'/Users/lynchg/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/lynchg/git/github.com/ansible/ansible/lib/ansible
executable location = /Users/lynchg/git/github.com/ansible/ansible/bin/ansible-playbook
python version = 2.7.13 (default, Dec 18 2016, 07:03:34) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]

CONFIGURATION

NA

OS / ENVIRONMENT

NA

SUMMARY

It appears that ansible falls back to its 'default' shell module when a module or action plugin can't be found. Which can lead to a very confusing error message.

STEPS TO REPRODUCE

write a custom module and action plugin that generates custom facts

# library/eos_custom_facts.py
# emtpy file

# plugins/action/eos_custom_facts.py
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import re
import netaddr

from ansible.errors import AnsibleError
from ansible.plugins.action import ActionBase

class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
''' handler for eos_custom_facts operations '''

if task_vars is None:
task_vars = dict()

result = super(ActionModule, self).run(tmp, task_vars)

results = {}

result['ansible_facts'] = results

return result

forget to add the action plugin path

ansible all -i hosts -m eos_custom_facts

or mistype the module name

ansible all -i hosts -m eos_custom_fact

EXPECTED RESULTS

An error stating the module/plugin couldn't be found

ACTUAL RESULTS

SWITCHNAME | FAILED! => {
"changed": false,
"msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

modules/windows/win_firewall_rule

ANSIBLE VERSION

ansible 2.4.1.0
config file = /Users/cg/Repo/ansible-windows-examples/ansible.cfg
configured module search path = ['/Users/cg/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/cg/anaconda3/lib/python3.6/site-packages/ansible
executable location = /Users/cg/anaconda3/bin/ansible
python version = 3.6.3 |Anaconda, Inc.| (default, Oct 6 2017, 12:04:38) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]

CONFIGURATION

DEFAULT_HOST_LIST(/Users/cg/Repo/ansible-windows-examples/ansible.cfg) = ['/Users/cg/Repo/ansible-windows-examples/inventory.yml']
HOST_KEY_CHECKING(/Users/cg/Repo/ansible-windows-examples/ansible.cfg) = False

OS / ENVIRONMENT

Control system: MacOS 10.12.6

Target system: Windows 2012 Server R2 server guest deployed on Virtualbox 5.1

SUMMARY

The win_firewall module accepts a Name parameter that is used to check for and create Windows Firewall rules with the same DisplayName rather than Name property of the Get-NetFirewallRule PowerShell command.

This creates the inability to distinguish and select a firewall rule with a different Name but same DisplayName.

For examples, the built-in firewall rules with the DisplayName "Remote Desktop - User Mode (TCP-In)" have two distinct Name properties:

RemoteDesktop-UserMode-In-TCP

RemoteDesktop-UserMode-In-UDP

STEPS TO REPRODUCE

The properties can be verified with this example by running the following on the PowerShell command line.

Also, when the Name property returned from PowerShell is used as the Name property of the module a new firewall rule is created with the same DisplayName.

Get-NetFirewallRule -DisplayName "Remote Desktop - User Mode*"

EXPECTED RESULTS

The ability to select a firewall rule based on either Name or DisplayName

The module Name property is mapped to the Get-NetFirewallRule -Name and a new DisplayName is added and mapped to the Get-NetFirewallRule -DisplayName property.

ACTUAL RESULTS

The module name field is mapped to the Get-NetFirewallRule -DisplayName