Add protonmail + cloud + fix prometheus
This commit is contained in:
parent
525c6ed2a4
commit
427838c903
13 changed files with 106 additions and 2 deletions
41
roles/protonmail/tasks/base.yml
Normal file
41
roles/protonmail/tasks/base.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
|
||||
- name: Check protonmail directory exist
|
||||
ansible.builtin.file:
|
||||
path: protonmail
|
||||
state: directory
|
||||
|
||||
- name: Copy protonmail conf
|
||||
ansible.builtin.copy:
|
||||
backup: true
|
||||
src: .
|
||||
dest: protonmail/
|
||||
register: protonmail_copy_files_results
|
||||
|
||||
- name: Create protonmail network
|
||||
community.docker.docker_network:
|
||||
name: protonmail
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Show message if not initialized
|
||||
ansible.builtin.debug:
|
||||
msg: Please run init.sh in protonmail folder and set variable protonmail.initialized to true and restart tasks
|
||||
when: not protonmail.initialized
|
||||
|
||||
- name: Force update and restart container
|
||||
community.docker.docker_compose:
|
||||
project_src: protonmail
|
||||
state: present
|
||||
pull: true
|
||||
restarted: true
|
||||
when: protonmail.initialized and protonmail_copy_files_results.changed
|
||||
become: true
|
||||
|
||||
- name: Update or start container
|
||||
community.docker.docker_compose:
|
||||
project_src: protonmail
|
||||
state: present
|
||||
pull: true
|
||||
when: protonmail.initialized and not protonmail_copy_files_results.changed
|
||||
become: true
|
4
roles/protonmail/tasks/main.yml
Normal file
4
roles/protonmail/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
|
||||
- ansible.builtin.import_tasks: base.yml
|
||||
name: base
|
Loading…
Add table
Add a link
Reference in a new issue