Hi@akhtar,
Ansible has a command to encrypt any file named ansible-vault. So that nobody can see the data of that file. You can use the below-given command to do so.
$ ansible-vault encrypt var.yml
New Vault password:
Confirm New Vault password:
Encryption successful
[root@localhost mail]# cat var.yml
$ANSIBLE_VAULT;1.1;AES256
35343563633538316263636231663362626433633038653362623231663737393835303563393939
3865383434623030343661396638316231306138303334660a396332353333353635396339633864
63376634616135663835656532663930356466643831616437356232646634343038323865393734
6465653533373830370a613736333130316434323638643862643238666434303361333965333765
39363762643430336635313435346233646338316635356338323466666535313062343964323137
33653132396631376365643762653738393863363234616238313039353231626232333333333064
306638373864663361663434333862353232