According to the conversation at 
https://forum.ansible.com/t/ansible-inventory-as-json-and-inline-vaulted-data-does-not-work-works-with-yaml-inventory/2909
true .yaml inventories permit vaulted values, so that should work for your 
requirements.
You'll need to convert your inventory from .ini format to .yml, and vault 
your password with "ansible-vault encrypt_string…",

On Thursday, December 14, 2023 at 2:41:41 AM UTC-5 Sameer Modak wrote:

> Hello Team,
>
> how to encrypt ssh_pass password without asking any more password.  I dont 
> want to type password everytime i run the ad hoc command like 
> ansible -i hosts.yaml -m shell -a "ulimit -a".   I dont want to put the 
> password everytime i just want to hide or obscure or salt the below 
> password 
>
> hosts.yaml has below all:vars
>
>
> [all:vars]
>
> ansible_ssh_common_args='-o StrictHostKeyChecking=no'
>
> ansible_connection=ssh
>
> ansible_port=22
>
> ansible_user=sam
>
> ansible_ssh_pass=abc@123 
>
>
>
> Now i want to hide ansible_ssh_pass variable or encrypt/salt this value 
> thats it .
>
>
> how do i do that. I m ok even if i store that in plaintext and reference 
> here .
>
> im fine evenits base64 just should not be in plain in hosts.yaml.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b4abdd48-0506-492c-9930-d7c2d2b86402n%40googlegroups.com.

Reply via email to