all.yml
Provisioning configuration file (YAML)
Provisioning configuration file is group_vars/all.yml.
In YAML format, you can set server, database and WordPress environment. And can enable the develop and deploy tools.
## Server & Database Settings ##
server : apache # apache|nginx|h2o
fastcgi : none # none|php-fpm
database : mariadb # mariadb|mysql
db_root_password : admin
db_host : localhost
db_name : wordpress
db_user : admin
db_password : admin
db_prefix : wp_
db_charset : ''
db_collate : '' # utf8mb4_general_ci
## WordPress Settings ##
title : VAW (Vagrant Ansible WordPress)
admin_user : admin
admin_password : admin
admin_email : hoge@example.com
# e.g. latest, nightly, 4.1, 4.1-beta1
# see Release Archive - https://wordpress.org/download/release-archive/
# 3.7 or later to work properly
version : latest
# e.g. en_US, ja, ...
# see wordpress-i18n list - http://svn.automattic.com/wordpress-i18n/
lang : en_US
# in own directory or subdirectory install.
# see http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
wp_dir : '' #e.g. /wordpress
wp_site_path : '' #e.g. /wordpress
multisite : false # true|false
# default theme|slug|url|zip (local path, /vagrant/themes/*.zip)
activate_theme : ''
themes : []
# slug|url|zip (local path, /vagrant/plugins/*.zip)
activate_plugins :
- theme-check
- log-deprecated-notices
- debug-bar
- query-monitor
- broken-link-checker
plugins :
- developer
- monster-widget
- wordpress-beta-tester
- wp-multibyte-patch
theme_mod : {}
# see Option Reference - http://codex.wordpress.org/Option_Reference
options : {}
# e.g. /%year%/%monthnum%/%postname%
# see http://codex.wordpress.org/Using_Permalinks
permalink_structure :
structure : ''
category : ''
tag : ''
# Any one of 4 ways to import
import_xml_data : '' # local path, /vagrant/import/*.xml
import_db_data : '' # local path, /vagrant/import/*.sql
import_backwpup :
path : '' # local path, /vagrant/import/*.zip
db_data_file : ''
xml_data_file : ''
import_admin : false # true|false
theme_unit_test : false # true|false
replace_old_url : [] # http(s)://example.com, to vm_hostname from old url
search_replace_strings : {}
regenerate_thumbnails : false # true|false
WP_DEBUG : true # true|false
SAVEQUERIES : true # true|false
## Develop & Deploy Settings ##
ssl : true # true|false
http_protocol : https # http|https
# See Supported Versions http://php.net/supported-versions.php
php_version : 7.4.33
develop_tools : false # true|false
deploy_tools : false # true|false
## That's all, stop setting. Let's vagrant up!! ##
WP_URL : '{{ http_protocol }}://{{ HOSTNAME }}{{ wp_site_path }}'
WP_PATH : '{{ DOCUMENT_ROOT }}{{ wp_dir }}'
Server & Database Settings
server(required) name of web server (default:apache/ value:apache|nginx|h2o)fastcginame of fastCGI (default:none/ value:none|php-fpm)database(required) name of databese (default:mariadb/ value:mariadb|mysql)db_root_password(required) database root password (default:admin)db_host(required) database host (default:localhost)db_name(required) name of database (default:wordpress)db_user(required) database user name (default:admin)db_password(required) database user password (default:admin)db_prefixdatabase prefix (default:wp_)db_charsetdatabase character set (default:'')db_collatedatabase collation (default:'')
WordPress Settings
titleWordPress site title (default:VAW (Vagrant Ansible WordPress))admin_user(required) WordPress admin user name (default:admin)admin_password(required) WordPress admin user password (default:admin)admin_email(required) WordPress admin email address (default:hoge@example.com)version(required) version of WordPress (default:latest)- e.g.
latest,4.1,4.1-beta1 - see Release Archive
- version 3.7 or later to work properly
- e.g.
lang(required) WordPress in your language (default:en_US)- e.g.
en_US,ja, … - see wordpress-i18n list
- e.g.
wp_dirdirectory path to subdirectory install WordPress (default: install to document root)wp_site_pathpath of site (default: document root)- If
wp_dirandwp_site_pathare the same path, in own directory install. - If
wp_dirandwp_site_pathare different path, install to subdirectory. Note thatwp_site_pathbe placed on one above the directory thanwp_dir. - see Giving WordPress Its Own Directory
- If
multisiteMultisite enabled flag (default:false/ value:true|false)activate_themeinstall a theme and activated (default: default theme)- set default theme
'',theme slug,zip file URLorlocal zip file path - set
/vagrant/themes/*.zipby local zip file path
- set default theme
themesinstall themes- set in YAML arrays of hashes format
theme slug,zip file URLorlocal zip file path - set
/vagrant/themes/*.zipby local zip file path
- set in YAML arrays of hashes format
Configuration example
themes :
- yoko
- Responsive
Disable the setting case
themes : []
activate_pluginsinstall plagins and activated- set in YAML arrays of hashes format
plagin slug,zip file URLorlocal zip file path - set
/vagrant/plagins/*.zipby local zip file path
- set in YAML arrays of hashes format
Configuration example
activate_plugins :
- theme-check
- plugin-check
Disable the setting case
activate_plugins : []
pluginsinstall plagins- set in YAML arrays of hashes format
plagin slug,zip file URLorlocal zip file path - set
/vagrant/plagins/*.zipby local zip file path
- set in YAML arrays of hashes format
theme_modsetting theme_mod (theme modification value)- see set_theme_mod()
- set in YAML nested hash format
Configuration example
theme_mod :
background_color: 'cccccc'
Disable the setting case
theme_mod : {}
optionssetting options- see update_option() and Option Reference
- set in YAML nested hash format
Configuration example
options :
blogname: 'blog title'
blogdescription: 'blog description'
Disable the setting case
options : {}
permalink_structuresetting permalink structure- set the following three permalink structures
- see Using Permalinks
structureset the permalink structure using the structure tagscategoryset the prefix of the category archivetagset the prefix of the tag archive
import_xml_datalocal WordPress export (WXR) file path/vagrant/import/*.xmlimport_db_datalocal sql dump file path/vagrant/import/*.sqlimport_backwpuppathArchive file path/vagrant/import/*.zip(Zip, Tar, Tar GZip, Tar BZip2)db_data_fileDB backup file name (Import from one of data files)xml_data_fileXML export file name (imported from one of the data files)
import_adminAdd WordPress administrator user (default:false/ value:true|false)theme_unit_testimport Theme Unit Test data enabled flag (default:false/ value:true|false)replace_old_urlreplace tovm_hostnamefromold url
Configuration example
replace_old_url :
- http://example.com
- http://www.example.com
- https://example.com
Disable the setting case
replace_old_url : []
search_replace_stringsSearch the database and replace the matched string
Configuration example
search_replace_strings :
'foo': 'bar'
'abc': 'xyz'
'Hello, World!': 'Welcome to WordPress!'
Disable the setting case
search_replace_strings : {}
regenerate_thumbnailsregenerate thumbnails enabled flag (default:false/ value:true|false)WP_DEBUGdebug mode (default:true/ value:true|false)SAVEQUERIESsave the database queries (default:true/ value:true|false)
Develop & Deploy Settings
sslWordPress administration over SSL enabled flag (default:true/ value:true|false)http_protocolHTTP protocol (default:https/ value:http|https)php_versionversion of PHP (default:7.4.33)develop_toolsactivate develop tools (default:false/ value:true|false)deploy_toolsactivate deploy tools (default:false/ value:true|false)