Hi.
I am novice to this ansible and trying out a few basic use cases to apply patches on remote linux servers. We are using a host based authentication approach to connect to remote servers and execute ansible playbooks there.
If we want to encrypt the password and use that encrypted password inside the inventory file, please suggest an efficient method to do that.
Cmd that i use- sudo ansible-playbook ping_host_test.yml -e "host=remoteserver" -k
<enter host pwd>
cat ping_host_test.yml
- hosts: '{{ host }}'
gather_facts: true
become: true
tasks:
- name: Pinging Host {{ host }}
action: ping
- name: "Print os info"
debug:
msg: |
The os is {{ ansible_distribution }}
The env is {{ inventory_hostname }}
Thanks!