ldap_attr stops processing entries and hangs the playbook run

26 views
Skip to first unread message

Asil Carlin

unread,
Jul 24, 2017, 5:15:54 AM7/24/17
to Ansible Project
Hi,

I'm seemingly having an issue with the ldap_attr module - it just stops processing ldap atrributes. I'm defining multiple dictionaries then adding them to a list of lists to process them, e.g:

# VARS
# Define list of attributes to process
ds_ldap_config:
  - "{{ ds_nsslapd_config }}"
  - "{{ ds_ldbm_config }}"
  - "{{ ds_nsslapd_useroot}}"


ds_nsslapd_config:
  dn: 'cn=config'
  attr:
    - { name: nsslapd-accesslog-logging-enabled, value: 'off' }
    - { name: nsslapd-accesslog-logmaxdiskspace, value: 1000 }

ds_ldbm_config:
  dn: 'cn=config,cn=ldbm database,cn=plugins,cn=config'
  attr:
    - { name: nsslapd-dbcachesize, value: 200000000 }

ds_nsslapd_useroot:
  dn: 'cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
  attr:
    - { name: nsslapd-cachememsize, value: 200000000 }




The task looks like this:

- name: Configure LDAP attributes
  ldap_attr:
    dn: "{{ item.0.dn }}"
    name: "{{ item.1.name }}"
    values: "{{ item.1.value }}"
    state: exact
    params: "{{ ldap_auth }}"
  environment: "{{ ds_shell_env }}"
  notify: restart_dirsrv
  with_subelements:
    - "{{ ds_ldap_config | default ([]) }}"
    - attr


The config has many entries. At some point whilst processing the loop it just stops. I've tried moving the order of the lists of lists, this just changes at what item the loop freezes.
Not really sure how to debug.

-vvvv shows nothing, ANSIBILE_DEBUG doesn't really provide any clues and the session has to be interrupted.

Suggestions welcome.


Asil Carlin

unread,
Jul 24, 2017, 8:15:34 AM7/24/17
to Ansible Project
There was a replication issue - fixed that and it's now working.
Reply all
Reply to author
Forward
0 new messages