summaryrefslogtreecommitdiff
path: root/roles/subdap/tasks/main.yaml
blob: 4d79aa127e187453c456651fe5703c0e18e88a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- apt: name={{ item }} state=present update_cache=yes
  with_items:
  - git
  - python-ldap
  - python-lxml
  - python-m2crypto
  - virtualenv

- name: Create subdap group
  group: name=subdap

- name: Create subdap user
  user: name=subdap group=subdap home=/var/subdap

- include: as_subdap.yaml
  become: yes
  become_method: su
  become_user: subdap
  notify:
  - Restart subdap

- name: Create systemd service
  template:
    src=subdap.service.j2
    dest=/etc/systemd/system/subdap.service
  notify:
  - Reload systemd daemons
  - Restart subdap

- name: Enable systemd service
  service:
    name: subdap
    enabled: yes