From c85e8eece06884da363db442fe10e5f9e4cf1ccf Mon Sep 17 00:00:00 2001 From: ruaridhg Date: Mon, 2 Dec 2024 16:37:09 +0000 Subject: [PATCH] Fix prepare.yml --- roles/nginx/molecule/resources/prepare.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/nginx/molecule/resources/prepare.yml b/roles/nginx/molecule/resources/prepare.yml index 3921e24..f732848 100644 --- a/roles/nginx/molecule/resources/prepare.yml +++ b/roles/nginx/molecule/resources/prepare.yml @@ -53,9 +53,15 @@ ansible.builtin.file: path: /etc/nginx/certs state: directory - mode: "0700" - owner: nginx - group: nginx + owner: root + group: root + mode: "0644" + + - name: Generate test private key + ansible.builtin.command: + cmd: openssl genrsa -out /etc/nginx/certs/test.key 2048 + args: + creates: /etc/nginx/certs/test.key - name: Generate test certificate ansible.builtin.command: @@ -64,9 +70,3 @@ /etc/nginx/certs/test.crt -days 365 -subj '/CN=example.com' args: creates: /etc/nginx/certs/test.crt - - - name: Generate test private key - ansible.builtin.command: - cmd: openssl genrsa -out /etc/nginx/certs/test.key 2048 - args: - creates: /etc/nginx/certs/test.key