configuration - Ansible: referencing/adapting global users list for different hosts -
i have central global list of users relevant data, this:
users: - username: alice groups: adm, media, web sudo: yes shell: /bin/bash - username: bob groups: web sudo: no shell: /bin/false - username: eva groups: media, web sudo: no shell: /bin/bash ... in group_vars/all.yml (is place it?).
now, able specify different subsets of user list different hosts and, if necessary, override default data. furthermore want mention usernames, rest of data should taken global list, this:
host: db1 users: - alice - bob host: web2 users: - alice - bob - eva groups: media, web, adm host: media1 users: - alice groups: web - eva sudo: yes what best way organize it? files in hierarchy? how should task user creation like?
ps: wise have users deleted if disappear global/host user lists? if yes - how implement well?...
Comments
Post a Comment