fix: ldap_attr module has changed; adopt new format

This commit is contained in:
Neil Hanlon 2024-04-22 16:47:11 -04:00
parent 9e50935c62
commit 9c0a787b9c
Signed by: neil
GPG Key ID: 705BC21EC3C70F34

View File

@ -10,6 +10,27 @@
hosts: "{{ host|default('ipaserver') }}" hosts: "{{ host|default('ipaserver') }}"
become: false become: false
gather_facts: false gather_facts: false
vars:
cleanup_attributes:
fasGPGKeyId: []
fasGitHubUsername: []
fasGitLabUsername: []
fasIRCNick: []
fasRHBZEmail: []
fasWebsiteURL: []
fasgpgkeyid: []
fasLocale: []
fasTimezone: []
homePhone: []
homePostalAddress: []
postalAddress: []
postalCode: []
postOfficeBox: []
st: []
street: []
ipaSshPubKey: []
telephoneNumber: []
homePhone: []
collections: collections:
- freeipa.ansible_freeipa - freeipa.ansible_freeipa
@ -36,50 +57,21 @@
- name: "Remove personal information attributes" - name: "Remove personal information attributes"
community.general.ldap_attrs: community.general.ldap_attrs:
dn: "uid={{ ipa_name }},cn=users,cn=accounts,dc=rockylinux,dc=org" dn: "uid={{ ipa_name }},cn=users,cn=accounts,dc=rockylinux,dc=org"
name: "{{ item }}" attributes: "{{ cleanup_attributes }}"
values: []
state: exact
server_uri: ldap://localhost/
bind_dn: "uid={{ ipaadmin_principal }},cn=users,cn=accounts,dc=rockylinux,dc=org"
bind_pw: "{{ ipaadmin_password }}"
with_items:
- fasGPGKeyId
- fasGitHubUsername
- fasGitLabUsername
- fasIRCNick
- fasRHBZEmail
- fasWebsiteURL
- fasgpgkeyid
- fasLocale
- fasTimezone
- homePhone
- homePostalAddress
- postalAddress
- postalCode
- postOfficeBox
- st
- street
- ipaSshPubKey
- telephoneNumber
- homePhone
- name: "Set FAS Status Note"
community.general.ldap_attrs:
dn: "uid={{ ipa_name }},cn=users,cn=accounts,dc=rockylinux,dc=org"
name: "fasStatusNote"
values: "Account Disabled: {{ ticket_id }}"
state: exact state: exact
server_uri: ldap://localhost/ server_uri: ldap://localhost/
bind_dn: "uid={{ ipaadmin_principal }},cn=users,cn=accounts,dc=rockylinux,dc=org" bind_dn: "uid={{ ipaadmin_principal }},cn=users,cn=accounts,dc=rockylinux,dc=org"
bind_pw: "{{ ipaadmin_password }}" bind_pw: "{{ ipaadmin_password }}"
- name: "Set FAS Account Information to Private" - name: "Set FAS Status Note and set isprivate"
community.general.ldap_attrs: community.general.ldap_attrs:
dn: "uid={{ ipa_name }},cn=users,cn=accounts,dc=rockylinux,dc=org" dn: "uid={{ ipa_name }},cn=users,cn=accounts,dc=rockylinux,dc=org"
name: "fasisprivate" attributes: "{{ item }}"
values: "TRUE"
state: exact state: exact
server_uri: ldap://localhost/ server_uri: ldap://localhost/
bind_dn: "uid={{ ipaadmin_principal }},cn=users,cn=accounts,dc=rockylinux,dc=org" bind_dn: "uid={{ ipaadmin_principal }},cn=users,cn=accounts,dc=rockylinux,dc=org"
bind_pw: "{{ ipaadmin_password }}" bind_pw: "{{ ipaadmin_password }}"
loop:
- fasStatusNote: "Account Disabled: {{ ticket_id }}"
- fasisprivate: true
... ...