lvps / 389ds-server

Ansible role to configure 389DS
Apache License 2.0
23 stars 14 forks source link

schema reload doesn't work #25

Closed falon closed 3 years ago

falon commented 3 years ago

https://github.com/lvps/389ds-server/blob/8b151c4e23d3789fc27d168f05bcdc34ffcf2300/tasks/main.yml#L102-L119

Maybe you mean

- name: "Reload schema on {{ dirsrv_serverid }}"
  tags: dirsrv_schema
  ldap_entry: [...]
  when: not dirsrv_restart_condition_has_restarted|default(false) and (
      ( dirsrv_restart_condition_schema_reload_1 is defined and dirsrv_restart_condition_schema_reload_1.changed ) or
      ( dirsrv_restart_condition_schema_reload_2 is defined and dirsrv_restart_condition_schema_reload_2.changed )
    )

In this way it works very pretty for me.

lvps commented 3 years ago

Thanks for the report, I've applied your suggestion and created a new release. For some reason it was working for me, I guess every time I ran the playbook it was also restarting 389DS in the previous task due to other changes.

falon commented 3 years ago

Thank you to add this. I saw at the commit. Did you forget the tags: dirsrv_schema? If I run the role for schema reloading only, if the tag is not present then the schema will never reload.

lvps commented 3 years ago

Oops, my bad, I've added the tags now