Classes
Public Classes
wordpress
: Install WP-CLI tool, use it to download wordpress core, create tables in database, configure WordPress and manage plugins and themes.wordpress::params
: Sets defaults values for some variables and parameters.
Private Classes
wordpress::cli
: Install lastest WP-CLI tool.wordpress::core
: Use WP-CLI to download last version of WordPress core, create tables in database and configure WordPress.wordpress::external_fact
: Deploy files to forge an external fact named 'wordpress'wordpress::resource
: download and manage resources aka plugins and themes.wordpress::site
: Use WP-CLI to download last version of WordPress core, create tables in database and configure WordPress.
Defined types
Public Defined types
Private Defined types
wordpress::config::admin
: Configure settings (name password and email) of one user in the desired state.wordpress::config::option
: Configure an option in the desired statewordpress::core::config
: configure WordPress instance.wordpress::core::install
: Downloads and installs WordPress core and language.wordpress::core::update
: Backup and update WordPress core and language.wordpress::resource::activate
: Activates an already installed resource aka plugin or theme.wordpress::resource::install
: Downloads and installs a resource aka plugin or theme.wordpress::resource::uninstall
: Uninstall an already installed resource aka plugin or theme.wordpress::resource::update
: Updates an already installed resource aka plugin or theme.
Functions
wordpress::password_hash
: Hash a string
Install WP-CLI tool, use it to download wordpress core, create tables in database, configure WordPress and manage plugins and themes.
Configure one WordPress instance for URL wordpress.foo.org by using already existing database server and database account and web server with vhost root '/var/www/wordpress.foo.org'.
class { 'wordpress':
settings => {
'wordpress.foo.org' => {
owner => 'wp',
dbhost => 'XX.XX.XX.XX',
dbname => 'wordpress',
dbuser => 'wpuserdb',
dbpasswd => 'kiki',
wproot => '/var/www/wordpress.foo.org',
wptitle => 'hola this wordpress instance is installed by puppet',
wpadminuser => 'wpadmin',
wpadminpasswd => 'lolo',
wpadminemail => '[email protected]',
}
}
}
Bellow the datatype of `$settings`. Parameters without a default value are mandatory unless otherwise stated.
Hash[
String, # The URI of the WordPress instance (like : www.foo.org).
Hash[
Enum[
'ensure', # Possible values : present, absent, lastest (defaults present).
'wproot', # Path where is located root of WordPress instance.
'owner', # User that own files of WordPress instance.
'locale', # Language used by WordPress instance (defaults en_US).
'dbhost', # Address of the database server (must be MySQL or MariaDB).
'dbname', # Name of the database where tables of WordPress instance are stored.
'dbuser', # User of the database used by wordpress to connect to the database server.
'dbpasswd', # Password of the user of the database.
'dbprefix', # Set table prefix (defaults wp<random_number_with_4_digits>).
'wpselfupdate', # Possible values : disabled , enabled (defaults disabled).
'wptitle', # Init title of the WordPress instance.
'wpadminuser', # Name of admin account of the WordPress instance.
'wpadminpasswd', # Password of the admin account of the WordPress instance.
'wpadminemail', # email address of the admin account.
'wpresources', # Settings for plugins and themes (not mandatory).
],
Variant[
String,
Hash[
Enum[
'plugin',
'theme',
],
Array[
Hash[
Enum[
'name', # Name of the plugin or theme
'ensure', # Possible values : present, absent, latest (defaults present).
],
String
]
]
]
]
]
]
The following parameters are available in the wordpress
class.
Data type: Hash
Describes all availables settings in this module for all wordpress instances on this node. Defaults to empty hash.
Default value: {}
Data type: Pattern['^/']
Gives the path where are stored archives done before update managed by puppet (not by WordPress itself with wpselfupdate
). Defaults to /var/wordpress_archives.
Default value: $wordpress::params::default_wparchives_path
Data type: Pattern['^http']
Gives the address from which to download the WP-CLI tool. Defaults to 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar'.
Default value: $wordpress::params::default_wpcli_url
Data type: Pattern['^/']
Gives the path where the WP-CLI tools is deployed. Defaults to '/usr/local/bin/wp'.
Default value: $wordpress::params::default_wpcli_bin
Data type: Integer[1,23]
Gives the time (hour between 1 and 23) at which the update of external fact is done. Defaults to 7.
Default value: $wordpress::params::default_hour_fact_update
Sets defaults values for some variables and parameters.
Type: Ruby 4.x API
Hash a string
The wordpress::password_hash function.
Returns: String
the password hash from the clear text password.
Data type: String
Plain text password.