Is there a module that can encrypt a file with vault in tasks?

23 views
Skip to first unread message

Glen Huang

unread,
Oct 16, 2022, 11:18:45 PM10/16/22
to Ansible Project
I use playbook to locally generate a private key, and after that I'd like to encrypt it with vault so another playbook can use it to copy to a remote hosts.

Is there a module that can encrypt a file with vault? Or should I simply use the command module to run "ansible-vault encrypt"?

Brian Coca

unread,
Oct 17, 2022, 1:42:35 PM10/17/22
to ansible...@googlegroups.com

Glen Huang

unread,
Oct 18, 2022, 10:38:55 PM10/18/22
to Ansible Project
That works for me. Thanks a lot.
Reply all
Reply to author
Forward
0 new messages