main.yml 881 Bytes
Newer Older
Robin Sonnabend's avatar
Robin Sonnabend committed
1 2 3 4
---

- name: ensure the deploy key is available
  copy:
Lars Beckers's avatar
Lars Beckers committed
5
    src: "{{ inventory_dir }}/files/deploy-keys/pyoxldapsync"
Robin Sonnabend's avatar
Robin Sonnabend committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
    dest: "/root/.ssh/pyoxldapsync"
    owner: root
    group: root
    mode: '0600'

- name: deploy pyoxldapsync
  git:
    repo: git@git.fsmpi.rwth-aachen.de:infra/pyoxldapsync.git
    dest: /opt/pyoxldapsync
    key_file: "/root/.ssh/pyoxldapsync"
    version: "master"
  environment:
    TMPDIR: /root/.ansible/tmp

- name: create config directory
  file:
    path: "/opt/pyoxldapsync/etc"
    state: directory
    owner: root
    group: root
Lars Beckers's avatar
Lars Beckers committed
26
    mode: '0700'
Robin Sonnabend's avatar
Robin Sonnabend committed
27 28 29 30 31 32 33

- name: configure sync
  template:
    src: ldapsync.conf
    dest: /opt/pyoxldapsync/etc/ldapsync.conf
    owner: root
    group: root
Lars Beckers's avatar
Lars Beckers committed
34
    mode: '0640'
Robin Sonnabend's avatar
Robin Sonnabend committed
35 36 37 38 39 40 41

- name: run pyoxldapsync regularly
  copy:
    src: cronjob
    dest: /etc/cron.d/pyoxldapsync
    owner: root
    group: root
Lars Beckers's avatar
Lars Beckers committed
42
    mode: '0755'