forked from SSSD/sssd-ci-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fedora.yml
318 lines (290 loc) · 7.33 KB
/
Fedora.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
- name: Enable docs installation by default
block:
- name: Check dnf.conf exists
stat:
path: /etc/dnf/dnf.conf
register: dnf_stat_result
- name: Patch dnf.conf
replace:
path: /etc/dnf/dnf.conf
regexp: 'nodocs'
replace: ''
when: dnf_stat_result.stat.exists
- name: Select packageset
set_fact:
extended_packageset: "{{ extended_packageset | default('no') }}"
- name: Install packages for ground base image
block:
- name: Install dnf plugins
dnf:
state: present
name:
- dnf-plugins-core
- name: Install @sssd/ci-deps repositories
shell: |
if grep -qE "CentOS Stream release 10|Red Hat Enterprise Linux release 10" /etc/redhat-release
then
# 'dnf copr' defaults to 'epel' on centos-stream and rhel-10 but there is no epel-10
dnf copr enable -y @sssd/ci-deps centos-stream-10-$basearch
else
dnf copr enable -y @sssd/ci-deps
fi
# Legacy repo containing the virtualsmartcard, virt_cacard, vpcd that was replaced by ci-deps
# Keeping it here in case we need to return to it for some reason.
#- name: Install virt_smartcard copr repositories
# command: dnf copr enable -y jjelen/vsmartcard
# args:
# creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:jjelen:vsmartcard.repo
# when: virt_smartcard
- name: Install systemd and minimal set of packages
dnf:
state: present
name:
- authselect
- bind-utils
- expect
- firewalld
- iproute
- iproute-tc
- net-tools
- openldap-clients
- openssh-clients
- openssh-server
- passwd
- policycoreutils
- policycoreutils-python-utils
- python3-pip
- sudo
- systemd
disable_gpg_check: yes
when: "'base_ground' in group_names"
- name: Install extended set of packages
block:
- name: Add gh-cli.repo repo
ansible.builtin.get_url:
url: https://cli.github.com/packages/rpm/gh-cli.repo
dest: /etc/yum.repos.d/gh-cli.repo
mode: '0644'
- name: Install additional packages
dnf:
state: present
name:
- bash-completion
- bind-utils
- dbus-tools
- e2fsprogs
- expect
- findutils
- firewalld
- gdb
- gdb-gdbserver
- iputils
- ldb-tools
- man
- net-tools
- passwd
- policycoreutils
- policycoreutils-python-utils
- python3-pip
- rsync
- tcpdump
- wget
- which
- wireshark-cli
- gh
- git
- mc
- tig
- tmate
- tmux
- vim
disable_gpg_check: yes
when:
- "'base_ground' in group_names"
- extended_packageset
- name: Install packages for client base image
block:
- name: Install ipa client
dnf:
state: present
name: '{{ ipa.client }}'
- name: Install SSSD and its dependencies
dnf:
state: present
name:
- nfs-utils
- realmd
- oddjob
- oddjob-mkhomedir
- adcli
- sssd
- 'sssd-*'
register: pkg_install
- name: Check installed packages
ansible.builtin.package_facts:
# ansible dnf5 seems to have a regression with wildcard *
# https://github.com/ansible/ansible/issues/83373
- name: Install sssd subpackages
command: yum install -y 'sssd-*'
register: sssd_install
when: "'sssd-ad' not in ansible_facts.packages or 'sssd-kcm' not in ansible_facts.packages"
- name: Show installed sssd packages
ansible.builtin.debug:
var: pkg_install
- name: Install debug information for selected packages
dnf:
enablerepo: '*-debug*'
name: '{{ item }}-debuginfo'
state: present
with_items:
- dbus
- glibc
- libcmocka
- libdhash
- libini_config
- libldb
- libtalloc
- libtevent
ignore_errors: yes
when: debuginfo
- name: Install test dependencies on client
dnf:
state: present
name:
- autofs
- augeas
- krb5-workstation
- ldb-tools
- net-tools
- nss-pam-ldapd
- tcpdump
- wireshark-cli
disable_gpg_check: yes
- name: Install packages for virtual smartcard from general repos
dnf:
state: present
name:
- opensc
- openssl
- gnutls-utils
- softhsm
- nss-tools
- selinux-policy-devel
- selinux-policy-targeted
- make
when: virt_smartcard
- name: Install virtual smartcard packages from copr
dnf:
state: present
name:
- virtualsmartcard
- virt_cacard
- vpcd
disable_gpg_check: yes
when: virt_smartcard
when: "'base_client' in group_names or 'client' in group_names"
- name: Install packages for LDAP base image
block:
- name: Install 389ds
dnf:
state: present
name:
- acl
- 389-ds-base
when: "'base_ldap' in group_names or 'ldap' in group_names or 'ipa' in group_names"
- name: Install packages for IPA base image
block:
- name: Install IPA
dnf:
state: present
name: '{{ ipa.server }}'
- name: Install sssd-kcm
dnf:
state: present
name: sssd-kcm
when: "'base_ipa' in group_names or 'ipa' in group_names"
- name: Install packages for Samba base image
block:
- name: Install Samba DC
dnf:
state: present
name:
- samba-dc
- samba-winbind-clients
when: "'base_samba' in group_names or 'samba' in group_names"
- name: Install packages for NFS base image
block:
- name: Install NFS
dnf:
state: present
name:
- nfs-utils
when: "'base_nfs' in group_names or 'nfs' in group_names"
- name: Install packages for KDC base image
block:
- name: Install KDC
dnf:
state: present
name:
- krb5-libs
- krb5-server
- krb5-workstation
when: "'base_kdc' in group_names or 'kdc' in group_names"
- name: Install packages that are shared with IPA and client base images
block:
- name: Install packages required for passkey testing
dnf:
state: present
name:
- acl
- ci-sssd-random
- umockdev
when: passkey_support
when: "'base_client' in group_names or 'client' in group_names or 'base_ipa' in group_names or 'ipa' in group_names"
- name: Install packages for Keycloak base image
block:
- name: Install Keycloak dependencies
dnf:
state: present
allowerasing: true
name:
- java-17-openjdk-headless
- openssl
- unzip
- curl
- jq
when: "'base_keycloak' in group_names"
- name: Install additional packages for client development image
block:
- name: Install SSSD build dependencies
command: dnf builddep -y sssd
- name: Install packages required for integration tests
dnf:
state: present
name:
- clang-analyzer
- curl-devel
- dbus-daemon
- fakeroot
- krb5-server
- krb5-workstation
- libcmocka-devel
- libfaketime
- nss_wrapper
- openldap-clients
- openldap-servers
- pam_wrapper
- python3-ldap
- python3-ldb
- python3-psutil
- python3-pycodestyle
- python3-pytest
- python3-requests
- rpm-build
- uid_wrapper
- valgrind
- name: Install additional python packages
pip:
name:
- flaky
when: "'client_devel' in group_names or 'ipa_devel' in group_names"