Skip to content

Commit 23c79e5

Browse files
committed
Fix home creation
1 parent 1196977 commit 23c79e5

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

ansible/roles/sssd/handlers/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
service:
1717
name: "{{ sssd_service }}"
1818
state: "restarted"
19+

ansible/roles/sssd/meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ galaxy_info:
5050
dependencies: []
5151
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
5252
# if you add dependencies to this list.
53+

ansible/roles/sssd/tasks/configure.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
when: sssd_config is defined
1010
notify: "Restart sssd"
1111

12-
- name: "Check if authconfig needs to be run to configure pam/nsswitch"
13-
# FIXME(wszumski) --test is no longer supported. This probably isn't doing what we think it is doing
14-
# Error: option --test is no longer supported and we cannot continue if it is set.
15-
# authconfig is also deprecated. We should switch to authselect.
16-
shell: "/usr/bin/test \"$(authconfig {% if sssd_enable_mkhomedir | bool %}--enablemkhomedir {% endif %}--enablesssd --enablesssdauth --test)\" = \"$(authconfig --test)\""
17-
register: authconfig_result
18-
changed_when: "authconfig_result.rc != 0"
19-
check_mode: no
20-
failed_when: "authconfig_result.rc >= 2"
21-
12+
# TODO: Make idempotent
2213
- name: "Configure nsswitch and pam for SSSD via authconfig"
23-
command: "authconfig {% if sssd_enable_mkhomedir | bool %}--enablemkhomedir {% endif %} --enablesssd --enablesssdauth --update"
24-
when: "authconfig_result.rc != 0"
14+
command: "authselect select sssd{% if sssd_enable_mkhomedir | bool %} with-mkhomedir{% endif %}"

ansible/roles/sssd/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
- include_tasks: "install.yml"
66

77
- include_tasks: "runtime.yml"
8+

ansible/roles/sssd/tasks/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
- include_tasks: "configure.yml"
66

7-
- include_tasks: "service.yml"
7+
- include_tasks: "service.yml"

ansible/roles/sssd/tasks/service.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@
44
name: "{{ sssd_service }}"
55
state: "{{ sssd_state }}"
66
enabled: "{{ sssd_enabled }}"
7+
8+
- name: "Ensure oddjob is started"
9+
service:
10+
name: oddjobd
11+
state: started
12+
enabled: "{{ sssd_enable_mkhomedir }}"

ansible/roles/sssd/tests/inventory

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
localhost
2+

0 commit comments

Comments
 (0)