Reputation: 8394
I have a task which needs to set the user's default shell to zsh, after run, the user will be set from admin user to standard user, thus lose admin privileges. How to fix this??
my osx version: 10.10.5 ansible version: 1.9.2
- name: set zsh as default shell
sudo: yes
user: name=aaron shell=/usr/local/bin/zsh
when: ansible_distribution == "MacOSX"
Upvotes: 1
Views: 819
Reputation: 52423
Use group parameter to set whatever group you want. I think by default it assigns group staff
user: name=aaron shell=/usr/local/bin/zsh group=admin
Upvotes: 1