-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
devlab-pve.yml
27 lines (27 loc) · 869 Bytes
/
devlab-pve.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- name: PVE Maintenance
hosts: devlab_pve
vars_files:
- vars/devlab-pve.yml
- vaults/vault.yml
roles:
- role: ssl_server
tasks:
- name: Upgrade all packages
ansible.builtin.apt:
update_cache: true
upgrade: full
- name: Copy the certificate
# ansible.builtin.copy with remote_src does not work here.
# see https://forum.proxmox.com/threads/ansible-operation-not-permitted-copying-ssl-keys-directly.88310
ansible.builtin.raw: 'cp "{{ item.src }}" "{{ item.dest }}"'
loop:
- src: /etc/certs/pveproxy-ssl_chain.pem
dest: /etc/pve/local/pveproxy-ssl.pem
- src: /etc/certs/pveproxy-ssl.key
dest: /etc/pve/local/pveproxy-ssl.key
changed_when: true
- name: Restart PVEProxy
ansible.builtin.service:
name: pveproxy
state: restarted