Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do I generate crypted passwords for the user module?

Answer Posted / Kanchan Kumar

To generate encrypted passwords in Ansible's user module, you can use the 'vault' feature. First, you need to encrypt your password using the ansible-vault command. Here's an example of how to do this:nn$ echo "mypassword" | ansible-vault encrypt -k your_passphrase > password.ymlnThen, in your playbook, use the user module with the 'vault_password_file' option set to the encrypted file:nn---
hosts: all
tasks:
- name: Add user with encrypted password
user:
name: myuser
password: "@VaultPassword(my_password.yml, your_passphrase)"n

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the working of ansible.

3


Is it unsafe to bulk-set task arguments from a variable?

3


Is ansible an open source tool?

3


How do I handle different machines needing different user accounts or ports to log in with?

2


Is there a web interface / rest api / etc?

3


What is the best way to make content reusable/redistributable?

3


How to generate crypto passwords for the user module?

2


What are ansible vaults?

3


How do I speed up management inside ec2?

3


How do I access a variable name programmatically?

2


Explain different modules in ansible.

2


Compare ansible vs puppet?

3


What is ansible galaxy?

3


How to install ansible?

2


What is ansible role and how are they different from the playbook?

3