gpg-lacre/tasks/install.yml

65 lines
1.6 KiB
YAML
Raw Normal View History

2021-07-19 07:03:05 +02:00
---
- name: '[APT] - Install dependencies'
apt:
name: "{{ lacre_apt }}"
update_cache: yes
2022-05-09 23:43:14 +02:00
- name: '[Install] - Make sure Lacre home exists'
2021-07-19 07:03:05 +02:00
file:
path: '{{ lacre_homedir }}'
state: directory
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
2022-05-09 23:43:14 +02:00
- name: '[Install] - Make sure Lacre .gnupg dir exists'
2021-07-19 07:03:05 +02:00
file:
path: '{{ lacre_homedir }}/.gnupg'
state: directory
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
2022-05-09 23:43:14 +02:00
mode: '700'
2021-07-19 07:03:05 +02:00
2022-05-09 23:43:14 +02:00
- name: '[Install] - Make sure Lacre smime dir exists'
2021-07-19 07:03:05 +02:00
file:
path: '{{ lacre_homedir }}/smime'
state: directory
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
2022-05-09 23:43:14 +02:00
mode: '700'
2021-07-19 07:03:05 +02:00
2022-05-09 23:43:14 +02:00
- name: '[Install] - Link GnuPG Lacre to global python modules'
2021-07-19 07:03:05 +02:00
file:
src: '{{ lacre_app_dir }}/GnuPG'
2022-03-21 21:21:02 +01:00
dest: '/usr/local/lib/python{{ lacre_pything_version }}/dist-packages/GnuPG'
2021-07-19 07:03:05 +02:00
state: link
- name: '[Install] - Link Lacre module to global python modules'
file:
src: '{{ lacre_app_dir }}/lacre'
dest: '/usr/local/lib/python{{ lacre_pything_version }}/dist-packages/lacre'
state: link
- name: '[INSTALL] - Set cron file permission'
file:
path: '{{ lacre_app_dir }}/webgate-cron.py'
state: 'file'
mode: 'a+x'
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
when: lacre_webgate_cron == 'true'
- name: '[INSTALL] - Set cron'
cron:
name: "Lacre-webgate cronjob"
state: present
minute: "*/3"
hour: "*"
day: "*"
month: "*"
weekday: "*"
user: "{{ lacre_username }}"
job: '{{ lacre_app_dir }}/webgate-cron.py > /dev/null'
when: lacre_webgate_cron == 'true'