diff --git a/ansible/playbook.yml b/ansible/playbook.yml index aad92a6..028f4ce 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -161,16 +161,21 @@ force: yes update_cache: yes - - name: Set hostname to vlad4 - hostname: - name: vlad4 - - - name: Create SSL directory + - name: Ensure SSL directory exists file: path: /etc/nginx/ssl state: directory mode: '0700' + - name: Generate private key + openssl_privatekey: + path: /etc/nginx/ssl/vlad4.key + size: 2048 + type: RSA + mode: '0600' + owner: root + group: root + - name: Generate self-signed SSL certificate openssl_certificate: path: /etc/nginx/ssl/vlad4.crt