-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #759 from Gerbenvandervries/develop
work in progress, role the deploy LDAP2LISTSERV script and config, an…
- Loading branch information
Showing
4 changed files
with
951 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,50 @@ | ||
--- | ||
- name: Create directories for mailinglists script. | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
mode: '0750' | ||
owner: 'root' | ||
group: 'root' | ||
with_items: | ||
- '/root/mailinglists' | ||
become: true | ||
|
||
- name: 'Install listserv script.' | ||
ansible.builtin.copy: | ||
src: "templates/{{ item }}" | ||
dest: "/root/mailinglists/{{ item }}" | ||
owner: 'root' | ||
group: 'root' | ||
mode: '0750' | ||
with_items: | ||
- 'LDAP2LISTSERV.bash' | ||
- 'LDAP2LISTSERV.cfg' | ||
become: true | ||
|
||
- name: 'Create cron job to fetch data from an LDAP and manage mailing list subscriptions of our users.' | ||
ansible.builtin.cron: | ||
name: Set cron job to fetch data from an LDAP and manage mailing list subscriptions. | ||
weekday: '*' | ||
hour: '12,15,18' | ||
minute: '15' | ||
user: 'root' | ||
job: | | ||
/bin/bash -c '/root/mailinglists/LDAP2LISTSERV.bash -l ERROR -u -n 2>&1 | /bin/logger' | ||
cron_file: 'ldap-2-mailinglists' | ||
disabled: True | ||
become: true | ||
|
||
- name: 'cron job to backup mailing list ones a day.' | ||
ansible.builtin.cron: | ||
name: set cron job to backup mailing list. | ||
weekday: '*' | ||
hour: '09' | ||
minute: '15' | ||
user: 'root' | ||
job: | | ||
/bin/bash -c '/root/mailinglists/LDAP2LISTSERV.bash -l ERROR -u -n -b /root/mailinglists/listserv_backups 2>&1 | /bin/logger | ||
cron_file: 'ldap-2-mailinglists' | ||
disabled: True | ||
become: true | ||
... |
Oops, something went wrong.