Merge pull request 'Update crt play' (#18) from update_crt_play into dev
Reviewed-on: #18
This commit was merged in pull request #18.
This commit is contained in:
@@ -46,3 +46,11 @@ all:
|
||||
ansible_become_password: "{{ ansible_become_passwd }}"
|
||||
services_to_run:
|
||||
- coder_ai
|
||||
web-servers:
|
||||
hosts:
|
||||
cert-proxy:
|
||||
ansible_host: 192.168.0.47
|
||||
ansible_become_password: "{{ ansible_become_passwd }}"
|
||||
monitoring:
|
||||
ansible_host: 192.168.0.49
|
||||
ansible_become_password: "{{ ansible_become_passwd }}"
|
||||
|
||||
@@ -20,3 +20,14 @@
|
||||
- ../roles/update_configs
|
||||
# Make sure that the services that are supposed to run are running
|
||||
- ../roles/check_services
|
||||
|
||||
- name: Ensure all web-servers have fresh TLS certificates
|
||||
hosts: web-servers
|
||||
remote_user: ansible
|
||||
|
||||
vars_files:
|
||||
../inventory/group_vars/all/secrets.yaml
|
||||
|
||||
roles:
|
||||
# Pull certificates from cert_proxy and distribute them among the servers
|
||||
- ../roles/update_certificates
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: Pull directory from remote host to control node
|
||||
ansible.posix.synchronize:
|
||||
mode: pull
|
||||
src: /tmp/letsencrypt
|
||||
dest: /tmp
|
||||
recursive: true
|
||||
delete: true
|
||||
when: "inventory_hostname == 'cert-proxy'"
|
||||
|
||||
- name: Push loki.vmn.su certificate to the target
|
||||
ansible.builtin.copy:
|
||||
src: /tmp/letsencrypt/live/loki.vmn.su/fullchain.pem
|
||||
dest: /etc/nginx/certs/loki_fullchain.pem
|
||||
local_follow: true
|
||||
when: "inventory_hostname == 'monitoring'"
|
||||
|
||||
- name: Push loki.vmn.su key to the target
|
||||
ansible.builtin.copy:
|
||||
src: /tmp/letsencrypt/live/loki.vmn.su/privkey.pem
|
||||
dest: /etc/nginx/certs/loki_privkey.pem
|
||||
local_follow: true
|
||||
when: "inventory_hostname == 'monitoring'"
|
||||
Reference in New Issue
Block a user