Add cowboy_website to hedwig.
This commit is contained in:
parent
68806c73fb
commit
78ae3d2bb5
|
@ -1,3 +1,5 @@
|
|||
mariadb:
|
||||
root_pw: 'havoc'
|
||||
havoc_pw: 'mNa4dkxs'
|
||||
root_pw: 'root'
|
||||
havoc_pw: 'havoc'
|
||||
woody_pw: 'woody'
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
wordpress:
|
||||
havoc_key: 'havoc_key'
|
||||
woody_key: 'woody_key'
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
# Created by setup-mysql
|
||||
define('DB_NAME', 'woody');
|
||||
define('DB_USER', 'woody');
|
||||
define('DB_PASSWORD', '{{ pillar['mariadb']['woody_pw'] }}');
|
||||
define('DB_HOST', 'localhost');
|
||||
define('DB_CHARSET', 'utf8');
|
||||
define('DB_COLLATE', '');
|
||||
define('SECRET_KEY', '{{ pillar['wordpress']['woody_key'] }}');
|
||||
define('WP_CONTENT_DIR', '/var/lib/wordpress/wp-content-cowboybuilder');
|
||||
define( 'FS_METHOD', 'direct' );
|
||||
define('WPLANG', 'en_GB');
|
||||
?>
|
|
@ -0,0 +1,35 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName www.cowboybuilder.org.uk
|
||||
ServerAlias cowboybuilder.org.uk
|
||||
|
||||
ErrorLog /var/log/apache2/cowboybuilder-error.log
|
||||
CustomLog /var/log/apache2/cowboybuilder-access.log combined
|
||||
|
||||
RemoteIPProxyProtocol On
|
||||
|
||||
DocumentRoot /usr/share/wordpress
|
||||
|
||||
Alias /wp-content /var/lib/wordpress/wp-content-cowboybuilder
|
||||
|
||||
<Directory /var/lib/wordpress/wp-content-cowboybuilder>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/wordpress>
|
||||
Options FollowSymLinks
|
||||
AllowOverride Limit Options FileInfo
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.php [L]
|
||||
</Directory>
|
||||
</VirtualHost>
|
|
@ -0,0 +1,33 @@
|
|||
cowboy_wordpress:
|
||||
pkg.installed:
|
||||
- name: wordpress
|
||||
mysql_user.present:
|
||||
- name: woody
|
||||
- password: '{{ salt['pillar.get']('mariadb:woody_pw', '') }}'
|
||||
mysql_database.present:
|
||||
- name: woody
|
||||
mysql_grants.present:
|
||||
- grant: all privileges
|
||||
- database: woody.*
|
||||
- user: woody
|
||||
file.managed:
|
||||
- name: /etc/wordpress/config-www.cowboybuilder.org.uk.php
|
||||
- source: salt://cowboy_website/config-www.cowboybuilder.org.uk.php
|
||||
- template: jinja
|
||||
|
||||
cowboy_website:
|
||||
file.managed:
|
||||
- require:
|
||||
- sls: apache
|
||||
- names:
|
||||
- /etc/apache2/sites-available/www.cowboybuilder.org.uk.conf:
|
||||
- source: salt://cowboy_website/cowboybuilder.org.uk.conf
|
||||
apache_site.enabled:
|
||||
- require:
|
||||
- file: /etc/apache2/sites-available/www.cowboybuilder.org.uk.conf
|
||||
- name: www.cowboybuilder.org.uk
|
||||
service.running:
|
||||
- name: apache2
|
||||
- reload: true
|
||||
- watch:
|
||||
- file: /etc/apache2/sites-available/www.cowboybuilder.org.uk.conf
|
|
@ -13,6 +13,7 @@ base:
|
|||
- firewalls/hedwig
|
||||
- lunch_website
|
||||
- havoc_website
|
||||
- cowboy_website
|
||||
|
||||
'scabbers.lunch.org.uk':
|
||||
- debian
|
||||
|
|
Loading…
Reference in New Issue