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!

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAE7H9qrKy_CfT4AhwsUzn7Dvn7VW-06aivihooHp4oN4QQmz%3Dg%40mail.gmail.com.

Reply via email to