fix
This commit is contained in:
@@ -122,10 +122,18 @@ options:
|
|||||||
admin_name: wordpress_admin
|
admin_name: wordpress_admin
|
||||||
is_debug: false
|
is_debug: false
|
||||||
locale: fr_FR
|
locale: fr_FR
|
||||||
|
locales: fr_FR en_US
|
||||||
|
plugins: ''
|
||||||
|
theme: ''
|
||||||
|
themes: ''
|
||||||
examples:
|
examples:
|
||||||
- admin_name: wordpress_admin
|
- admin_name: wordpress_admin
|
||||||
is_debug: false
|
is_debug: false
|
||||||
locale: fr_FR
|
locale: fr_FR
|
||||||
|
locales: fr_FR en_US
|
||||||
|
plugins: ''
|
||||||
|
theme: ''
|
||||||
|
themes: ''
|
||||||
properties:
|
properties:
|
||||||
admin_name:
|
admin_name:
|
||||||
default: wordpress_admin
|
default: wordpress_admin
|
||||||
@@ -136,6 +144,18 @@ options:
|
|||||||
locale:
|
locale:
|
||||||
default: fr_FR
|
default: fr_FR
|
||||||
type: string
|
type: string
|
||||||
|
locales:
|
||||||
|
default: fr_FR en_US
|
||||||
|
type: string
|
||||||
|
plugins:
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
|
theme:
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
|
themes:
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
type: object
|
type: object
|
||||||
domain:
|
domain:
|
||||||
default: your-company
|
default: your-company
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ resource "kubectl_manifest" "wordpress_cfg" {
|
|||||||
WORDPRESS_TITLE: "${var.instance}"
|
WORDPRESS_TITLE: "${var.instance}"
|
||||||
WORDPRESS_TABLE_PREFIX: wp_
|
WORDPRESS_TABLE_PREFIX: wp_
|
||||||
WORDPRESS_DEBUG: "${var.config.is_debug?"true":""}"
|
WORDPRESS_DEBUG: "${var.config.is_debug?"true":""}"
|
||||||
|
WORDPRESS_PLUGINS: "${var.config.plugins}"
|
||||||
|
WORDPRESS_THEMES: "${var.config.themes}"
|
||||||
|
WORDPRESS_THEME: "${var.config.theme}"
|
||||||
|
WORDPRESS_LOCALES: "${var.config.locales}"
|
||||||
|
WORDPRESS_LOCALE: "${var.config.locale}"
|
||||||
WORDPRESS_CONFIG_EXTRA: |
|
WORDPRESS_CONFIG_EXTRA: |
|
||||||
#### general settings
|
#### general settings
|
||||||
define('WP_HOME', 'https://${local.dns_name}');
|
define('WP_HOME', 'https://${local.dns_name}');
|
||||||
@@ -50,6 +55,29 @@ resource "kubectl_manifest" "wordpress_files" {
|
|||||||
if [ -z "$(wp core is-installed)" ]; then
|
if [ -z "$(wp core is-installed)" ]; then
|
||||||
wp core install --url="https://$${WORDPRESS_HOST}" --title="$${WORDPRESS_TITLE}" --admin_user="$${WORDPRESS_ADMIN_NAME}" --admin_password="$${WORDPRESS_ADMIN_PASSWORD}" --admin_email="$${WORDPRESS_ADMIN_MAIL}" --locale="${var.config.locale}" --skip-email
|
wp core install --url="https://$${WORDPRESS_HOST}" --title="$${WORDPRESS_TITLE}" --admin_user="$${WORDPRESS_ADMIN_NAME}" --admin_password="$${WORDPRESS_ADMIN_PASSWORD}" --admin_email="$${WORDPRESS_ADMIN_MAIL}" --locale="${var.config.locale}" --skip-email
|
||||||
fi
|
fi
|
||||||
|
for THEME in $(echo "$WORDPRESS_THEMES"|sed 's/;/ /g;s/,/ /g');do
|
||||||
|
wp theme install $THEME
|
||||||
|
done
|
||||||
|
if [ ! -z "$WORDPRESS_THEME" ]; then
|
||||||
|
wp theme install $WORDPRESS_THEME
|
||||||
|
wp theme activate $WORDPRESS_THEME
|
||||||
|
fi
|
||||||
|
for PLUGIN in $(echo "miniorange-login-with-eve-online-google-facebook $WORDPRESS_PLUGINS"|sed 's/;/ /g;s/,/ /g');do
|
||||||
|
wp plugin install $PLUGIN
|
||||||
|
wp plugin activate $PLUGIN
|
||||||
|
done
|
||||||
|
for LOCALE in $(echo "$WORDPRESS_LOCALES"|sed 's/;/ /g;s/,/ /g');do
|
||||||
|
wp language core install $LOCALE
|
||||||
|
wp language theme install --all $LOCALE
|
||||||
|
wp language plugin install --all $LOCALE
|
||||||
|
done
|
||||||
|
if [ ! -z "$WORDPRESS_LOCALE" ]; then
|
||||||
|
wp language core install $WORDPRESS_LOCALE
|
||||||
|
wp language theme install --all $WORDPRESS_LOCALE
|
||||||
|
wp language plugin install --all $WORDPRESS_LOCALE
|
||||||
|
wp language core activate $WORDPRESS_LOCALE
|
||||||
|
fi
|
||||||
|
wp core update-db
|
||||||
wp-cli: |-
|
wp-cli: |-
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
WP_PATH=/var/www/html/
|
WP_PATH=/var/www/html/
|
||||||
|
|||||||
Reference in New Issue
Block a user