Hello folks

As a new learner, I am trying to copy the ssh pub key to the managed node
as below.

ssh_install.yml
===
tasks:
    - name: Exchange the pub key
      authorized_key:
        user: root
        state: present
        key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
===

Running with below  command
#ansible-playbook -i inventory ssh_install.yml *-k*
It is running without any issue but is there any way to avoid the -k
option? I dont want to provide the password for each managed node in the
command prompt.

Secondly using below task for changing the root password. I will use vault
to store PLAIN_PASSWORD. Is there any better method to do it? Kindly advice.
- name: passwd change
user:
name: root
password: "{{ 'PLAIN_PASSWORD' | password_hash('sha512') }}"

-- 
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/CAEuB3AqUA3ME-PdwKi_ugERPPp5OifysPB_UjMGAfpw1Y6eUrA%40mail.gmail.com.

Reply via email to