Skip to content

Commit 966d350

Browse files
committed
remove argsplat from FreeIPA users task
1 parent a35ea26 commit 966d350

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

ansible/roles/freeipa/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ These role variables are only required when using `freeipa_server`:
6262
- `freeipa_server_ip`: Optional, IP address of freeipa_server host. Default is `ansible_host` of the `freeipa_server` host. Default `false`.
6363
- `freeipa_setup_dns`: Optional bool, whether to configure the FreeIPA server as an integrated DNS server and define a zone and records. NB: This also controls whether `freeipa_client` hosts use the `freeipa_server` host for name resolution. Default `true` when `freeipa_server` contains a host.
6464
- `freeipa_client_ip`: Optional, IP address of FreeIPA client. Default is `ansible_host`.
65-
- `freeipa_users`: A list of dicts as per parameters for [community.general.ipa_user](https://docs.ansible.com/ansible/latest/collections/community/general/ipa_user_module.html). Note that:
65+
- `freeipa_users`: A list of dicts defining users to add, with keys/values as for [community.general.ipa_user](https://docs.ansible.com/ansible/latest/collections/community/general/ipa_user_module.html): Note that:
6666
- `name`, `givenname` (firstname) and `sn` (surname) are required.
67-
- `ipa_pass` and `ipa_user` are automatically supplied.
67+
- `ipa_host`, `ipa_port`, `ipa_prot`, `ipa_user`, `validate_certs` are automatically provided and cannot be overridden.
6868
- If `password` is set, the value should *not* be a hash (unlike `ansible.builtin.user` as used by the `basic_users` role), and it must be changed on first login. `krbpasswordexpiration` does not appear to be able to override this.

ansible/roles/freeipa/tasks/users.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
- name: Add users to freeipa
22
# This uses DNS to find the ipa server, which works as this is running on the enrolled ipa server
3-
community.general.ipa_user: "{{ freeipa_user_defaults | combine(item) }}"
3+
community.general.ipa_user:
4+
displayname: "{{ item.displayname | default(omit) }}"
5+
gidnumber: "{{ item.gidnumber | default(omit) }}"
6+
givenname: "{{ item.givenname }}"
7+
#ipa_host
8+
ipa_pass: "{{ freeipa_admin_password | quote }}"
9+
#ipa_port
10+
#ipa_prot
11+
ipa_timeout: "{{ item.ipa_timeout | default(omit) }}"
12+
#ipa_user
13+
krbpasswordexpiration: "{{ item.krbpasswordexpiration | default(omit) }}"
14+
loginshell: "{{ item.loginshell | default(omit) }}"
15+
mail: "{{ item.mail | default(omit) }}"
16+
password: "{{ item.password | default(omit) }}"
17+
sn: "{{ item.sn }}"
18+
sshpubkey: "{{ item.sshpubkey | default(omit) }}"
19+
state: "{{ item.state | default(omit) }}"
20+
telephonenumber: "{{ item.telephonenumber | default(omit) }}"
21+
title: "{{ item.title | default(omit) }}"
22+
uid: "{{ item.name | default(item.uid) }}"
23+
uidnumber: "{{ item.uidnumber | default(omit) }}"
24+
update_password: "{{ item.update_password | default(omit) }}"
25+
userauthtype: "{{ item.userauthtype | default(omit) }}"
26+
#validate_certs
427
loop: "{{ freeipa_users }}"

0 commit comments

Comments
 (0)