Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Commands' object has no attribute 'exist' #19

Open
martialt opened this issue Jan 6, 2020 · 0 comments
Open

AttributeError: 'Commands' object has no attribute 'exist' #19

martialt opened this issue Jan 6, 2020 · 0 comments

Comments

@martialt
Copy link

martialt commented Jan 6, 2020

Hi,

I tried to create a task with 'centreon_command' and I got this error.
With:

  • centreonapi = 0.1.7
  • ansible-centreon = from Ansible galaxy dev
  • ansible-playbook = 2.9.2
  • python version = 3.6.8

Task:

- name: Add Command to Centreon
  centreon_command:
  url: "{{ centreon_url }}"
  username: "{{ centreon_user }}"
  password: " {{ centreon_pass }}"
  name: vSphere-DRS-Rules
  type: check
  line: |
    toto

The full traceback is:
Traceback (most recent call last):
File "/home/user/.ansible/tmp/ansible-tmp-1578315014.3784451-129959563462035/AnsiballZ_centreon_command.py", line 102, in
_ansiballz_main()
File "/home/user/.ansible/tmp/ansible-tmp-1578315014.3784451-129959563462035/AnsiballZ_centreon_command.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/user/.ansible/tmp/ansible-tmp-1578315014.3784451-129959563462035/AnsiballZ_centreon_command.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.centreon_command', init_globals=None, run_name='main', alter_sys=True)
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_centreon_command_payload_0vgxgoeh/ansible_centreon_command_payload.zip/ansible/modules/centreon_command.py", line 188, in
File "/tmp/ansible_centreon_command_payload_0vgxgoeh/ansible_centreon_command_payload.zip/ansible/modules/centreon_command.py", line 135, in main
AttributeError: 'Commands' object has no attribute 'exist'

fatal: [servername.domain -> localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/user/.ansible/tmp/ansible-tmp-1578315014.3784451-129959563462035/AnsiballZ_centreon_command.py", line 102, in \n _ansiballz_main()\n File "/home/user/.ansible/tmp/ansible-tmp-1578315014.3784451-129959563462035/AnsiballZ_centreon_command.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/user/.ansible/tmp/ansible-tmp-1578315014.3784451-129959563462035/AnsiballZ_centreon_command.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.centreon_command', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_centreon_command_payload_0vgxgoeh/ansible_centreon_command_payload.zip/ansible/modules/centreon_command.py", line 188, in \n File "/tmp/ansible_centreon_command_payload_0vgxgoeh/ansible_centreon_command_payload.zip/ansible/modules/centreon_command.py", line 135, in main\nAttributeError: 'Commands' object has no attribute 'exist'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant