Skip to content

Commit 8d0ee57

Browse files
committed
vagrant: move certificates to a directory.
Addressed to #399 [ci skip]
1 parent 7372006 commit 8d0ee57

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
# possible values: test and prod
3+
profile: test

vagrant/provisioning/roles/mystamps-nginx/tasks/main.yml

+4-19
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,17 @@
5050
# openssl req -new -x509 -key my-stamps.ru.key -out my-stamps.ru.crt -days 3650 -subj /CN=my-stamps.ru
5151
#
5252
# For uploading production certificate put the files into mystamps-nginx/files/prod directory.
53-
- name: Uploading certificate (.key file)
53+
- name: Uploading certificates
5454
copy:
55-
src: "{{ item }}"
56-
dest: "/etc/ssl/{{ item | basename }}"
55+
src: "{{ profile }}/{{ item }}"
56+
dest: "/etc/ssl/{{ item }}"
5757
force: yes
5858
backup: no
5959
owner: root
6060
group: nginx
6161
mode: '0640'
62-
with_first_found:
63-
- prod/my-stamps.ru.key
62+
with_items:
6463
- my-stamps.ru.key
65-
notify:
66-
- Restarting nginx service
67-
68-
- name: Uploading certificate (.crt file)
69-
copy:
70-
src: "{{ item }}"
71-
dest: "/etc/ssl/{{ item | basename }}"
72-
force: yes
73-
backup: no
74-
owner: root
75-
group: nginx
76-
mode: '0640'
77-
with_first_found:
78-
- prod/my-stamps.ru.crt
7964
- my-stamps.ru.crt
8065
notify:
8166
- Restarting nginx service

0 commit comments

Comments
 (0)