dataset/seed/openldap/templates/openldap.yml

55 lines
2.2 KiB
YAML
Raw Normal View History

2022-07-07 09:37:49 +02:00
%set %%username = "rougail_test@silique.fr"
%set %%username_family = "rougail_test@gnunux.info"
2022-07-16 22:16:24 +02:00
%set %%name_family = 'gnunux'
%set %%familydn = %%calc_ldapclient_base_dn(%%ldapclient_base_dn, family_name=%%name_family)
%set %%userdn = 'cn=' + %%username + ',' + %%calc_ldapclient_base_dn(%%ldapclient_base_dn)
%set %%userfamilydn = 'cn=' + %%username_family + ',' + %%familydn
2022-07-07 09:37:49 +02:00
address: %%ip_eth0
admin_dn: %%ldapclient_user
admin_password: %%ldapclient_user_password
2022-07-16 22:16:24 +02:00
user_dn: %%userdn
user_password: %%get_password(server_name='test', username=%%username, description='test', type="cleartext", hide=%%hide_secret, temporary=True)
user_family_dn: %%userfamilydn
user_family_password: %%get_password(server_name='test', username=%%username_family, description="test", type="cleartext", hide=%%hide_secret, temporary=True)
2022-07-07 09:37:49 +02:00
base_account_dn: %%ldap_account_dn
2022-08-18 10:19:43 +02:00
base_user_dn: %%ldapclient_user_dn
2022-07-07 09:37:49 +02:00
base_family_dn: %%familydn
2022-08-18 10:19:43 +02:00
base_group_dn: %%ldapclient_group_dn
2022-07-07 09:37:49 +02:00
%for %%idx in %%range(3)
%set %%name = 'remote_test' + %%str(%%idx)
remote%%idx: cn=%%name,%%ldapclient_base_dn
remote_password%%idx: %%get_password(server_name=%%domain_name_eth0, username=%%name, description="remote account", type="cleartext", hide=%%hide_secret, temporary=True)
%end for
users:
2022-07-16 22:16:24 +02:00
%%username: %%userdn
%%username_family: %%userfamilydn
2022-07-07 09:37:49 +02:00
%for %%user in %%accounts.users.ldap_user_mail
2022-08-18 10:19:43 +02:00
%%user: cn=%%user,%%ldapclient_user_dn
2022-07-07 09:37:49 +02:00
%end for
%for %%family in %%accounts.families
%set %%families = %%calc_ldapclient_base_dn(%%ldapclient_base_dn, %%family)
%for %%user in %%accounts['family_' + %%family]['users_' + %%family]['ldap_user_mail_' + %%family]
%%user: cn=%%user,%%families
%end for
%end for
groups:
users:
2022-07-16 22:16:24 +02:00
- %%userdn
2022-07-07 09:37:49 +02:00
%for %%user in %%accounts.users.ldap_user_mail
2022-08-18 10:19:43 +02:00
- cn=%%user,%%ldapclient_user_dn
2022-07-07 09:37:49 +02:00
%end for
%for %%family in %%accounts.families
%%family:
2022-07-16 22:16:24 +02:00
%if %%family == %%name_family
- %%userfamilydn
%end if
2022-07-07 09:37:49 +02:00
%for %%user in %%accounts['family_' + %%family]['users_' + %%family]['ldap_user_mail_' + %%family]
- cn=%%user,%%families
%end for
%end for
2023-01-17 21:43:32 +01:00
%if 'gnunux' not in %%accounts.families
%set %%families = %%calc_ldapclient_base_dn(%%ldapclient_base_dn, 'gnunux')
gnunux:
- cn=rougail_test@gnunux.info,%%families
%end if