diff --git a/roles/ldap_server/tasks/main.yml b/roles/ldap_server/tasks/main.yml index a744d79595a8a37d1b7c6e3eb54de118bf1a0d83..0771e9c7e2ee4d87d04416aa692869d4ff2137ae 100644 --- a/roles/ldap_server/tasks/main.yml +++ b/roles/ldap_server/tasks/main.yml @@ -56,7 +56,7 @@ - name: Enable slapd service on boot (workaround for systemctl broken handling of SysV) command: "rcconf -on slapd" register: result - changed_when: result.stderr == "" + changed_when: not result.stderr - name: Enable slapd service service: @@ -95,7 +95,7 @@ - name: Deploy LDAP misc schema command: "ldapadd -H ldapi:/// -Q -Y EXTERNAL -f /etc/ldap/schema/misc.ldif" - when: ldap_misc_schema_present.stdout == "" + when: not ldap_misc_schema_present.stdout - name: Deploy LDAP TLS private key template: @@ -280,7 +280,7 @@ dn: "{{ item.dn }}" objectClass: "{{ item.attributes.objectClass }}" attributes: "{{ item.attributes }}" - state: "{{ item.state | default('present')}}" + state: "{{ item.state | default('present') }}" with_items: "{{ ldap_entries }}" - name: Deploy firewall configuration for LDAP @@ -324,6 +324,6 @@ - name: Explicitly run all handlers include: ../handlers/main.yml - when: "run_handlers | default(False) | bool() == True" + when: "run_handlers | default(False) | bool()" tags: - handlers