From 62b853b51ea1efe56fea2ce1cc3232bd0b9e03b9 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 7 Oct 2015 23:42:44 +0000 Subject: [PATCH] Create both prod and stg ticket keys --- playbooks/update_ticketkey.yml | 10 +++++++--- roles/httpd/proxy/templates/02-ticketkey.conf | 1 - roles/httpd/proxy/templates/02-ticketkey.conf.j2 | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 roles/httpd/proxy/templates/02-ticketkey.conf create mode 100644 roles/httpd/proxy/templates/02-ticketkey.conf.j2 diff --git a/playbooks/update_ticketkey.yml b/playbooks/update_ticketkey.yml index beeb93e158..0c07e55ed8 100644 --- a/playbooks/update_ticketkey.yml +++ b/playbooks/update_ticketkey.yml @@ -6,12 +6,16 @@ - include: "{{ handlers }}/restart_services.yml" tasks: - - name: create new ticket key - command: dd if=/dev/random of=/root/ticketkey.tkey bs=1 count=48 + - name: create new production ticket key + command: dd if=/dev/random of=/root/ticketkey_production.tkey bs=1 count=48 + connection: local + + - name: create new staging ticket key + command: dd if=/dev/random of=/root/ticketkey_staging.tkey bs=1 count=48 connection: local - name: deploy ticket key - copy: src=/root/ticketkey.tkey dest=/etc/httpd/ticketkey.tkey + copy: src=/root/ticketkey_{{env}}.tkey dest=/etc/httpd/ticketkey_{{env}}.tkey owner=root group=root mode=0600 notify: - restart httpd diff --git a/roles/httpd/proxy/templates/02-ticketkey.conf b/roles/httpd/proxy/templates/02-ticketkey.conf deleted file mode 100644 index eb0f056809..0000000000 --- a/roles/httpd/proxy/templates/02-ticketkey.conf +++ /dev/null @@ -1 +0,0 @@ -SSLSessionTicketKeyFile /etc/httpd/ticketkey.tkey diff --git a/roles/httpd/proxy/templates/02-ticketkey.conf.j2 b/roles/httpd/proxy/templates/02-ticketkey.conf.j2 new file mode 100644 index 0000000000..c9f44909f4 --- /dev/null +++ b/roles/httpd/proxy/templates/02-ticketkey.conf.j2 @@ -0,0 +1 @@ +SSLSessionTicketKeyFile /etc/httpd/ticketkey_{{env}}.tkey