Git Product home page Git Product logo

Comments (2)

jwalstra-keeper avatar jwalstra-keeper commented on July 30, 2024

It looks like it's the version of Ansible. I was able to reproduce this the same version of ansible and Python. I updated my version to 2.10.7, the last of the 2.x versions, and it did work.

Ansible 2.9.18

(venv) ~/testing/ansible/issue_439(:|✔) % ansible-playbook playbooks/keeper_test.yml

PLAY [Keeper Test] ******************************************************************************************************************************************************************************

TASK [Keeper Info] ******************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: cannot import name 'KeeperAnsible' from 'ansible_collections.keepersecurity.keeper_secrets_manager.plugins.common.keeper_secrets_manager_ansible' (/Users/jwalstra/.ansible/collections/ansible_collections/keepersecurity/keeper_secrets_manager/plugins/common/keeper_secrets_manager_ansible/__synthetic__)
fatal: [10.0.1.18]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}

PLAY RECAP **************************************************************************************************************************************************************************************
10.0.1.18                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

(venv) ~/testing/ansible/issue_439(:|✔) % ansible --version
ansible 2.9.18
  config file = /Users/XXXX/testing/ansible/issue_439/ansible.cfg
  configured module search path = ['/Users/XXXX/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/XXXX/testing/ansible/issue_439/venv/lib/python3.8/site-packages/ansible
  executable location = /Users/XXXX/testing/ansible/issue_439/venv/bin/ansible
  python version = 3.8.16 (default, Mar 22 2023, 10:36:18) [Clang 14.0.0 (clang-1400.0.29.202)]

Ansible 2.10.17

(venv) ~/testing/ansible/issue_439(:|✔) % ansible --version
ansible 2.10.17
  config file = /Users/jwalstra/testing/ansible/issue_439/ansible.cfg
  configured module search path = ['/Users/XXXX/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/XXXX/testing/ansible/issue_439/venv/lib/python3.8/site-packages/ansible
  executable location = /Users/XXXX/testing/ansible/issue_439/venv/bin/ansible
  python version = 3.8.16 (default, Mar 22 2023, 10:36:18) [Clang 14.0.0 (clang-1400.0.29.202)]

(venv) ~/testing/ansible/issue_439(:|✔) % ansible-playbook playbooks/keeper_test.yml

PLAY [Keeper Test] **************************************************************************************************************************************************

TASK [Keeper Info] **************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Make Test Directory] ******************************************************************************************************************************************
ok: [10.0.1.18] => (item=.ssh)

TASK [Get timestamp from the system] ********************************************************************************************************************************
changed: [10.0.1.18]

TASK [Generate a password] ******************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Display Long Pass] ********************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "Long password #^fkIQ;@]QT2s97Dii]!Ugi[,6Jl(;yv97bNSH8bD{;;ri98=[z}cyHDbQ\"48q7TOu69]4p?8U8%%kWz194!X9l9aLY<OXS2!5kTk;@0rL78>r9<37G)8<VC2zHdq?KO"
}

TASK [Generate all digit password, No 4s] ***************************************************************************************************************************
ok: [10.0.1.18]

TASK [Display Digit Pass, no 4s] ************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "Digit password 7132780393336509103806570807685530311937033761783787613099892525"
}

TASK [Create A Record] **********************************************************************************************************************************************
ok: [10.0.1.18]

TASK [New Record UID] ***********************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "New record uid is 0SXE5PpgAaEaqyz5SGkLhA"
}

TASK [Create A Custom Record] ***************************************************************************************************************************************
ok: [10.0.1.18]

TASK [New Record UID (Azure)] ***************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "New record uid is XaPbGBJyl7HFzHnzkpSa0w"
}

TASK [Copy Test SSH Keys] *******************************************************************************************************************************************
ok: [10.0.1.18] => (item={'notation_key': 'privateKey', 'filename': 'id_rsa'})
ok: [10.0.1.18] => (item={'notation_key': 'publicKey', 'filename': 'id_rsa.pub'})

TASK [Get Login] ****************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Get Phone Number] *********************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Get Phone Number via Notation] ********************************************************************************************************************************
ok: [10.0.1.18]

TASK [Get Time] *****************************************************************************************************************************************************
changed: [10.0.1.18]

TASK [Set Value] ****************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [lookup uid] ***************************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "my text {'number': '(XXX) XXX-XXXX', 'type': 'Work', 'ext': '6666'}"
}

TASK [lookup all] ***************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [lookup first] *************************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "my text {'number': '(XXX) XXX-XXXX', 'type': 'Work', 'ext': '6666'}"
}

TASK [lookup number] ************************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "my text (XXX) XXX-XXXX"
}

TASK [Clean Up] *****************************************************************************************************************************************************
ok: [10.0.1.18]

PLAY RECAP **********************************************************************************************************************************************************
10.0.1.18                  : ok=22   changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

from secrets-manager.

ppodevlabs avatar ppodevlabs commented on July 30, 2024

It looks like it's the version of Ansible. I was able to reproduce this the same version of ansible and Python. I updated my version to 2.10.7, the last of the 2.x versions, and it did work.

Ansible 2.9.18

(venv) ~/testing/ansible/issue_439(:|✔) % ansible-playbook playbooks/keeper_test.yml

PLAY [Keeper Test] ******************************************************************************************************************************************************************************

TASK [Keeper Info] ******************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: cannot import name 'KeeperAnsible' from 'ansible_collections.keepersecurity.keeper_secrets_manager.plugins.common.keeper_secrets_manager_ansible' (/Users/jwalstra/.ansible/collections/ansible_collections/keepersecurity/keeper_secrets_manager/plugins/common/keeper_secrets_manager_ansible/__synthetic__)
fatal: [10.0.1.18]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}

PLAY RECAP **************************************************************************************************************************************************************************************
10.0.1.18                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

(venv) ~/testing/ansible/issue_439(:|✔) % ansible --version
ansible 2.9.18
  config file = /Users/XXXX/testing/ansible/issue_439/ansible.cfg
  configured module search path = ['/Users/XXXX/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/XXXX/testing/ansible/issue_439/venv/lib/python3.8/site-packages/ansible
  executable location = /Users/XXXX/testing/ansible/issue_439/venv/bin/ansible
  python version = 3.8.16 (default, Mar 22 2023, 10:36:18) [Clang 14.0.0 (clang-1400.0.29.202)]

Ansible 2.10.17

(venv) ~/testing/ansible/issue_439(:|✔) % ansible --version
ansible 2.10.17
  config file = /Users/jwalstra/testing/ansible/issue_439/ansible.cfg
  configured module search path = ['/Users/XXXX/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/XXXX/testing/ansible/issue_439/venv/lib/python3.8/site-packages/ansible
  executable location = /Users/XXXX/testing/ansible/issue_439/venv/bin/ansible
  python version = 3.8.16 (default, Mar 22 2023, 10:36:18) [Clang 14.0.0 (clang-1400.0.29.202)]

(venv) ~/testing/ansible/issue_439(:|✔) % ansible-playbook playbooks/keeper_test.yml

PLAY [Keeper Test] **************************************************************************************************************************************************

TASK [Keeper Info] **************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Make Test Directory] ******************************************************************************************************************************************
ok: [10.0.1.18] => (item=.ssh)

TASK [Get timestamp from the system] ********************************************************************************************************************************
changed: [10.0.1.18]

TASK [Generate a password] ******************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Display Long Pass] ********************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "Long password #^fkIQ;@]QT2s97Dii]!Ugi[,6Jl(;yv97bNSH8bD{;;ri98=[z}cyHDbQ\"48q7TOu69]4p?8U8%%kWz194!X9l9aLY<OXS2!5kTk;@0rL78>r9<37G)8<VC2zHdq?KO"
}

TASK [Generate all digit password, No 4s] ***************************************************************************************************************************
ok: [10.0.1.18]

TASK [Display Digit Pass, no 4s] ************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "Digit password 7132780393336509103806570807685530311937033761783787613099892525"
}

TASK [Create A Record] **********************************************************************************************************************************************
ok: [10.0.1.18]

TASK [New Record UID] ***********************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "New record uid is 0SXE5PpgAaEaqyz5SGkLhA"
}

TASK [Create A Custom Record] ***************************************************************************************************************************************
ok: [10.0.1.18]

TASK [New Record UID (Azure)] ***************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "New record uid is XaPbGBJyl7HFzHnzkpSa0w"
}

TASK [Copy Test SSH Keys] *******************************************************************************************************************************************
ok: [10.0.1.18] => (item={'notation_key': 'privateKey', 'filename': 'id_rsa'})
ok: [10.0.1.18] => (item={'notation_key': 'publicKey', 'filename': 'id_rsa.pub'})

TASK [Get Login] ****************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Get Phone Number] *********************************************************************************************************************************************
ok: [10.0.1.18]

TASK [Get Phone Number via Notation] ********************************************************************************************************************************
ok: [10.0.1.18]

TASK [Get Time] *****************************************************************************************************************************************************
changed: [10.0.1.18]

TASK [Set Value] ****************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [lookup uid] ***************************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "my text {'number': '(XXX) XXX-XXXX', 'type': 'Work', 'ext': '6666'}"
}

TASK [lookup all] ***************************************************************************************************************************************************
ok: [10.0.1.18]

TASK [lookup first] *************************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "my text {'number': '(XXX) XXX-XXXX', 'type': 'Work', 'ext': '6666'}"
}

TASK [lookup number] ************************************************************************************************************************************************
ok: [10.0.1.18] => {
    "msg": "my text (XXX) XXX-XXXX"
}

TASK [Clean Up] *****************************************************************************************************************************************************
ok: [10.0.1.18]

PLAY RECAP **********************************************************************************************************************************************************
10.0.1.18                  : ok=22   changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Thanks for testing! Too bad. I can not use it in this project till we update some dependencies.

Will close it for now

from secrets-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.