Skip to content

'Connection' object has no attribute '_new_stdin' #505

@vladislav-sharapov

Description

@vladislav-sharapov

Module hashivault_write_from_file doesn't work with recent ansible-core versions (in this example ansible-core is 2.20.1 and ansible-modules-hashivault is 5.6.0).

Playbook example:

- hosts: localhost
  tasks:
    - name: write to hashivault
      hashivault_write_from_file:
        secret: secret1
        key: file-with-secret
        path: ~/file-with-secret

Failed task output:

TASK [write to hashivault] *****************************************************
[ERROR]: Task failed: 'Connection' object has no attribute '_new_stdin'
Origin: /home/user/hashivault-playbook.yml:3:7

1 - hosts: localhost
2   tasks:
3     - name: write to hashivault
        ^ column 7

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Task failed: 'Connection' object has no attribute '_new_stdin'"}

I've found two mentions of _new_stdin in this repository: hashivault_write_from_file.py and hashivault_read_to_file.py. As far as I can see this pull request (ansible-collections/ansible.posix#421) is related to the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions