[jeff@lx00010300p ansible-production3]$ ansible -i hosts -m ping all
lx00011010d | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
lx00016141d | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
[jeff@lx00010300p ansible-production3]$ ansible -i hosts -m ping oracle
lx00011010d | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
[ifreling@lx00010300p ansible-production3]$ cat group_vars/oracle
---
users:
- username: roy
name: Roy
[ifreling@lx00010300p ansible-production3]$ cat group_vars/all
---
users:
- username: jeff
name: Jeff
[ifreling@lx00010300p ansible-production3]$ ansible-inventory -i hosts --list --vars
{
"_meta": {
"hostvars": {
"lx00011010d": {
"users": [
{
"name": "Roy",
"username": "roy"
}
]
},
"lx00016141d": {
"users": [
{
"name": "Jeff",
"username": "jeff"
}
]
}
}
},
"all": {
"children": [
"oracle",
"ungrouped",
"webmethods"
]
},
"oracle": {
"hosts": [
"lx00011010d"
]
},
"webmethods": {
"hosts": [
"lx00016141d"
]
}
}
[ifreling@lx00010300p ansible-production3]$ ansible-playbook -i hosts site.yml -C
PLAY [all] *********************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************
ok: [lx00011010d]
ok: [lx00016141d]
TASK [singleplatform-eng.users : Creating groups] ******************************************************************************************************************************
TASK [singleplatform-eng.users : Per-user group creation] **********************************************************************************************************************
changed: [lx00011010d] => (item={u'username': u'roy', u'name': u'Roy'})
changed: [lx00016141d] => (item={u'username': u'jeff', u'name': u'Jeff'})
TASK [singleplatform-eng.users : User creation] ********************************************************************************************************************************
changed: [lx00011010d] => (item={u'username': u'roy', u'name': u'Roy'})
changed: [lx00016141d] => (item={u'username': u'jeff', u'name': u'Jeff'})
TASK [singleplatform-eng.users : SSH keys] *************************************************************************************************************************************
TASK [singleplatform-eng.users : Setup user profiles] **************************************************************************************************************************
skipping: [lx00011010d] => (item={u'username': u'roy', u'name': u'Roy'})
skipping: [lx00016141d] => (item={u'username': u'jeff', u'name': u'Jeff'})
TASK [singleplatform-eng.users : Deleted user removal] *************************************************************************************************************************
TASK [singleplatform-eng.users : Deleted per-user group removal] ***************************************************************************************************************
PLAY [oracle] ******************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************
ok: [lx00011010d]
TASK [singleplatform-eng.users : Creating groups] ******************************************************************************************************************************
TASK [singleplatform-eng.users : Per-user group creation] **********************************************************************************************************************
changed: [lx00011010d] => (item={u'username': u'roy', u'name': u'Roy'})
TASK [singleplatform-eng.users : User creation] ********************************************************************************************************************************
changed: [lx00011010d] => (item={u'username': u'roy', u'name': u'Roy'})
TASK [singleplatform-eng.users : SSH keys] *************************************************************************************************************************************
TASK [singleplatform-eng.users : Setup user profiles] **************************************************************************************************************************
skipping: [lx00011010d] => (item={u'username': u'roy', u'name': u'Roy'})
TASK [singleplatform-eng.users : Deleted user removal] *************************************************************************************************************************
TASK [singleplatform-eng.users : Deleted per-user group removal] ***************************************************************************************************************
PLAY RECAP *********************************************************************************************************************************************************************
lx00011010d : ok=6 changed=4 unreachable=0 failed=0 skipped=10 rescued=0 ignored=0
lx00016141d : ok=3 changed=2 unreachable=0 failed=0 skipped=5 rescued=0 ignored=0
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20191025113532.3197a8a3%40gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/Qq7AL-GkeK0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6AF48FC8-5833-4178-B738-85A6ED696CED%40redhat.com.