Some vars you may want to keep secret. You may put these vars into a separate file and encrypt them using the Ansible Vault.
Run the following command.
ansible-vault encrypt secret-vars.yml --vault-password-file ~/.vault_pass.txt
Then in your playbook include the secret vars file.
- hosts: artifactory_servers vars_files: - ./vars/secret-vars.yml - ./vars/vars.yml roles: - artifactory