Skip to content
Snippets Groups Projects
Verified Commit 0d30aa59 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

add role for pyoxldapsync

parent 859ef8dc
No related branches found
No related tags found
No related merge requests found
Pipeline #1847 failed
---
oxldapsync_ox_path: "/opt/open-xchange/sbin"
oxldapsync_ox_admin_username: "oxadmin"
oxldapsync_ox_admin_password: ""
oxldapsync_ox_context_id: 1
oxldapsync_ox_default_timezone: "Europe/Berlin"
oxldapsync_ox_default_language: "de_DE"
oxldapsync_ldap_host: "auth.example.com"
oxldapsync_ldap_user_dn: "cn=users,dc=example,dc=com"
oxldapsync_ldap_group_dn: "cn=groups,dc=example,dc=com"
oxldapsync_ldap_username: ""
oxldapsync_ldap_password: ""
oxldapsync_ca_cert: ""
oxldapsync_domain: "EXAMPLE"
oxldapsync_ldap_port: 636
oxldapsync_ldap_user_filter: "(&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(|(sAMAccountName=subsonic)(sAMAccountName=gk-info))))"
*/15 * * * * root cd /opt/pyoxldapsync && /usr/bin/python3 -m oxldapsync -c /opt/pyoxldapsync/etc/ldapsync.conf
---
- name: ensure the deploy key is available
copy:
src: "{{inventory_dir}}/files/deploy-keys/pyoxldapsync"
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
mode: 0700
- name: configure sync
template:
src: ldapsync.conf
dest: /opt/pyoxldapsync/etc/ldapsync.conf
owner: root
group: root
mode: 0640
- name: run pyoxldapsync regularly
copy:
src: cronjob
dest: /etc/cron.d/pyoxldapsync
owner: root
group: root
mode: 0755
ox_path = {{oxldapsync_ox_path}}
ox_admin_username = {{oxldapsync_ox_admin_username}}
ox_admin_password = {{oxldapsync_ox_admin_password}}
ox_context_id = {{oxldapsync_ox_context_id}}
ox_default_timezone = {{oxldapsync_ox_default_timezone}}
ox_default_language = {{oxldapsync_ox_default_language}}
ox_dont_modify = {{oxldapsync_ox_admin_username}}
ldap_host = {{oxldapsync_ldap_host}}
ldap_user_dn = {{oxldapsync_ldap_user_dn}}
ldap_group_dn = {{oxldapsync_ldap_group_dn}}
ldap_username = {{oxldapsync_ldap_username}}
ldap_password = {{oxldapsync_ldap_password}}
ldap_ca_cert = {{oxldapsync_ldap_ca_cert}}
ldap_domain = {{oxldapsync_ldap_domain}}
ldap_port = {{oxldapsync_ldap_port}}
ldap_user_filter = {{oxldapsync_ldap_user_filter}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment