xoxys.gitea/tasks/tls.yml
Robert Kaussow 5024a136fb
Some checks failed
continuous-integration/drone/push Build is failing
remove nginx integration
2019-07-18 23:51:54 +02:00

29 lines
825 B
YAML

---
- block:
- name: Create tls folder structure
file:
path: "{{ item }}"
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
recurse: True
with_items:
- "{{ gitea_tls_cert_path | dirname }}"
- "{{ gitea_tls_key_path | dirname }}"
become: True
become_user: root
- block:
- name: Copy certs and private key
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
- { src: "{{ gitea_tls_key_source }}", dest: '{{ gitea_tls_key_path }}', mode: '0600' }
- { src: "{{ gitea_tls_cert_source }}", dest: '{{ gitea_tls_cert_path }}', mode: '0750' }
loop_control:
label: "{{ item.dest }}"
become: True
become_user: "{{ gitea_user }}"