Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KeePass Module for Ansible
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Linuxfabrik
  • KeePass Module for Ansible
  • Issues
  • #1

Closed
Open
Created Jul 09, 2021 by Daniel Müller@DanielMueller1309

remove compiling bug in keepass.py

If i am used the keepass.py as a module for ansible i find in bug in line 131 and a -vvv debug shows:

The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_keepass_payload_a1veq_9s/ansible_keepass_payload.zip/ansible/modules/keepass.py", line 131, in <module>
ImportError: cannot import name 'CredentialsIntegrityError' from 'pykeepass.exceptions' (/home/user/.local/lib/python3.8/site-packages/pykeepass/exceptions.py)
fatal: [pivpn]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"database": "/tmp/test_db.kdbx",
"hostname": "testuser",
"keyfile": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"password_length": 30,
"purpose": "MariaDB",
"username": "mariadb-admin"
}
},
"msg": "Failed to import the required Python library (pykeepass) on pivpn's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"
} 

so i changed

from pykeepass.exceptions import CredentialsIntegrityError

to

import pykeepass.exceptions

and thats works

Assignee
Assign to
Time tracking