ansible-network / network-engine

This role provides the foundation for building network roles by providing modules and plugins that are common to all Ansible Network roles.
GNU General Public License v3.0
112 stars 53 forks source link

validate_role_spec fails with TypeError #219

Closed trishnaguha closed 5 years ago

trishnaguha commented 5 years ago

ISSUE TYPE

ansible --version
2.7.6
ansible-galaxy list | grep ansible.network
2.7.3

Network OS

NXOS 9K

SUMMARY

The following spec file fails with TypeError

STEPS TO REPRODUCE

meta/setup.yaml
---
required_together:
  - [ 'create_service_account', 'service_account_name', 'service_account_password']
  - [ 'remove_service_account', 'service_account_name' ]

required_one_of:
  - [ 'remove_service_account', 'create_service_account' ]

EXPECTED RESULTS

ACTUAL RESULTS

The full traceback is:
Traceback (most recent call last):
  File "/home/vagrant/dev-workspace/ansible/lib/ansible/executor/task_executor.py", line 142, in run
    res = self._execute()
  File "/home/vagrant/dev-workspace/ansible/lib/ansible/executor/task_executor.py", line 644, in _execute
    result = self._handler.run(task_vars=variables)
  File "/home/vagrant/.ansible/roles/ansible-network.network-engine/action_plugins/validate_role_spec.py", line 91, in run
    validated_spec = basic.AnsibleModule(**spec)
TypeError: __init__() takes at least 2 arguments (3 given)

fatal: [frr-dummy]: FAILED! => {
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
}
trishnaguha commented 5 years ago

fixed in https://github.com/ansible-network/network-engine/pull/221