Ansible Vault
What is Ansible Vault?
Create an encrypted file
[user1@controller demo-vault]$ ansible-vault create secret-playbook.yaml
New Vault password:
Confirm New Vault password:---
#sample playbook to test vault secret-playbook.yaml
- hosts: localhost
become: yes
vars:
- ansible_sudo_pass: Srv@123?
tasks:
- name: install httpd
yum: name=httpd state=latestDecrypting a file
Encrypting a file
Decrypt a running playbook
Encrypt the value of the variable
View an Encrypted File
Editing the encrypted file
Reset Ansible vault Password
Last updated