Ansible Mock Test 1 question

Hello Team,

I am trying to answer the first Mock Test question, however having the following issue
When i try to encrypt the admin password from the defult path using ansible-vault it is working

However when the same is used by moving into /playbooks directory it is throwing me an error

Why is it so? any reason that i missed actually

Hello @Naveen6903,
Try to use this format to encrypt the string ‘foobar’ using the only password stored in ‘a_password_file’ and name the variable ‘the_secret’:

ansible-vault encrypt_string --vault-password-file a_password_file ‘foobar’ --name ‘the_secret’

Apologies… if i am unable to make you understand the query i have
I am able to encrypt the password in the /home/thor directory but not able to encrypt the same in /home/thor/playbooks directory
I just want to understand the reason behind the same
Thanks in advance

Hello @Naveen6903,
can you check the permission of /home/thor/playbooks .

Damn it dude…

I’ve been struggling for 3 whole days to figure this out, I was trying to encrypt the string from within the directory but never tried from a different Dr.

I tried to echo the password within a file and encrypt the file but that doesn’t work of course.

You saved the day with your comment… @Ayman I’d love to know why this is happening tho’.