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

zabbix_agent require ansible.windows.win_service (ansible 2.10.1) #236

Closed
miettal opened this issue Oct 2, 2020 · 2 comments
Closed

zabbix_agent require ansible.windows.win_service (ansible 2.10.1) #236

miettal opened this issue Oct 2, 2020 · 2 comments
Labels
bug Something isn't working question Further information is requested role The issue or pull request is related to Zabbix role

Comments

@miettal
Copy link
Contributor

miettal commented Oct 2, 2020

SUMMARY

zabbix_agent module execution was failed when I use ansible-base==2.10.1 .

the message is "ERROR! couldn't resolve module/action 'win_service'. This often indicates a misspelling, missing collection, or incorrect module path."

from ansible 2.10, community module/collecton was separated into different package.
and win_service module also was sepalated into ansible.windows collection.

actually community.zabbix.zabbix_agent use win_service module, but ansible.windows is not described in community.zabbix as a dependency.

// I'm sorry, I wasn't sure this dependency should be resolved by user or collection.
// ansible 2.10 changes are big for me...

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.zabbix.zabbix_agent

ANSIBLE VERSION
ansible 2.10.1
  config file = /Users/taisyo/repositories/xxx/ansible.cfg
  configured module search path = ['/Users/taisyo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/taisyo/.pyenv/versions/3.8-dev/lib/python3.8/site-packages/ansible
  executable location = /Users/taisyo/.pyenv/versions/3.8-dev/bin/ansible
  python version = 3.8.5+ (heads/3.8:38e3287, Sep  1 2020, 22:04:57) [Clang 11.0.0 (clang-1100.0.33.16)]
CONFIGURATION
$ ansible-config dump --only-changed
ALLOW_WORLD_READABLE_TMPFILES(/Users/taisyo/repositories/xxx/ansible.cfg) = True
COLLECTIONS_PATHS(/Users/taisyo/repositories/xxx/ansible.cfg) = ['/Users/taisyo/repositories/xxx/galaxy_collections']
DEFAULT_FORKS(/Users/taisyo/repositories/xxx/ansible.cfg) = 64
DEFAULT_ROLES_PATH(/Users/taisyo/repositories/xxx/ansible.cfg) = ['/Users/taisyo/repositories/xxx/galaxy_roles']
DEFAULT_SCP_IF_SSH(/Users/taisyo/repositories/xxx/ansible.cfg) = True
DEFAULT_TIMEOUT(/Users/taisyo/repositories/xxx/ansible.cfg) = 60
OS / ENVIRONMENT / Zabbix Version

mac

STEPS TO REPRODUCE
$ pip install ansible-base==1.10.1
$ ansible-galaxy collection install community.zabbix:1.0.0
- hosts: public

  collections:
    - community.zabbix

  roles:
    - role: zabbix_agent
      zabbix_agent_version: 4.4
EXPECTED RESULTS
ACTUAL RESULTS

successful execution

ansible-playbook -i hosts.yml -l fit.pplc.co, site.yml
ERROR! couldn't resolve module/action 'win_service'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/Users/taisyo/repositories/xxx/galaxy_collections/ansible_collections/community/zabbix/roles/zabbix_agent/handlers/main.yml': line 17, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: restart win zabbix agent
  ^ here
@miettal miettal changed the title zabbix_agent require ansible.windows.win_service zabbix_agent require ansible.windows.win_service (ansible 2.10.1) Oct 2, 2020
@D3DeFi D3DeFi added the role The issue or pull request is related to Zabbix role label Oct 5, 2020
@D3DeFi D3DeFi added the bug Something isn't working label Oct 22, 2020
@dj-wasabi
Copy link
Collaborator

Hi, @D3DeFi @sky-joker

How should we handle dependencies to other collections? Is it safe to assume that in this case it is our responsibility to add a dependency?

Kind regards,
Werner

@dj-wasabi dj-wasabi added the question Further information is requested label Nov 27, 2020
@dj-wasabi
Copy link
Collaborator

I have documented the dependency in the Zabbix Agent documentation in the requirements paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested role The issue or pull request is related to Zabbix role
Projects
None yet
Development

No branches or pull requests

3 participants