diff --git a/tasks/install_ldap.yml b/tasks/install_ldap.yml index c2aba5e..dae805a 100644 --- a/tasks/install_ldap.yml +++ b/tasks/install_ldap.yml @@ -5,35 +5,33 @@ - name: Install the openldap and required Packages for RedHat yum: name={{ item }} state=installed - with_items: openldap_server_pkgs + with_items: "{{ openldap_server_pkgs }}" when: ansible_os_family == 'RedHat' - - name: Install the openldap and required Packages for Ubuntu apt: name={{ item }} state=installed update_cache=yes - with_items: openldap_server_pkgs - environment: env + with_items: "{{ openldap_server_pkgs }}" + environment: "{{ env }}" when: ansible_os_family == 'Debian' - name: Delete the configuration directory file: path={{ openldap_server_app_path }}/slapd.d state=absent - name: Generate the root password for ldap - shell: slappasswd -s {{ openldap_server_rootpw }} + shell: slappasswd -s {{ openldap_server_rootpw }} register: root_password - name: Copy the slapd.conf configuration file for Redhat template: src=slapd.conf.j2 dest={{ openldap_server_app_path }}/slapd.conf when: ansible_os_family == "RedHat" - notify: + notify: - restart slapd - name: Copy the slapd.conf configuration file template: src=slapd.conf_ubuntu.j2 dest={{ openldap_server_app_path }}/slapd.conf when: ansible_os_family == "Debian" - notify: + notify: - restart slapd - name: Copy the ldap.conf configuration file template: src=ldap.conf.j2 dest={{ openldap_server_app_path }}/ldap.conf -