user: fix default non-system user's shell on macOS

This commit is contained in:
Martin Krizek 2017-09-18 15:20:58 +02:00 committed by Brian Coca
commit 32d6b1d0e0
3 changed files with 58 additions and 12 deletions

View file

@ -4,18 +4,6 @@
become_method: su
user:
name: "{{ become_test_user }}"
when: ansible_distribution != "MacOSX"
- name: Create test user (become_method=su)
become: True
become_user: root
become_method: su
user:
name: "{{ become_test_user }}"
# explicitly set user shell since the default shell on OS X is /usr/bin/false
shell: /bin/bash
when: ansible_distribution == "MacOSX"
- name: test becoming user (become_method=su)
shell: whoami