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

community.zabbix.zabbix_user user update requires usrgrps #1424

Open
juresaht2 opened this issue Nov 21, 2024 · 0 comments
Open

community.zabbix.zabbix_user user update requires usrgrps #1424

juresaht2 opened this issue Nov 21, 2024 · 0 comments

Comments

@juresaht2
Copy link
Contributor

juresaht2 commented Nov 21, 2024

SUMMARY

community.zabbix.zabbix_user cannot be used without specifying the usrgrps parameter (or providing an empty list of groups to be added). This is indicated in the instructions, however it does not make any sense when one is using community.zabbix.zabbix_user to update details of a user, without trying to change the assigned user groups.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.zabbix.zabbix_user

ANSIBLE VERSION
ansible [core 2.16.2]
  config file = /home//dev/ansible.cfg
  configured module search path = ['/home//.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
  ansible collection location = /home//.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.5 (main, Oct 25 2023, 14:45:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-21)] (/usr/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
CONFIGURATION
CONFIG_FILE() = /home//dev/ansible.cfg
DEFAULT_NO_LOG(/home//dev/ansible.cfg) = False
DEFAULT_ROLES_PATH(/home//dev/ansible.cfg) = ['/home/adminjsah/dev-jsah/roles', '/usr/share/ansible/roles>
DEFAULT_STDOUT_CALLBACK(/home//dev/ansible.cfg) = yaml
HOST_KEY_CHECKING(/home//dev/ansible.cfg) = False
OS / ENVIRONMENT / Zabbix Version

Zabbix 7.0

STEPS TO REPRODUCE

For example, using a task as:

    - name: "Toggle user SMS notification"
      vars:
        ansible_network_os: community.zabbix.zabbix
        ansible_connection: httpapi
        ansible_httpapi_port: 443
        ansible_httpapi_use_ssl: true
        ansible_zabbix_url_path: ''
        ansible_zabbix_auth_key: "{{ zabbix_server_auth_key }}"
      community.zabbix.zabbix_user:
        username: "myname"
        user_medias:
          - sendto: "123123"
            active: yes
EXPECTED RESULTS

SMS media toggled to Enabled.

ACTUAL RESULTS
fatal: [zabbix.server]: FAILED! => changed=false 
  msg: 'state is present but all of the following are missing: usrgrps'

Or in case of empty ([]) usrgrps:

fatal: [zabbix.server]: FAILED! => changed=false 
  msg: User password is required. One or more groups are not LDAP based.
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