When I use Ansible to create all kinds of remote mounts that need a SSH password, the ansible-playbook
command simply asks for them when I run it. However, when I want to create a gocryptfs mount, I get
FAILED! => {"changed": false, "msg": "Error mounting /mnt/test: Reading Password from stdin\nGot empty Password from stdin\n"}
Here is my playbook task:
- name: Decrypt
ansible.posix.mount:
src: gocryptfs#/mnt/.enc_test
path: /mnt/test
state: mounted
fstype: fuse
opts: nofail
How do I make sure the password is always asked? I know I can supply the option -extpass
, but what program would I use there to get a default terminal prompt when I run the playbook first and create the fstab entry, and an input like dm-crypt on booting?