2018-12-01 00:31:11 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Install required packages
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
|
|
|
- openldap-servers
|
|
|
|
- openldap-clients
|
|
|
|
|
|
|
|
- name: Deploy environment file
|
|
|
|
template:
|
|
|
|
src: "etc/sysconfig/slapd.j2"
|
|
|
|
dest: "/etc/sysconfig/slapd"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: __slapd_restart
|
|
|
|
|
|
|
|
- name: Deploy config file
|
|
|
|
template:
|
|
|
|
src: "etc/openldap/slapd.conf.j2"
|
|
|
|
dest: "/etc/openldap/slapd.conf"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: __slapd_restart
|
2018-12-01 01:03:29 +00:00
|
|
|
|
|
|
|
- name: Open ports in iptables
|
|
|
|
iptables_raw:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
rules: "{{ item.rules }}"
|
|
|
|
state: "{{ item.state }}"
|
|
|
|
weight: "{{ item.weight|default(omit) }}"
|
|
|
|
table: "{{ item.table|default(omit) }}"
|
|
|
|
with_items: "{{ ldap_proxy_open_ports }}"
|
|
|
|
loop_control:
|
|
|
|
label: "{{item.name}}"
|
|
|
|
when: ldap_proxy_iptables_enabled
|
2018-12-01 00:31:11 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|