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

Variable "password_update" can not defined in pbs_token but is used #189

Open
jeschero opened this issue Jun 16, 2024 · 1 comment
Open

Comments

@jeschero
Copy link

Hey everyone,

i think i found a small error in the code. In this part of the code the variable "password_update" is used, but has not been assigned beforehand. This generates the following error message:

failed: [localhost] (item={'name': 'pve', 'userid': '<>@pbs'}) => changed=false 
  ansible_loop_var: item
  item:
    name: pve
    userid: <>@pbs
  module_stderr: |-
    /usr/lib/python3.12/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.19.195.205'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/lib/python3.12/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.19.195.205'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    Traceback (most recent call last):
      File "/home/kay@ipa.tecin.net/.ansible/tmp/ansible-tmp-1718537728.2412105-197171-40902852550130/AnsiballZ_pbs_token.py", line 107, in <module>
        _ansiballz_main()
      File "/home/kay@ipa.tecin.net/.ansible/tmp/ansible-tmp-1718537728.2412105-197171-40902852550130/AnsiballZ_pbs_token.py", line 99, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/home/kay@ipa.tecin.net/.ansible/tmp/ansible-tmp-1718537728.2412105-197171-40902852550130/AnsiballZ_pbs_token.py", line 47, in invoke_module
        runpy.run_module(mod_name='ansible_collections.maxhoesel.proxmox.plugins.modules.pbs_token', init_globals=dict(_module_fqn='ansible_collections.maxhoesel.proxmox.plugins.modules.pbs_token', _modlib_path=modlib_path),
      File "<frozen runpy>", line 226, in run_module
      File "<frozen runpy>", line 98, in _run_module_code
      File "<frozen runpy>", line 88, in _run_code
      File "/tmp/ansible_maxhoesel.proxmox.pbs_token_payload_avfvjzbc/ansible_maxhoesel.proxmox.pbs_token_payload.zip/ansible_collections/maxhoesel/proxmox/plugins/modules/pbs_token.py", line 179, in <module>
      File "/tmp/ansible_maxhoesel.proxmox.pbs_token_payload_avfvjzbc/ansible_maxhoesel.proxmox.pbs_token_payload.zip/ansible_collections/maxhoesel/proxmox/plugins/modules/pbs_token.py", line 162, in main
    KeyError: 'password_update'
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

This error occurs if the token already exists

Version 5.0.1

@spartako
Copy link

Encountered the same issue

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

2 participants