File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
ansible/roles/compute_init Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 17
17
# TODO: "= role defaults" - could be moved to a vars_file: on play with similar precedence effects
18
18
resolv_conf_nameservers : []
19
19
20
+ sssd_enable_mkhomedir : false
21
+ sssd_conf_dest : /etc/sssd/sssd.conf
22
+ sssd_started : true
23
+ sssd_enabled : true
24
+
20
25
nfs_client_mnt_point : " /mnt"
21
26
nfs_client_mnt_options :
22
27
nfs_client_mnt_state : mounted
125
130
mode : 0644
126
131
when : enable_etc_hosts
127
132
133
+ - name : Configure sssd
134
+ block :
135
+ - name : Manage sssd.conf configuration
136
+ copy :
137
+ src : " /exports/cluster/hostconfig/{{ ansible_hostname }}/sssd.conf"
138
+ dest : " {{ sssd_conf_dest }}"
139
+
140
+ - name : Restart sssd
141
+ systemd :
142
+ name : sssd
143
+ state : restarted
144
+ when : sssd_started | bool
145
+
146
+ - name : Ensure sssd service state
147
+ systemd :
148
+ name : sssd
149
+ state : " {{ 'started' if sssd_started | bool else 'stopped' }}"
150
+ enabled : " {{ sssd_enabled | bool }}"
151
+
152
+ - name : Get current authselect configuration
153
+ command : authselect current --raw
154
+ changed_when : false
155
+ failed_when :
156
+ - _authselect_current.rc != 0
157
+ - " 'No existing configuration detected' not in _authselect_current.stdout"
158
+ register : _authselect_current # stdout: sssd with-mkhomedir
159
+
160
+ - name : Configure nsswitch and PAM for SSSD
161
+ command : " authselect select sssd --force{% if sssd_enable_mkhomedir | bool %} with-mkhomedir{% endif %}"
162
+ when : " 'sssd' not in _authselect_current.stdout"
163
+ when : enable_sssd
164
+
128
165
# NFS client mount
129
166
- name : If nfs-clients is present
130
167
include_tasks : tasks/nfs-clients.yml
Original file line number Diff line number Diff line change 71
71
remote_src : true
72
72
run_once : true
73
73
delegate_to : " {{ groups['control'] | first }}"
74
+
75
+ - name : Create hostconfig directory
76
+ file :
77
+ path : " /exports/cluster/hostconfig/{{ inventory_hostname }}/"
78
+ state : directory
79
+ owner : root
80
+ group : root
81
+ mode : u=rw,go=
82
+ delegate_to : " {{ groups['control'] | first }}"
83
+
84
+ - name : Inject host specific config template files
85
+ template :
86
+ src : " {{ item.src }}"
87
+ dest : " /exports/cluster/hostconfig/{{ inventory_hostname }}/{{ item.dest }}"
88
+ owner : root
89
+ group : root
90
+ mode : u=rw,go=
91
+ loop :
92
+ - src : " {{ sssd_conf_src }}"
93
+ dest : sssd.conf
94
+ - src : " {{ sshd_conf_src }}"
95
+ dest : sshd.conf
96
+ delegate_to : " {{ groups['control'] | first }}"
You can’t perform that action at this time.
0 commit comments