Skip to content

Support for ansible 2.3.2.0 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions tasks/install_ldap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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