Hello!
I find some issue and cant resolve it by myself.
My scenario:
3 users, 4 hosts
I add information about users in file vars/all (like login, uid, comment, 
group and password) and deploy users via role with variable (user logins) 
into all hosts

==========================hosts file=============
[group1]
serv1
[group2]
serv2
serv3
==================playbook=================
- hosts: all
vars:
ssh_users: 
- "{{user1}}"
roles: 
- users_add

- hosts: group1
vars:
ssh_users: 
- "{{user2}}"
- "{{user3}}"
roles: 
- users_add


- hosts: group2
vars:
ssh_users: 
- "{{user2}}"
roles: 
- users_add

============= vars/all====================
user1:
- { user: 'user1', uid: '11111' }
user2:
- { user: 'user2', uid: '11112' }
user3:
- { user: 'user3', uid: '11113' }
============= role file =====================
- name: Add ssh user
user: name={{ item.user }} uid= {{ item.uid}}
with_items: "ssh_users"
=======================================

My question is - how to point special shell value (like /bin/nologin) for 
users 2 and 3, but not for user 1, and only in host group1
As you can see - user 1 is like admin for all hosts and group1 - is like 
special host, where i need to use special shell for all users, but not for 
admin user

Can you help me, please?

-- 
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/a37edd66-4341-45f8-a7e1-9f68602cb1b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to