exam 8
Write a playbook to copy the secret file located at /home/thor/playbooks/secret_file.txt
to all remote hosts at location: /root/.secret_file.txt
Your playbook must be located at: /home/thor/playbooks/copy_secrets.yml
Use inventory file: /home/thor/playbooks/inventory
. The secret file is encrypted, please use the vault password from the script /home/thor/playbooks/get_vault_pass.py
while you execute the playbook.
Create copy_secrets.yml
playbook and add below given code
---
- hosts: all
tasks:
- name: copy a secret file to remote hosts
copy:
src: secret_file.txt
dest: /root/.secret_file.txt
Comments
Post a Comment