Skip to content

Commit

Permalink
Create per-user primary groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
adherzog committed Oct 8, 2015
1 parent 43c6985 commit efcd6db
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
- name: include os specific variables
include_vars: '{{ ansible_os_family }}.yml'

- name: create admin user groups
group:
name: '{{ item.username }}'
state: present
with_items: admin_users

- name: create admin users
user:
name: '{{item.username}}'
comment: '{{item.fullname}}'
group: '{{item.username}}'
groups: '{{admin_users_sudo_group}}'
append: yes
with_items: admin_users
Expand All @@ -17,6 +24,12 @@
state: absent
with_items: admin_users_to_remove

- name: remove admin user groups
group:
name: '{{ item.username }}'
state: absent
with_items: admin_users_to_remove

- name: update authorized keys for admin users
authorized_key:
user: '{{item.username}}'
Expand Down

2 comments on commit efcd6db

@lingfish
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A question: why not submit this and your other fixes to @cchurch as PRs?

@adherzog
Copy link
Owner Author

@adherzog adherzog commented on efcd6db Aug 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lingfish I should have. It looks like this change has been pulled in now. Thanks!

Please sign in to comment.