Skip to content

Commit

Permalink
Trying random chatgpt nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynforthewyn committed Aug 20, 2024
1 parent 2b4fb58 commit 7e63cc9
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions ansible/roles/websites_container/tasks/websites_container.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
---
- name: Deploy SSL Certificate and Private Key
- name: Deploy SSL Certificate and Private Key and Start Docker Container
hosts: droplet
tasks:
- name: set up ssl
block:
- name: Create SSL directory if it doesn't exist
file:
path: /home/playtechnique/ssl
state: directory
mode: '0700'
owner: playtechnique
group: playtechnique
- name: SSL setup
block:
- name: Create SSL directory if it doesn't exist
file:
path: /home/playtechnique/ssl
state: directory
mode: '0700'
owner: playtechnique
group: playtechnique

- name: Install SSL Private Key
copy:
content: "{{ ssl_private_key }}"
dest: /home/playtechnique/ssl/private.key
mode: '0600'
owner: playtechnique
group: playtechnique
- name: Install SSL Private Key
copy:
content: "{{ ssl_private_key }}"
dest: /home/playtechnique/ssl/private.key
mode: '0600'
owner: playtechnique
group: playtechnique

- name: Install SSL Certificate
copy:
content: "{{ ssl_certificate }}"
dest: /home/playtechnique/ssl/certificate.crt
mode: '0644'
owner: playtechnique
group: playtechnique

- name: Re-create websites container
docker_container:
name: website
image: docker.io/playtechnique/website:latest
state: started
recreate: yes
pull: true
exposed_ports:
- 8080
published_ports:
- "443:8080"
volumes:
- /home/playtechnique/ssl:/etc/ssl/playtechnique:ro
command:
- "/andrew"
- "-c"
- "/etc/ssl/playtechnique/certificate.crt"
- "-p"
- "/etc/ssl/playtechnique/private.key"
- "/website"
- "0.0.0.0:8080"
- "https://playtechnique.io"
- name: Install SSL Certificate
copy:
content: "{{ ssl_certificate }}"
dest: /home/playtechnique/ssl/certificate.crt
mode: '0644'
owner: playtechnique
group: playtechnique

- name: Re-create websites container
docker_container:
name: website
image: docker.io/playtechnique/website:latest
state: started
recreate: yes
pull: true
exposed_ports:
- 8080
published_ports:
- "443:8080"
volumes:
- /home/playtechnique/ssl:/etc/ssl/playtechnique:ro
command:
- "/andrew"
- "-c"
- "/etc/ssl/playtechnique/certificate.crt"
- "-p"
- "/etc/ssl/playtechnique/private.key"
- "/website"
- "0.0.0.0:8080"
- "https://playtechnique.io"

0 comments on commit 7e63cc9

Please sign in to comment.