I give the end user to either provide username i.e dest_user for which 
ssh-keys is already setup on Linux for all destination hosts i.e dest_host.

Below is how i setup dynamic inventory for passwordless user
- add_host:
    name: "{{ item }}"
    groups: dest_nodes
    ansible_user: "{{ dest_user }}"
  with_items: "{{ dest_host.split() }}"
  when: dest_user != "" 

All good. The second scenario is when the user does not provide any 
dest_user then his SSO username (i get this from thier Jenkins login) and 
password i.e dest_pass which he enters manually should be used for all 
hosts in the dynamic inventory.

How can i construct dest_nodes group to accomodate both username for 
passwordless login and both username-password?

-- 
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/384f6ec2-8bcf-4e8e-9254-67a04b69ee7cn%40googlegroups.com.

Reply via email to