gpg-lacre/tasks/install.yml

65 lines
1.6 KiB
YAML

---
- name: '[APT] - Install dependencies'
apt:
name: "{{ lacre_apt }}"
update_cache: yes
- name: '[Install] - Make sure Lacre home exists'
file:
path: '{{ lacre_homedir }}'
state: directory
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
- name: '[Install] - Make sure Lacre .gnupg dir exists'
file:
path: '{{ lacre_homedir }}/.gnupg'
state: directory
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
mode: '700'
- name: '[Install] - Make sure Lacre smime dir exists'
file:
path: '{{ lacre_homedir }}/smime'
state: directory
owner: '{{ lacre_username }}'
group: '{{ lacre_group }}'
mode: '700'
- name: '[Install] - Link GnuPG Lacre to global python modules'
file:
src: '{{ lacre_app_dir }}/GnuPG'
dest: '/usr/local/lib/python{{ lacre_pything_version }}/dist-packages/GnuPG'
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'