hello,
Here is a sample inventory that i want to use
[paadadm]
*machine1 *ansible_ssh_user=*admin *comment="Sandbox Admin Node"
[paadsrvwbsa]
*machine1 *ansible_ssh_user=*doe *comment="Sandbox Node A"
[paadsrvwbsb]
*machine2 *ansible_ssh_user=*anotherone *comment="Sandbox Node B"
[paadstack:children]
paadadm
paadsrvwbsa
paadsrvwbsb
if i use this sample playbook
---
- hosts: paadstack
remote_user: '{{ ansible_ssh_user }}'
tasks:
- name: "hello"
debug: msg="hello {{ ansible_ssh_user }}"
i get this output :
PLAY [paadstack]
**************************************************************
GATHERING FACTS
***************************************************************
ok: [machine1]
ok: [machine2]
TASK: [hello]
*****************************************************************
ok: [machine1] => {
"msg": "hello doe"
}
ok: [machine2] => {
"msg": "hello anotherone"
}
PLAY RECAP
********************************************************************
machine1 : ok=2 changed=0 unreachable=0 failed=0
machine2 : ok=2 changed=0 unreachable=0 failed=0
is it possible not to make an alias on machine1 to have 2 executions on
machine1 because users are differents ?
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/556b7686-acd1-418d-9c5e-1a63ad2f141f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.