mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Since FreeIPA version 4.8.0 ipauser has support for smb-logon-script, smb-profile-path, smb-home-dir, and smb-home-drive drive attributes. On FreeIPA, these attributes are only available when modifying a user, so if the user defined in the playbook does not exist, two calls to IPA API are executed, a 'user_add' followed by a 'user_mod'. (see https://github.com/freeipa/freeipa/blob/master/doc/designs/adtrust/samba-domain-controller.md A new example playbook can be found at: playbooks/user/smb-attributes.yml A new test playbook can be found at: tests/user/test_user_smb_attrs.yml
18 lines
447 B
YAML
18 lines
447 B
YAML
---
|
|
- name: Plabook to handle users
|
|
hosts: ipaserver
|
|
become: false
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
- name: Ensure user 'smbuser' is present with smb attributes
|
|
ipauser:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: smbuser
|
|
first: SMB
|
|
last: User
|
|
smb_logon_script: N:\logonscripts\startup
|
|
smb_profile_path: \\server\profiles\some_profile
|
|
smb_home_dir: \\users\home\smbuser
|
|
smb_home_drive: "U:"
|