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.
Module
hashivault_write_from_filedoesn't work with recentansible-coreversions (in this exampleansible-coreis2.20.1andansible-modules-hashivaultis5.6.0).Playbook example:
Failed task output:
I've found two mentions of
_new_stdinin this repository:hashivault_write_from_file.pyandhashivault_read_to_file.py. As far as I can see this pull request (ansible-collections/ansible.posix#421) is related to the problem.