web_plk: do a few steps manually for now

This commit is contained in:
Markus 2020-11-15 22:30:07 +01:00
parent 787fd8eb22
commit 39d252a2bc
1 changed files with 11 additions and 7 deletions

View File

@ -22,11 +22,14 @@
- name: Create vhost directory
file: path=/var/www/plk state=directory owner=www-data group=www-data
- name: Configure MySQL database
mysql_db: name={{ plk_dbname }}
# FIXME mysql_db and mysql_user is currently not working
# already tried installing python3-pymsql
# so for now mysql is handled manually
#- name: Configure MySQL database
# mysql_db: name={{ plk_dbname }}
- name: Configure MySQL user
mysql_user: name={{ plk_dbuser }} password={{ plk_dbpass }} priv={{ plk_dbname }}.*:ALL state=present
#- name: Configure MySQL user
# mysql_user: name={{ plk_dbuser }} password={{ plk_dbpass }} priv={{ plk_dbname }}.*:ALL state=present
- name: Ensure certificates are available
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ plk_domain }}.key -out /etc/nginx/ssl/{{ plk_domain }}.crt -days 730 -subj "/CN={{ plk_domain }}" creates=/etc/nginx/ssl/{{ plk_domain }}.crt
@ -36,9 +39,10 @@
template: src=certs.j2 dest=/etc/acertmgr/{{ plk_domain }}.conf
notify: Run acertmgr
- name: Configure vhosts
template: src=vhost.j2 dest=/etc/nginx/sites-available/plk
notify: Restart nginx
# TODO vhost is configured manually to figure out what is needed for wordpress
#- name: Configure vhosts
# template: src=vhost.j2 dest=/etc/nginx/sites-available/plk
# notify: Restart nginx
- name: Enable vhosts
file: src=/etc/nginx/sites-available/plk dest=/etc/nginx/sites-enabled/plk state=link