parent
bdbd9ce195
commit
70d4ce9a2d
3 changed files with 52 additions and 0 deletions
playbooks
resources/chaosknoten/eh22-wiki/nginx
|
@ -64,3 +64,6 @@
|
|||
- "o=${distro_id},n=${distro_codename}"
|
||||
- "o=Docker,n=${distro_codename}"
|
||||
- "o=nginx,n=${distro_codename}"
|
||||
|
||||
- name: Run ensure_eh22_styleguide_dir Playbook
|
||||
ansible.builtin.import_playbook: ensure_eh22_styleguide_dir.yaml
|
||||
|
|
40
playbooks/ensure_eh22_styleguide_dir.yaml
Normal file
40
playbooks/ensure_eh22_styleguide_dir.yaml
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
# TODO: This should really be handled through a role at some point.
|
||||
# This role is also needed for migrating public-web-static to Ansible.
|
||||
- name: Ensure base for working EH22 Styleguide CI deployment
|
||||
hosts: eh22-wiki
|
||||
tasks:
|
||||
- name: Ensure deployment user group
|
||||
ansible.builtin.group:
|
||||
name: eh22-styleguide-deploy
|
||||
system: false
|
||||
become: true
|
||||
|
||||
- name: Ensure deployment user
|
||||
ansible.builtin.user:
|
||||
name: eh22-styleguide-deploy
|
||||
group: eh22-styleguide-deploy
|
||||
password: '!'
|
||||
system: false
|
||||
become: true
|
||||
|
||||
- name: Ensure SSH key is set for deployment user
|
||||
ansible.posix.authorized_key:
|
||||
user: eh22-styleguide-deploy
|
||||
exclusive: true
|
||||
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEgdXYZUq6SUDeKpX0Q8d1WYJ5WduHPMEaRuj0yfJTl deploy key for eh22 styleguide"
|
||||
become: true
|
||||
|
||||
- name: Ensure deployment directory
|
||||
ansible.builtin.file:
|
||||
path: /var/www/eh22-styleguide
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: eh22-styleguide-deploy
|
||||
group: eh22-styleguide-deploy
|
||||
become: true
|
||||
|
||||
- name: Ensure rsync is present for deployment
|
||||
ansible.builtin.apt:
|
||||
name: rsync
|
||||
become: true
|
|
@ -63,4 +63,13 @@ server {
|
|||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_pass unix:/var/run/php/php-fpm-dokuwiki.sock;
|
||||
}
|
||||
|
||||
location = /design {
|
||||
return 302 https://eh22.easterhegg.eu/design/;
|
||||
}
|
||||
|
||||
location /design/ {
|
||||
alias /var/www/eh22-styleguide/;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue